3
0
Fork 0
forked from mirrors/nixpkgs

oracle-instantclient: prefix LD_LIBRARY_PATH

This commit is contained in:
Florian Klink 2018-05-17 17:38:06 +02:00
parent 0f4269bf48
commit ccb4558a91

View file

@ -1,4 +1,4 @@
{ stdenv, requireFile, glibc, patchelf, rpmextract, libaio, odbcSupport ? false, unixODBC }:
{ stdenv, requireFile, glibc, patchelf, rpmextract, libaio, makeWrapper, odbcSupport ? false, unixODBC }:
assert odbcSupport -> unixODBC != null;
@ -35,7 +35,7 @@ in stdenv.mkDerivation rec {
buildInputs = [ glibc ] ++
optional odbcSupport unixODBC;
nativeBuildInputs = [ rpmextract patchelf ];
nativeBuildInputs = [ rpmextract patchelf makeWrapper ];
buildCommand = ''
mkdir -p "${name}"
@ -70,6 +70,7 @@ in stdenv.mkDerivation rec {
patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
--force-rpath --set-rpath "$out/lib:${libaio}/lib" \
$exe
wrapProgram $exe --prefix LD_LIBRARY_PATH ":" $out/lib
done
'';