forked from mirrors/nixpkgs
treewide: CAML_LD_LIBRARY_PATH may be undefined
This commit is contained in:
parent
a951f2a27f
commit
bca2e8255e
|
@ -23,7 +23,7 @@ stdenv.mkDerivation (args // {
|
|||
|
||||
setupHook = if setupHook == null && hasSharedObjects
|
||||
then writeText "setupHook.sh" ''
|
||||
export CAML_LD_LIBRARY_PATH="''${CAML_LD_LIBRARY_PATH}''${CAML_LD_LIBRARY_PATH:+:}''$1/lib/ocaml/${ocaml.version}/site-lib/${name}/"
|
||||
export CAML_LD_LIBRARY_PATH="''${CAML_LD_LIBRARY_PATH-}''${CAML_LD_LIBRARY_PATH:+:}''$1/lib/ocaml/${ocaml.version}/site-lib/${name}/"
|
||||
''
|
||||
else setupHook;
|
||||
|
||||
|
|
|
@ -27,8 +27,8 @@ stdenv.mkDerivation rec {
|
|||
postInstall = ''
|
||||
wrapProgram $out/bin/rtop \
|
||||
--prefix PATH : "${utop}/bin" \
|
||||
--set CAML_LD_LIBRARY_PATH ${ocaml_lwt}/lib/ocaml/${ocaml.version}/site-lib:$CAML_LD_LIBRARY_PATH \
|
||||
--set OCAMLPATH $out/lib/ocaml/${ocaml.version}/site-lib:$OCAMLPATH
|
||||
--prefix CAML_LD_LIBRARY_PATH : "${ocaml_lwt}/lib/ocaml/${ocaml.version}/site-lib" \
|
||||
--prefix OCAMLPATH : "$out/lib/ocaml/${ocaml.version}/site-lib"
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
|
|
@ -28,8 +28,8 @@ stdenv.mkDerivation rec {
|
|||
createFindlibDestdir = true;
|
||||
|
||||
setupHook = writeText "setupHook.sh" ''
|
||||
export CAML_LD_LIBRARY_PATH="''${CAML_LD_LIBRARY_PATH}''${CAML_LD_LIBRARY_PATH:+:}''$1/lib/ocaml/${ocaml.version}/site-lib/${name}/"
|
||||
export CAML_LD_LIBRARY_PATH="''${CAML_LD_LIBRARY_PATH}''${CAML_LD_LIBRARY_PATH:+:}''$1/lib/ocaml/${ocaml.version}/site-lib/${name}-llvm-plugins/"
|
||||
export CAML_LD_LIBRARY_PATH="''${CAML_LD_LIBRARY_PATH-}''${CAML_LD_LIBRARY_PATH:+:}''$1/lib/ocaml/${ocaml.version}/site-lib/${name}/"
|
||||
export CAML_LD_LIBRARY_PATH="''${CAML_LD_LIBRARY_PATH-}''${CAML_LD_LIBRARY_PATH:+:}''$1/lib/ocaml/${ocaml.version}/site-lib/${name}-llvm-plugins/"
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ which makeWrapper ];
|
||||
|
@ -44,7 +44,7 @@ stdenv.mkDerivation rec {
|
|||
installPhase = ''
|
||||
export OCAMLPATH=$OCAMLPATH:$OCAMLFIND_DESTDIR;
|
||||
export PATH=$PATH:$out/bin
|
||||
export CAML_LD_LIBRARY_PATH=$CAML_LD_LIBRARY_PATH:$OCAMLFIND_DESTDIR/bap-plugin-llvm/:$OCAMLFIND_DESTDIR/bap/
|
||||
export CAML_LD_LIBRARY_PATH=''${CAML_LD_LIBRARY_PATH-}''${CAML_LD_LIBRARY_PATH:+:}$OCAMLFIND_DESTDIR/bap-plugin-llvm/:$OCAMLFIND_DESTDIR/bap/
|
||||
mkdir -p $out/lib/bap
|
||||
make install
|
||||
rm $out/bin/baptop
|
||||
|
|
|
@ -41,7 +41,7 @@ stdenv.mkDerivation rec {
|
|||
''
|
||||
rm -rf $out/var/run
|
||||
wrapProgram $out/bin/ocsigenserver \
|
||||
--prefix CAML_LD_LIBRARY_PATH : "$CAML_LD_LIBRARY_PATH:${mkpath ssl "ssl"}:${mkpath ocamlnet "netsys"}:${mkpath ocamlnet "netstring"}:${mkpath ocaml_pcre "pcre"}:${mkpath ocaml_sqlite3 "sqlite3"}"
|
||||
--suffix CAML_LD_LIBRARY_PATH : "${mkpath ssl "ssl"}:${mkpath ocamlnet "netsys"}:${mkpath ocamlnet "netstring"}:${mkpath ocaml_pcre "pcre"}:${mkpath ocaml_sqlite3 "sqlite3"}"
|
||||
'';
|
||||
|
||||
dontPatchShebangs = true;
|
||||
|
|
|
@ -37,7 +37,7 @@ stdenv.mkDerivation rec {
|
|||
'';
|
||||
|
||||
setupHook = writeText "setupHook.sh" ''
|
||||
export CAML_LD_LIBRARY_PATH="''${CAML_LD_LIBRARY_PATH}''${CAML_LD_LIBRARY_PATH:+:}''$1/lib/ocaml/${ocaml.version}/site-lib/${name}/"
|
||||
export CAML_LD_LIBRARY_PATH="''${CAML_LD_LIBRARY_PATH-}''${CAML_LD_LIBRARY_PATH:+:}''$1/lib/ocaml/${ocaml.version}/site-lib/${name}/"
|
||||
export NIX_CFLAGS_COMPILE+=" -isystem $1/lib/ocaml/${ocaml.version}/site-lib/camlidl"
|
||||
export NIX_LDFLAGS+=" -L $1/lib/ocaml/${ocaml.version}/site-lib/camlidl"
|
||||
'';
|
||||
|
|
|
@ -35,7 +35,7 @@ stdenv.mkDerivation rec {
|
|||
export OCAMLPATH="''${OCAMLPATH-}''${OCAMLPATH:+:}''$1/lib/ocaml/${ocaml.version}/site-lib/"
|
||||
fi
|
||||
if test -d "''$1/lib/ocaml/${ocaml.version}/site-lib/stublibs"; then
|
||||
export CAML_LD_LIBRARY_PATH="''${CAML_LD_LIBRARY_PATH}''${CAML_LD_LIBRARY_PATH:+:}''$1/lib/ocaml/${ocaml.version}/site-lib/stublibs"
|
||||
export CAML_LD_LIBRARY_PATH="''${CAML_LD_LIBRARY_PATH-}''${CAML_LD_LIBRARY_PATH:+:}''$1/lib/ocaml/${ocaml.version}/site-lib/stublibs"
|
||||
fi
|
||||
export OCAMLFIND_DESTDIR="''$out/lib/ocaml/${ocaml.version}/site-lib/"
|
||||
if test -n "''${createFindlibDestdir-}"; then
|
||||
|
|
|
@ -39,6 +39,7 @@ stdenv.mkDerivation rec {
|
|||
installPhase = ''
|
||||
mkdir -p "$out"/${path}
|
||||
for e in OCAMLPATH CAML_LD_LIBRARY_PATH; do
|
||||
[[ -v "$e" ]] || continue
|
||||
printf %s "''${!e}" > "$out"/${path}/$e
|
||||
done
|
||||
'';
|
||||
|
|
Loading…
Reference in a new issue