buildOcaml: rename name to pname
This commit is contained in:
parent
e177d1c6d9
commit
e601787f7e
14 changed files with 29 additions and 23 deletions
|
@ -1,6 +1,6 @@
|
|||
{ lib, stdenv, writeText, ocaml, findlib, ocamlbuild, camlp4 }:
|
||||
|
||||
{ name, version, nativeBuildInputs ? [],
|
||||
{ pname ? args.name, version, nativeBuildInputs ? [],
|
||||
createFindlibDestdir ? true,
|
||||
dontStrip ? true,
|
||||
minimumSupportedOcamlVersion ? null,
|
||||
|
@ -17,13 +17,13 @@ in
|
|||
lib.versionOlder minimumSupportedOcamlVersion ocaml.version;
|
||||
|
||||
stdenv.mkDerivation (args // {
|
||||
name = "ocaml-${name}-${version}";
|
||||
name = "ocaml-${pname}-${version}";
|
||||
|
||||
nativeBuildInputs = [ ocaml findlib ocamlbuild camlp4 ] ++ nativeBuildInputs;
|
||||
|
||||
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/${pname}/"
|
||||
''
|
||||
else setupHook;
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ then throw "bin_prot-112.24.00 is not available for OCaml ${ocaml.version}"
|
|||
else
|
||||
|
||||
buildOcaml rec {
|
||||
name = "bin_prot";
|
||||
pname = "bin_prot";
|
||||
version = "112.24.00";
|
||||
|
||||
minimumSupportedOcamlVersion = "4.00";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{lib, buildOcaml, fetchurl, type_conv}:
|
||||
|
||||
buildOcaml rec {
|
||||
name = "comparelib";
|
||||
pname = "comparelib";
|
||||
version = "113.00.00";
|
||||
|
||||
minimumSupportedOcamlVersion = "4.00";
|
||||
|
|
|
@ -5,7 +5,7 @@ then throw "estring is not available for OCaml ${ocaml.version}"
|
|||
else
|
||||
|
||||
buildOcaml rec {
|
||||
name = "estring";
|
||||
pname = "estring";
|
||||
version = "1.3";
|
||||
|
||||
src = fetchurl {
|
||||
|
|
|
@ -6,7 +6,7 @@ else
|
|||
|
||||
buildOcaml rec {
|
||||
minimumSupportedOcamlVersion = "4.00";
|
||||
name = "faillib";
|
||||
pname = "faillib";
|
||||
version = "111.17.00";
|
||||
|
||||
src = fetchurl {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
buildOcaml rec {
|
||||
version = "112.35.00";
|
||||
name = "herelib";
|
||||
pname = "herelib";
|
||||
|
||||
minimumSupportedOcamlVersion = "4.00";
|
||||
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
{ buildOcaml, opaline, js_build_tools, ocaml_oasis, fetchurl } :
|
||||
|
||||
{ name, version ? "113.33.03", buildInputs ? [],
|
||||
{ pname, version ? "113.33.03", buildInputs ? [],
|
||||
hash ? "",
|
||||
minimumSupportedOcamlVersion ? "4.02", ...
|
||||
}@args:
|
||||
|
||||
buildOcaml (args // {
|
||||
inherit name version minimumSupportedOcamlVersion;
|
||||
inherit pname version minimumSupportedOcamlVersion;
|
||||
src = fetchurl {
|
||||
url = "https://github.com/janestreet/${name}/archive/${version}.tar.gz";
|
||||
url = "https://github.com/janestreet/${pname}/archive/${version}.tar.gz";
|
||||
sha256 = hash;
|
||||
};
|
||||
|
||||
|
@ -20,10 +20,16 @@ buildOcaml (args // {
|
|||
dontAddStaticConfigureFlags = true;
|
||||
configurePlatforms = [];
|
||||
|
||||
configurePhase = "./configure --prefix $out";
|
||||
configurePhase = ''
|
||||
./configure --prefix $out
|
||||
'';
|
||||
|
||||
buildPhase = "OCAML_TOPLEVEL_PATH=`ocamlfind query findlib`/.. make";
|
||||
buildPhase = ''
|
||||
OCAML_TOPLEVEL_PATH=`ocamlfind query findlib`/.. make
|
||||
'';
|
||||
|
||||
installPhase = "opaline -prefix $prefix -libdir $OCAMLFIND_DESTDIR ${name}.install";
|
||||
installPhase = ''
|
||||
opaline -prefix $prefix -libdir $OCAMLFIND_DESTDIR ${pname}.install
|
||||
'';
|
||||
|
||||
})
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
{ lib, buildOcaml, fetchurl, ocaml_oasis, opaline }:
|
||||
|
||||
buildOcaml rec {
|
||||
name = "js-build-tools";
|
||||
pname = "js-build-tools";
|
||||
version = "113.33.06";
|
||||
|
||||
minimumSupportedOcamlVersion = "4.02";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/janestreet/${name}/archive/${version}.tar.gz";
|
||||
url = "https://github.com/janestreet/js-build-tools/archive/${version}.tar.gz";
|
||||
sha256 = "1nvgyp4gsnlnpix3li6kr90b12iin5ihichv298p03i6h2809dia";
|
||||
};
|
||||
|
||||
|
@ -19,7 +19,7 @@ buildOcaml rec {
|
|||
dontAddStaticConfigureFlags = true;
|
||||
configurePlatforms = [];
|
||||
configurePhase = "./configure --prefix $prefix";
|
||||
installPhase = "opaline -prefix $prefix -libdir $OCAMLFIND_DESTDIR ${name}.install";
|
||||
installPhase = "opaline -prefix $prefix -libdir $OCAMLFIND_DESTDIR js-build-tools.install";
|
||||
|
||||
patches = [ ./js-build-tools-darwin.patch ];
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{lib, buildOcaml, fetchurl, type_conv, pa_ounit}:
|
||||
|
||||
buildOcaml rec {
|
||||
name = "pa_bench";
|
||||
pname = "pa_bench";
|
||||
version = "113.00.00";
|
||||
|
||||
minimumSupportedOcamlVersion = "4.00";
|
||||
|
|
|
@ -5,7 +5,7 @@ then throw "pa_ounit is not available for OCaml ${ocaml.version}"
|
|||
else
|
||||
|
||||
buildOcaml rec {
|
||||
name = "pa_ounit";
|
||||
pname = "pa_ounit";
|
||||
version = "113.00.00";
|
||||
|
||||
src = fetchurl {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{lib, buildOcaml, fetchurl}:
|
||||
|
||||
buildOcaml rec {
|
||||
name = "pipebang";
|
||||
pname = "pipebang";
|
||||
version = "113.00.00";
|
||||
|
||||
minimumSupportedOcamlVersion = "4.00";
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
buildOcaml rec {
|
||||
minimumSupportedOcamlVersion = "4.02";
|
||||
|
||||
name = "type_conv";
|
||||
pname = "type_conv";
|
||||
version = "113.00.02";
|
||||
|
||||
src = fetchurl {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{ lib, buildOcaml, fetchFromGitHub, type_conv }:
|
||||
|
||||
buildOcaml rec {
|
||||
name = "typerep";
|
||||
pname = "typerep";
|
||||
version = "112.24.00";
|
||||
|
||||
minimumSupportedOcamlVersion = "4.00";
|
||||
|
|
|
@ -5,7 +5,7 @@ then throw "variantslib-109.15.03 is not available for OCaml ${ocaml.version}"
|
|||
else
|
||||
|
||||
buildOcaml rec {
|
||||
name = "variantslib";
|
||||
pname = "variantslib";
|
||||
version = "109.15.03";
|
||||
|
||||
minimumSupportedOcamlVersion = "4.00";
|
||||
|
|
Loading…
Reference in a new issue