2023-02-02 18:25:31 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
fetchzip,
|
|
|
|
makeWrapper,
|
2024-09-19 14:19:46 +00:00
|
|
|
openjdk17,
|
2023-02-02 18:25:31 +00:00
|
|
|
python3,
|
|
|
|
unzip,
|
2024-09-19 14:19:46 +00:00
|
|
|
nixosTests,
|
2023-02-02 18:25:31 +00:00
|
|
|
}:
|
2021-01-15 22:18:51 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "nzbhydra2";
|
2024-10-04 16:56:33 +00:00
|
|
|
version = "7.7.0";
|
2021-01-15 22:18:51 +00:00
|
|
|
|
|
|
|
src = fetchzip {
|
2024-09-19 14:19:46 +00:00
|
|
|
url = "https://github.com/theotherp/nzbhydra2/releases/download/v${version}/nzbhydra2-${version}-generic.zip";
|
2024-10-04 16:56:33 +00:00
|
|
|
hash = "sha256-8Q/aTMwHFy7OG+VyoSRYlXp4l247nUSPP0YCMkv9Cec=";
|
2021-01-15 22:18:51 +00:00
|
|
|
stripRoot = false;
|
|
|
|
};
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
nativeBuildInputs = [
|
2024-09-19 14:19:46 +00:00
|
|
|
openjdk17
|
2024-07-27 06:49:29 +00:00
|
|
|
makeWrapper
|
|
|
|
unzip
|
|
|
|
];
|
2021-01-15 22:18:51 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
2021-05-20 23:08:51 +00:00
|
|
|
runHook preInstall
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
install -d -m 755 "$out/lib/nzbhydra2"
|
2021-01-15 22:18:51 +00:00
|
|
|
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" \
|
2024-09-19 14:19:46 +00:00
|
|
|
--prefix PATH ":" ${openjdk17}/bin
|
2021-05-20 23:08:51 +00:00
|
|
|
|
|
|
|
runHook postInstall
|
2021-01-15 22:18:51 +00:00
|
|
|
'';
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
passthru.tests = {
|
|
|
|
inherit (nixosTests) nzbhydra2;
|
|
|
|
};
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
meta = {
|
2021-01-15 22:18:51 +00:00
|
|
|
description = "Usenet meta search";
|
|
|
|
homepage = "https://github.com/theotherp/nzbhydra2";
|
2024-07-27 06:49:29 +00:00
|
|
|
license = lib.licenses.asl20;
|
|
|
|
maintainers = with lib.maintainers; [ matteopacini ];
|
|
|
|
platforms = lib.platforms.linux;
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "nzbhydra2";
|
2021-01-15 22:18:51 +00:00
|
|
|
};
|
|
|
|
}
|