about summary refs log tree commit diff
path: root/pkgs/applications/networking/resilio-sync
diff options
context:
space:
mode:
authorRyan Horiguchi <ryan.horiguchi@gmail.com>2023-04-03 23:20:34 +0200
committerRyan Horiguchi <ryan.horiguchi@gmail.com>2023-04-21 10:28:47 +0200
commit8c49f09be2e5a62ff005103e5eb7faee7f991200 (patch)
treef04eb0767c69dd9f0764946e3d883d6998b70c78 /pkgs/applications/networking/resilio-sync
parentfc46a9d1e2b30321a2497e413eb1562c9cfda5b6 (diff)
resilio-sync: fix build with libxcrypt and use autoPatchelfHook
Diffstat (limited to 'pkgs/applications/networking/resilio-sync')
-rw-r--r--pkgs/applications/networking/resilio-sync/default.nix14
1 files changed, 10 insertions, 4 deletions
diff --git a/pkgs/applications/networking/resilio-sync/default.nix b/pkgs/applications/networking/resilio-sync/default.nix
index c52e96066f8c5..16d5f0952ebc8 100644
--- a/pkgs/applications/networking/resilio-sync/default.nix
+++ b/pkgs/applications/networking/resilio-sync/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchurl, libxcrypt, ... }:
+{ lib, stdenv, fetchurl, autoPatchelfHook, libxcrypt-legacy }:
 
 stdenv.mkDerivation rec {
   pname = "resilio-sync";
@@ -24,11 +24,17 @@ stdenv.mkDerivation rec {
   dontStrip = true; # Don't strip, otherwise patching the rpaths breaks
   sourceRoot = ".";
 
+  nativeBuildInputs = [
+    autoPatchelfHook
+  ];
+
+  buildInputs = [
+    stdenv.cc.libc
+    libxcrypt-legacy
+  ];
+
   installPhase = ''
     install -D rslsync "$out/bin/rslsync"
-    patchelf \
-      --interpreter "$(< $NIX_CC/nix-support/dynamic-linker)" \
-      --set-rpath ${lib.makeLibraryPath [ stdenv.cc.libc libxcrypt ]} "$out/bin/rslsync"
   '';
 
   meta = with lib; {