@@ -1,4 +1,4 @@
1−{ lib, stdenv, fetchurl, makeWrapper, patchelf, openssl, libunwind, zlib, krb5, icu, nixosTests }:
1+{ lib, stdenv, fetchurl, makeWrapper, autoPatchelfHook, fixDarwinDylibNames, zlib, krb5, openssl, icu, nixosTests }:
22
33let
44 os = if stdenv.isDarwin then "osx" else "linux";
@@ -10,20 +10,14 @@ let
1010 "Unsupported system: ${stdenv.hostPlatform.system}");
1111
1212 hash = {
13− x64-linux_hash = "sha256-Cuvz9Mhwpg8RIaiSXib+QW00DM66qPRQulrchRL2BSk=";
14− arm64-linux_hash = "sha256-uyVwa73moHWMZScNNSOU17lALuK3PC/cvTZPJ9qg7JQ=";
15− x64-osx_hash = "sha256-FGXLsfEuCW94D786LJ/wvA9TakOn5sG2M1rDXPQicYw=";
13+ x64-linux_hash = "sha256-9m5vWobkibqOHsuIJmvEHuwsuJogvQQe8h0dvFj62tw=";
14+ arm64-linux_hash = "sha256-OBm4j5Ez04XLjp4DHyOrwSOSGanuuI8g2y2wZaotH8M=";
15+ x64-osx_hash = "sha256-UPf6Yl0nbhmiWq9oGyi7sRhlahB6zHL7nTj7GRlKoII=";
1616 }."${arch}-${os}_hash";
1717
18− rpath = lib.makeLibraryPath [
19− stdenv.cc.cc openssl libunwind zlib krb5 icu
20− ];
21−
22− dynamicLinker = stdenv.cc.bintools.dynamicLinker;
23−
2418in stdenv.mkDerivation rec {
2519 pname = "ombi";
26− version = "4.0.1292";
20+ version = "4.0.1345";
2721
2822 sourceRoot = ".";
2923
@@ -32,25 +26,20 @@ in stdenv.mkDerivation rec {
3226 sha256 = hash;
3327 };
3428
35− buildInputs = [ makeWrapper patchelf ];
29+ nativeBuildInputs = [ makeWrapper autoPatchelfHook ]
30+ ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
31+
32+ propagatedBuildInputs = [ stdenv.cc.cc zlib krb5 ];
3633
3734 installPhase = ''
3835 mkdir -p $out/{bin,share/${pname}-${version}}
3936 cp -r * $out/share/${pname}-${version}
4037
4138 makeWrapper $out/share/${pname}-${version}/Ombi $out/bin/Ombi \
39+ --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ openssl icu ]} \
4240 --run "cd $out/share/${pname}-${version}"
4341 '';
4442
45− dontPatchELF = true;
46− postFixup = ''
47− patchelf --set-interpreter "${dynamicLinker}" \
48− --set-rpath "$ORIGIN:${rpath}" $out/share/${pname}-${version}/Ombi
49−
50− find $out -type f -name "*.so" -exec \
51− patchelf --set-rpath '$ORIGIN:${rpath}' {} ';'
52− '';
53−
5443 passthru = {
5544 updateScript = ./update.sh;
5645 tests.smoke-test = nixosTests.ombi;