Merge branch 'master' into static-fixes
This commit is contained in:
@@ -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"
|
||||
'';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{ stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild, dune }:
|
||||
let
|
||||
pname = "cppo";
|
||||
webpage = "http://mjambon.com/${pname}.html";
|
||||
webpage = "https://github.com/ocaml-community/${pname}";
|
||||
in
|
||||
assert stdenv.lib.versionAtLeast ocaml.version "3.12";
|
||||
|
||||
|
||||
@@ -32,13 +32,13 @@ stdenv.mkDerivation rec {
|
||||
setupHook = writeText "setupHook.sh" ''
|
||||
addOCamlPath () {
|
||||
if test -d "''$1/lib/ocaml/${ocaml.version}/site-lib"; then
|
||||
export OCAMLPATH="''${OCAMLPATH}''${OCAMLPATH:+:}''$1/lib/ocaml/${ocaml.version}/site-lib/"
|
||||
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
|
||||
if test -n "''${createFindlibDestdir-}"; then
|
||||
mkdir -p $OCAMLFIND_DESTDIR
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ index 00000000..3ea84e2d
|
||||
+header() { echo "$1"; }
|
||||
+stopNest() { true; }
|
||||
+
|
||||
+fixupOutputHooks+=('if [ -z "$dontPatchShebangs" -a -e "$prefix" ]; then patchShebangs "$prefix"; fi')
|
||||
+fixupOutputHooks+=('if [ -z "${dontPatchShebangs-}" -a -e "$prefix" ]; then patchShebangs "$prefix"; fi')
|
||||
+
|
||||
+patchShebangs() {
|
||||
+ local dir="$1"
|
||||
|
||||
@@ -11,8 +11,8 @@ stdenv.mkDerivation rec {
|
||||
version = "2.4.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/diml/utop/archive/${version}.tar.gz";
|
||||
sha256 = "0fl8524vmxb9yxjwrh5varvfp0ff3sgfp627knwbxxr69w45ad8h";
|
||||
url = "https://github.com/ocaml-community/utop/releases/download/${version}/utop-${version}.tbz";
|
||||
sha256 = "0y2v8rkfz19nlz8gh0lkh5wx5hyvw5gl4nw1kg8j2pw9jnilq5nb";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
@@ -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
|
||||
'';
|
||||
|
||||
Reference in New Issue
Block a user