nyxexprs/pkgs/applications/networking/reposilite-bin/default.nix

39 lines
1.1 KiB
Nix
Raw Normal View History

2023-11-03 07:25:58 +00:00
{
pkgs,
lib,
2024-01-18 09:43:10 +00:00
javaJdk,
2023-11-03 07:25:58 +00:00
...
}: let
inherit (pkgs) stdenv;
jdk = javaJdk;
in
stdenv.mkDerivation (finalAttrs: {
pname = "reposilite-bin";
2024-03-14 11:45:21 +00:00
version = "3.5.8";
2023-11-03 07:25:58 +00:00
jar = builtins.fetchurl {
url = "https://maven.reposilite.com/releases/com/reposilite/reposilite/${finalAttrs.version}/reposilite-${finalAttrs.version}-all.jar";
2024-03-14 11:45:21 +00:00
sha256 = "sha256:1skbbdfcbdhlhyrg1y1fimm87kq1ws6g5xy0sxaglgky9j218c0p";
2023-11-03 07:25:58 +00:00
};
dontUnpack = true;
nativeBuildInputs = [pkgs.makeWrapper];
installPhase = ''
runHook preInstall
makeWrapper ${jdk}/bin/java $out/bin/reposilite \
--add-flags "-Xmx40m -jar $jar" \
--set JAVA_HOME ${jdk}
runHook postInstall
'';
meta = {
description = "A lightweight repository manager for Maven artifacts";
homepage = "https://reposilite.com";
license = lib.licenses.asl20;
mainProgram = "reposilite"; # we don't inherit pname here because it contains the -bin suffix, which the resulting binary won't have
2023-11-03 07:25:58 +00:00
maintainers = with lib.maintainers; [NotAShelf];
};
})