push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,62 @@
{
lib,
stdenv,
fetchurl,
jre_headless,
linkFarm,
makeWrapper,
nixosTests,
plugins ? [ ],
}:
let
pluginsDir = linkFarm "reposilite-plugins" (
map (p: {
name = (builtins.parseDrvName p.name).name + ".jar";
path = p.outPath or p;
}) plugins
);
in
stdenv.mkDerivation (finalAttrs: {
pname = "Reposilite";
version = "3.5.25";
src = fetchurl {
url = "https://maven.reposilite.com/releases/com/reposilite/reposilite/${finalAttrs.version}/reposilite-${finalAttrs.version}-all.jar";
hash = "sha256-g1a+9TGRqRK4qcJW2ZACsiew5f27T4qkm/A+c7sVxHI=";
};
dontUnpack = true;
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
runHook preInstall
mkdir -p $out/lib
cp $src $out/lib/reposilite
makeWrapper ${jre_headless}/bin/java $out/bin/reposilite \
--add-flags "-Xmx40m -jar $out/lib/reposilite ${
lib.optionalString (plugins != [ ]) "--plugin-directory ${pluginsDir}"
}"
runHook postInstall
'';
passthru = {
tests = nixosTests.reposilite;
updateScript = ./update.sh;
};
meta = {
description = "Lightweight and easy-to-use repository management software dedicated for the Maven based artifacts in the JVM ecosystem";
homepage = "https://github.com/dzikoysk/reposilite";
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [
jamalam
uku3lig
];
inherit (jre_headless.meta) platforms;
mainProgram = "reposilite";
};
})

View File

@@ -0,0 +1,7 @@
{
"checksum": "sha256-NAB69EvfAP/2EegqR9ni5bdk5MtYd/Rzn40nUqfivfY=",
"groovy": "sha256-WjQy9nUz3LWv/AaTyZFfD/55ukt/FaXrGF3h7tc8KJg=",
"migration": "sha256-djEeQIwfNxgaMmPAmQQT+KC1qwP58sjEbQI6nqqTKNo=",
"prometheus": "sha256-avwHOdv0kj9TrK9fxhGTNzyFTn0Rjr70PTNDeyUz4cw=",
"swagger": "sha256-8Zit1SWYVJv+hn+VR38QBTSMuyucnaNfZePNPN6LhI8="
}

View File

@@ -0,0 +1,47 @@
{
lib,
generateSplicesForMkScope,
makeScopeWithSplicing',
}:
let
pluginHashes = lib.importJSON ./plugins.json;
in
makeScopeWithSplicing' {
otherSplices = generateSplicesForMkScope "reposilitePlugins";
f =
self:
{
fetchPlugin = self.callPackage (
{
lib,
fetchurl,
reposilite,
}:
lib.makeOverridable (
{ name, hash }:
let
inherit (reposilite) version;
fancyName = lib.concatStrings [
(lib.toUpper (builtins.substring 0 1 name))
(builtins.substring 1 ((builtins.stringLength name) - 1) name)
];
in
fetchurl {
url = "https://maven.reposilite.com/releases/com/reposilite/plugin/${name}-plugin/${version}/${name}-plugin-${version}-all.jar";
inherit version hash;
meta = {
description = "${fancyName} plugin for Reposilite.";
homepage = "https://github.com/dzikoysk/reposilite";
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ uku3lig ];
inherit (reposilite.meta) platforms;
};
}
)
) { };
}
// builtins.mapAttrs (name: hash: self.fetchPlugin { inherit name hash; }) pluginHashes;
}

View File

@@ -0,0 +1,20 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq common-updater-scripts
# shellcheck shell=bash
set -euo pipefail
latestVersion=$(list-git-tags --url=https://github.com/dzikoysk/reposilite | grep -E '^[0-9.]+$' | sort --reverse --version-sort | head -n 1)
update-source-version reposilite "$latestVersion"
jq -r 'keys[]' ./pkgs/by-name/re/reposilite/plugins.json | while read -r plugin; do
tmpfile=$(mktemp)
curl -o "$tmpfile" "https://maven.reposilite.com/releases/com/reposilite/plugin/$plugin-plugin/$latestVersion/$plugin-plugin-$latestVersion-all.jar"
hash=$(nix-hash --sri --flat --type sha256 "$tmpfile")
updatedContent=$(jq ".$plugin = \"$hash\"" ./pkgs/by-name/re/reposilite/plugins.json)
echo -E "$updatedContent" > ./pkgs/by-name/re/reposilite/plugins.json
done