nixpkgs/pkgs/servers/jackett/default.nix

41 lines
1.2 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchurl, makeWrapper, curl, icu60, openssl, zlib }:
stdenv.mkDerivation rec {
pname = "jackett";
2020-04-01 13:21:53 +00:00
version = "0.14.365";
src = fetchurl {
url = "https://github.com/Jackett/Jackett/releases/download/v${version}/Jackett.Binaries.LinuxAMDx64.tar.gz";
2020-04-01 13:21:53 +00:00
sha256 = "0xvlknjhc75km12d8li50ifqpfyl6whymb6gd7ccwyd9lv9xxm27";
};
buildInputs = [ makeWrapper ];
installPhase = ''
mkdir -p $out/{bin,opt/${pname}-${version}}
cp -r * $out/opt/${pname}-${version}
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
'';
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/";
license = licenses.gpl2;
maintainers = with maintainers; [ edwtjo nyanloutre ];
2020-03-09 20:49:24 +00:00
platforms = platforms.linux;
};
}