flake/exprs/reposilite/derivation.nix

39 lines
1,019 B
Nix
Raw Normal View History

2024-02-03 21:55:48 +01:00
{
lib,
stdenv,
fetchurl,
makeWrapper,
jdk21,
}:
2024-04-13 12:57:02 +02:00
stdenv.mkDerivation (finalAttrs: {
2024-02-03 21:55:48 +01:00
name = "reposilite";
version = "3.5.12";
2024-02-03 21:55:48 +01:00
src = fetchurl {
2024-04-13 12:57:02 +02:00
url = with finalAttrs; "https://maven.reposilite.com/releases/com/reposilite/reposilite/${version}/reposilite-${version}-all.jar";
hash = "sha256-fidCHkdoQD9oynsPogqyhAXbbydW2oxaZFx5QneOcSY=";
2024-02-03 21:55:48 +01:00
};
nativeBuildInputs = [makeWrapper];
phases = ["installPhase"];
2024-04-13 12:57:02 +02:00
installPhase = with finalAttrs; ''
2024-02-03 21:55:48 +01:00
runHook preInstall
mkdir -p $out/bin $out/share/${name}
cp ${src} $out/share/${name}/${name}.jar
makeWrapper ${jdk21}/bin/java $out/bin/${name} --add-flags "-jar $out/share/${name}/${name}.jar"
runHook postInstall
'';
meta = with lib; {
description = "Lightweight and easy-to-use repository management software dedicated for the Maven based artifacts in the JVM ecosystem";
homepage = "https://reposilite.com/";
license = licenses.asl20;
platforms = platforms.unix;
mainProgram = "reposilite";
};
2024-04-13 12:57:02 +02:00
})