mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 07:13:23 +01:00
commit
ed5d80d74b
1 changed files with 14 additions and 4 deletions
|
@ -25,14 +25,24 @@ stdenv.mkDerivation rec {
|
|||
make doc
|
||||
'';
|
||||
|
||||
dontStrip = true;
|
||||
|
||||
postFixup =
|
||||
let ocamlVersion = (builtins.parseDrvName (ocaml.name)).version;
|
||||
in
|
||||
let p = p: "${p}/lib/ocaml/${ocaml.version}/site-lib"; in
|
||||
''
|
||||
for prog in "$out"/bin/*
|
||||
pushd $out/bin
|
||||
for prog in *
|
||||
do
|
||||
wrapProgram $prog --set CAML_LD_LIBRARY_PATH "${ocaml_lwt}"/lib/ocaml/${ocamlVersion}/site-lib/lwt/:"${lambdaTerm}"/lib/ocaml/${ocamlVersion}/site-lib/lambda-term/:'$CAML_LD_LIBRARY_PATH' --set OCAMLPATH "${ocaml_lwt}"/lib/ocaml/${ocamlVersion}/site-lib:${ocaml_react}/lib/ocaml/${ocamlVersion}/site-lib:${camomile}/lib/ocaml/${ocamlVersion}/site-lib:${zed}/lib/ocaml/${ocamlVersion}/site-lib:${lambdaTerm}/lib/ocaml/${ocamlVersion}/site-lib:"$out"/lib/ocaml/${ocamlVersion}/site-lib:'$OCAMLPATH'
|
||||
mv $prog .$prog-wrapped
|
||||
cat > $prog <<EOF
|
||||
#!/bin/sh
|
||||
export CAML_LD_LIBRARY_PATH=${p ocaml_lwt}/lwt:${p lambdaTerm}/lambda-term:'\$CAML_LD_LIBRARY_PATH'
|
||||
export OCAMLPATH=${p ocaml_lwt}:${p ocaml_react}:${p camomile}:${p zed}:${p lambdaTerm}:"$out"/lib/ocaml/${ocaml.version}/site-lib:'\$OCAMLPATH'
|
||||
${ocaml}/bin/ocamlrun $out/bin/.$prog-wrapped \$*
|
||||
EOF
|
||||
chmod +x $prog
|
||||
done
|
||||
popd
|
||||
'';
|
||||
|
||||
meta = {
|
||||
|
|
Loading…
Reference in a new issue