From 8c49f09be2e5a62ff005103e5eb7faee7f991200 Mon Sep 17 00:00:00 2001 From: Ryan Horiguchi Date: Mon, 3 Apr 2023 23:20:34 +0200 Subject: [PATCH] resilio-sync: fix build with libxcrypt and use autoPatchelfHook --- .../networking/resilio-sync/default.nix | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/networking/resilio-sync/default.nix b/pkgs/applications/networking/resilio-sync/default.nix index c52e96066f8c..16d5f0952ebc 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; {