forked from mirrors/nixpkgs
oracle-instantclient: prefix LD_LIBRARY_PATH
This commit is contained in:
parent
0f4269bf48
commit
ccb4558a91
|
@ -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;
|
assert odbcSupport -> unixODBC != null;
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ in stdenv.mkDerivation rec {
|
||||||
buildInputs = [ glibc ] ++
|
buildInputs = [ glibc ] ++
|
||||||
optional odbcSupport unixODBC;
|
optional odbcSupport unixODBC;
|
||||||
|
|
||||||
nativeBuildInputs = [ rpmextract patchelf ];
|
nativeBuildInputs = [ rpmextract patchelf makeWrapper ];
|
||||||
|
|
||||||
buildCommand = ''
|
buildCommand = ''
|
||||||
mkdir -p "${name}"
|
mkdir -p "${name}"
|
||||||
|
@ -70,6 +70,7 @@ in stdenv.mkDerivation rec {
|
||||||
patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
|
patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
|
||||||
--force-rpath --set-rpath "$out/lib:${libaio}/lib" \
|
--force-rpath --set-rpath "$out/lib:${libaio}/lib" \
|
||||||
$exe
|
$exe
|
||||||
|
wrapProgram $exe --prefix LD_LIBRARY_PATH ":" $out/lib
|
||||||
done
|
done
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue