summary refs log tree commit diff
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2021-11-13 13:30:16 +0100
committerGitHub <noreply@github.com>2021-11-13 13:30:16 +0100
commit594fa6aea6019fab70647c84b502d3cf8361c5ee (patch)
treed1c15cf3cac2d0a1752361db1fa0279fea310f47
parent6b46e6b0f0e5c5bf794b6ff8d213b766a0f2ed70 (diff)
parente601787f7ef196994efd1af403c135682cc4c0a7 (diff)
downloadnixpkgs-594fa6aea6019fab70647c84b502d3cf8361c5ee.tar
nixpkgs-594fa6aea6019fab70647c84b502d3cf8361c5ee.tar.gz
nixpkgs-594fa6aea6019fab70647c84b502d3cf8361c5ee.tar.bz2
nixpkgs-594fa6aea6019fab70647c84b502d3cf8361c5ee.tar.lz
nixpkgs-594fa6aea6019fab70647c84b502d3cf8361c5ee.tar.xz
nixpkgs-594fa6aea6019fab70647c84b502d3cf8361c5ee.tar.zst
nixpkgs-594fa6aea6019fab70647c84b502d3cf8361c5ee.zip
Merge pull request #143994 from Stunkymonkey/ocaml-pname
-rw-r--r--pkgs/build-support/ocaml/default.nix6
-rw-r--r--pkgs/development/ocaml-modules/bin_prot/default.nix2
-rw-r--r--pkgs/development/ocaml-modules/comparelib/default.nix2
-rw-r--r--pkgs/development/ocaml-modules/estring/default.nix2
-rw-r--r--pkgs/development/ocaml-modules/faillib/default.nix2
-rw-r--r--pkgs/development/ocaml-modules/herelib/default.nix2
-rw-r--r--pkgs/development/ocaml-modules/janestreet/buildOcamlJane.nix18
-rw-r--r--pkgs/development/ocaml-modules/janestreet/js-build-tools.nix6
-rw-r--r--pkgs/development/ocaml-modules/pa_bench/default.nix2
-rw-r--r--pkgs/development/ocaml-modules/pa_ounit/default.nix2
-rw-r--r--pkgs/development/ocaml-modules/pipebang/default.nix2
-rw-r--r--pkgs/development/ocaml-modules/type_conv/112.01.01.nix2
-rw-r--r--pkgs/development/ocaml-modules/typerep/default.nix2
-rw-r--r--pkgs/development/ocaml-modules/variantslib/default.nix2
14 files changed, 29 insertions, 23 deletions
diff --git a/pkgs/build-support/ocaml/default.nix b/pkgs/build-support/ocaml/default.nix
index cd17eb688c2..1fe99bb6320 100644
--- a/pkgs/build-support/ocaml/default.nix
+++ b/pkgs/build-support/ocaml/default.nix
@@ -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;
 
diff --git a/pkgs/development/ocaml-modules/bin_prot/default.nix b/pkgs/development/ocaml-modules/bin_prot/default.nix
index 50ef935aff6..3aa7cf0ec13 100644
--- a/pkgs/development/ocaml-modules/bin_prot/default.nix
+++ b/pkgs/development/ocaml-modules/bin_prot/default.nix
@@ -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";
diff --git a/pkgs/development/ocaml-modules/comparelib/default.nix b/pkgs/development/ocaml-modules/comparelib/default.nix
index addba7a4b34..a1371e4f4d5 100644
--- a/pkgs/development/ocaml-modules/comparelib/default.nix
+++ b/pkgs/development/ocaml-modules/comparelib/default.nix
@@ -1,7 +1,7 @@
 {lib, buildOcaml, fetchurl, type_conv}:
 
 buildOcaml rec {
-  name = "comparelib";
+  pname = "comparelib";
   version = "113.00.00";
 
   minimumSupportedOcamlVersion = "4.00";
diff --git a/pkgs/development/ocaml-modules/estring/default.nix b/pkgs/development/ocaml-modules/estring/default.nix
index 7424d14220d..c0cc3398763 100644
--- a/pkgs/development/ocaml-modules/estring/default.nix
+++ b/pkgs/development/ocaml-modules/estring/default.nix
@@ -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 {
diff --git a/pkgs/development/ocaml-modules/faillib/default.nix b/pkgs/development/ocaml-modules/faillib/default.nix
index 63040fadda5..e2d90e06bdb 100644
--- a/pkgs/development/ocaml-modules/faillib/default.nix
+++ b/pkgs/development/ocaml-modules/faillib/default.nix
@@ -6,7 +6,7 @@ else
 
 buildOcaml rec {
   minimumSupportedOcamlVersion = "4.00";
-  name = "faillib";
+  pname = "faillib";
   version = "111.17.00";
 
   src = fetchurl {
diff --git a/pkgs/development/ocaml-modules/herelib/default.nix b/pkgs/development/ocaml-modules/herelib/default.nix
index c5223637a15..b6f05fc46af 100644
--- a/pkgs/development/ocaml-modules/herelib/default.nix
+++ b/pkgs/development/ocaml-modules/herelib/default.nix
@@ -2,7 +2,7 @@
 
 buildOcaml rec {
   version = "112.35.00";
-  name = "herelib";
+  pname = "herelib";
 
   minimumSupportedOcamlVersion = "4.00";
 
diff --git a/pkgs/development/ocaml-modules/janestreet/buildOcamlJane.nix b/pkgs/development/ocaml-modules/janestreet/buildOcamlJane.nix
index 62876e5eaf9..13fcdff3923 100644
--- a/pkgs/development/ocaml-modules/janestreet/buildOcamlJane.nix
+++ b/pkgs/development/ocaml-modules/janestreet/buildOcamlJane.nix
@@ -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
+  '';
 
 })
diff --git a/pkgs/development/ocaml-modules/janestreet/js-build-tools.nix b/pkgs/development/ocaml-modules/janestreet/js-build-tools.nix
index 2f68ee8230e..4186b0649ba 100644
--- a/pkgs/development/ocaml-modules/janestreet/js-build-tools.nix
+++ b/pkgs/development/ocaml-modules/janestreet/js-build-tools.nix
@@ -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 ];
 
diff --git a/pkgs/development/ocaml-modules/pa_bench/default.nix b/pkgs/development/ocaml-modules/pa_bench/default.nix
index e5f9ac52067..a2de553961a 100644
--- a/pkgs/development/ocaml-modules/pa_bench/default.nix
+++ b/pkgs/development/ocaml-modules/pa_bench/default.nix
@@ -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";
diff --git a/pkgs/development/ocaml-modules/pa_ounit/default.nix b/pkgs/development/ocaml-modules/pa_ounit/default.nix
index 26d00004222..a9e49bab34a 100644
--- a/pkgs/development/ocaml-modules/pa_ounit/default.nix
+++ b/pkgs/development/ocaml-modules/pa_ounit/default.nix
@@ -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 {
diff --git a/pkgs/development/ocaml-modules/pipebang/default.nix b/pkgs/development/ocaml-modules/pipebang/default.nix
index 36eb3fe54bb..96cfc82bc2f 100644
--- a/pkgs/development/ocaml-modules/pipebang/default.nix
+++ b/pkgs/development/ocaml-modules/pipebang/default.nix
@@ -1,7 +1,7 @@
 {lib, buildOcaml, fetchurl}:
 
 buildOcaml rec {
-  name = "pipebang";
+  pname = "pipebang";
   version = "113.00.00";
 
   minimumSupportedOcamlVersion = "4.00";
diff --git a/pkgs/development/ocaml-modules/type_conv/112.01.01.nix b/pkgs/development/ocaml-modules/type_conv/112.01.01.nix
index 3fa9042b035..c71bfa00e7e 100644
--- a/pkgs/development/ocaml-modules/type_conv/112.01.01.nix
+++ b/pkgs/development/ocaml-modules/type_conv/112.01.01.nix
@@ -3,7 +3,7 @@
 buildOcaml rec {
   minimumSupportedOcamlVersion = "4.02";
 
-  name = "type_conv";
+  pname = "type_conv";
   version = "113.00.02";
 
   src = fetchurl {
diff --git a/pkgs/development/ocaml-modules/typerep/default.nix b/pkgs/development/ocaml-modules/typerep/default.nix
index 5a38bd708f7..c51d28f9e19 100644
--- a/pkgs/development/ocaml-modules/typerep/default.nix
+++ b/pkgs/development/ocaml-modules/typerep/default.nix
@@ -1,7 +1,7 @@
 { lib, buildOcaml, fetchFromGitHub, type_conv }:
 
 buildOcaml rec {
-  name = "typerep";
+  pname = "typerep";
   version = "112.24.00";
 
   minimumSupportedOcamlVersion = "4.00";
diff --git a/pkgs/development/ocaml-modules/variantslib/default.nix b/pkgs/development/ocaml-modules/variantslib/default.nix
index aaddda3c11b..25d379f5164 100644
--- a/pkgs/development/ocaml-modules/variantslib/default.nix
+++ b/pkgs/development/ocaml-modules/variantslib/default.nix
@@ -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";