Merge pull request #224539 from rhoriguchi/resilio-sync-fix

resilio-sync: fix build with libxcrypt and use autoPatchelfHook
This commit is contained in:
Weijia Wang 2023-04-26 01:27:14 +03:00 committed by GitHub
commit 8c5e16581c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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; {