2019-09-13 16:37:51 +01:00
|
|
|
{ lib, stdenv, fetchurl, makeWrapper, curl, icu60, openssl, zlib }:
|
2017-03-25 20:18:34 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "jackett";
|
2020-04-30 11:30:17 +01:00
|
|
|
version = "0.16.175";
|
2017-03-25 20:18:34 +00:00
|
|
|
|
2020-04-30 05:43:11 +01:00
|
|
|
src = {
|
|
|
|
x86_64-linux = fetchurl {
|
|
|
|
url = "https://github.com/Jackett/Jackett/releases/download/v${version}/Jackett.Binaries.LinuxAMDx64.tar.gz";
|
2020-04-30 11:30:17 +01:00
|
|
|
sha512 = "269n84qc8sfrmnidgrjywanbqr65mhkmk24dlqfi17pi0l27wi4fc4qmnjj683xwprz5hqjsmkqf963pbx4k3jaz0rp0jnizan91wij";
|
2020-04-30 05:43:11 +01:00
|
|
|
};
|
|
|
|
aarch64-linux = fetchurl {
|
|
|
|
url = "https://github.com/Jackett/Jackett/releases/download/v${version}/Jackett.Binaries.LinuxARM64.tar.gz";
|
2020-04-30 11:30:17 +01:00
|
|
|
sha512 = "0dmyhprd2vi2z9q5g79psqgsc3w0zdac4s6k20rngi8jxm5jgphzrzcic4rgdijyryap99my619k447w701a08vh9sfcfk0fjg9pgwb";
|
2020-04-30 05:43:11 +01:00
|
|
|
};
|
|
|
|
}."${stdenv.targetPlatform.system}" or (throw "Missing hash for host system: ${stdenv.targetPlatform.system}");
|
2017-03-25 20:18:34 +00:00
|
|
|
|
|
|
|
buildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
installPhase = ''
|
2019-09-13 16:37:51 +01:00
|
|
|
mkdir -p $out/{bin,opt/${pname}-${version}}
|
|
|
|
cp -r * $out/opt/${pname}-${version}
|
2017-03-25 20:18:34 +00:00
|
|
|
|
2019-09-13 16:37:51 +01:00
|
|
|
makeWrapper "$out/opt/${pname}-${version}/jackett" $out/bin/Jackett \
|
|
|
|
--prefix LD_LIBRARY_PATH ':' "${curl.out}/lib:${icu60.out}/lib:${openssl.out}/lib:${zlib.out}/lib"
|
|
|
|
'';
|
|
|
|
|
|
|
|
preFixup = let
|
|
|
|
libPath = lib.makeLibraryPath [
|
|
|
|
stdenv.cc.cc.lib # libstdc++.so.6
|
|
|
|
];
|
|
|
|
in ''
|
|
|
|
patchelf \
|
|
|
|
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
|
|
|
--set-rpath "${libPath}" \
|
|
|
|
$out/opt/${pname}-${version}/jackett
|
2017-03-25 20:18:34 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "API Support for your favorite torrent trackers.";
|
2020-03-05 20:01:19 +00:00
|
|
|
homepage = "https://github.com/Jackett/Jackett/";
|
2017-03-25 20:18:34 +00:00
|
|
|
license = licenses.gpl2;
|
2019-09-13 16:37:51 +01:00
|
|
|
maintainers = with maintainers; [ edwtjo nyanloutre ];
|
2020-04-30 05:43:11 +01:00
|
|
|
platforms = [ "x86_64-linux" "aarch64-linux" ];
|
2017-03-25 20:18:34 +00:00
|
|
|
};
|
|
|
|
}
|