Skip to content

Commit

Permalink
jackett: build selectively for aarch64
Browse files Browse the repository at this point in the history
The previous derivation would use the upstream x86_64 binary on ARM64,
causing binary format compatibility issues at runtime.
  • Loading branch information
purcell committed May 1, 2020
1 parent 0dee885 commit 0135016
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions pkgs/servers/jackett/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 ];

Expand Down Expand Up @@ -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" ];
};
}

0 comments on commit 0135016

Please sign in to comment.