nimble: Do not use patchelf.

This commit is contained in:
Maciek Starzyk 2016-10-07 01:02:57 +02:00 committed by Graham Christensen
parent 0f281dec98
commit 908ad09fd6
No known key found for this signature in database
GPG Key ID: FE918C3A98C1030F

View File

@ -12,22 +12,20 @@ stdenv.mkDerivation rec {
sha256 = "12znxzj1j5fflw2mkkrns9n7qg6sf207652zrdyf7h2jdyzzb73x";
};
buildInputs = [ nim ];
buildInputs = [ nim openssl ];
patchPhase = ''
substituteInPlace src/nimble.nim.cfg --replace "./vendor/nim" "${nim}/share"
echo "--clib:crypto" >> src/nimble.nim.cfg
'';
buildPhase = ''
nim c src/nimble
cd src && nim c -d:release nimble
'';
installPhase = ''
mkdir -p $out/bin
cp src/nimble $out/bin
patchelf --set-rpath "${stdenv.lib.makeLibraryPath [stdenv.cc.libc openssl]}" \
--add-needed libcrypto.so \
"$out/bin/nimble"
cp nimble $out/bin
'';
dontStrip = true;