Files
nixpkgs/pkgs/by-name/nz/nzbhydra2/package.nix
Dark Steveneq 646b892680
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
push sheeet
2025-10-09 14:15:47 +02:00

54 lines
1.2 KiB
Nix

{
lib,
stdenv,
fetchzip,
makeWrapper,
openjdk17,
python3,
unzip,
nixosTests,
}:
stdenv.mkDerivation rec {
pname = "nzbhydra2";
version = "7.19.2";
src = fetchzip {
url = "https://github.com/theotherp/nzbhydra2/releases/download/v${version}/nzbhydra2-${version}-generic.zip";
hash = "sha256-QFE8Zr7HGfMioiXWUKp5UvofK5IBb+gLpm1ytAEl3HM=";
stripRoot = false;
};
nativeBuildInputs = [
openjdk17
makeWrapper
unzip
];
installPhase = ''
runHook preInstall
install -d -m 755 "$out/lib/nzbhydra2"
cp -dpr --no-preserve=ownership "lib" "readme.md" "$out/lib/nzbhydra2"
install -D -m 755 "nzbhydra2wrapperPy3.py" "$out/lib/nzbhydra2/nzbhydra2wrapperPy3.py"
makeWrapper ${python3}/bin/python $out/bin/nzbhydra2 \
--add-flags "$out/lib/nzbhydra2/nzbhydra2wrapperPy3.py" \
--prefix PATH ":" ${openjdk17}/bin
runHook postInstall
'';
passthru.tests = {
inherit (nixosTests) nzbhydra2;
};
meta = {
description = "Usenet meta search";
homepage = "https://github.com/theotherp/nzbhydra2";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ matteopacini ];
platforms = lib.platforms.linux;
mainProgram = "nzbhydra2";
};
}