jackett: build selectively for aarch64

The previous derivation would use the upstream x86_64 binary on ARM64,
causing binary format compatibility issues at runtime.
This commit is contained in:
Steve Purcell 2020-04-30 16:43:11 +12:00
parent 0dee8855b7
commit 013501676c

View File

@ -4,10 +4,16 @@ stdenv.mkDerivation rec {
pname = "jackett";
version = "0.14.365";
src = fetchurl {
url = "https://github.com/Jackett/Jackett/releases/download/v${version}/Jackett.Binaries.LinuxAMDx64.tar.gz";
sha256 = "0xvlknjhc75km12d8li50ifqpfyl6whymb6gd7ccwyd9lv9xxm27";
};
src = {
x86_64-linux = fetchurl {
url = "https://github.com/Jackett/Jackett/releases/download/v${version}/Jackett.Binaries.LinuxAMDx64.tar.gz";
sha512 = "28dgaap4aj1ldcfr0lzgz2aq1lbk8vlgbmjwfg4m4s4rlmiadw6wkxy9w7h4fq7gqbj51q8xxqz6y50jfzn124bs9wgi8br4lk3hsw3";
};
aarch64-linux = fetchurl {
url = "https://github.com/Jackett/Jackett/releases/download/v${version}/Jackett.Binaries.LinuxARM64.tar.gz";
sha512 = "0kv95yg775lq7lgc4b75rdqfsyzfcj2a1bj0cmhzpjk4sbsg3jayqgjzbhl5h79r9si1y8b7lg8ffl2j83rwap8wyq1dqdjls4savfb";
};
}."${stdenv.targetPlatform.system}" or (throw "Missing hash for host system: ${stdenv.targetPlatform.system}");
buildInputs = [ makeWrapper ];
@ -35,6 +41,6 @@ stdenv.mkDerivation rec {
homepage = "https://github.com/Jackett/Jackett/";
license = licenses.gpl2;
maintainers = with maintainers; [ edwtjo nyanloutre ];
platforms = platforms.linux;
platforms = [ "x86_64-linux" "aarch64-linux" ];
};
}