summary refs log tree commit diff
diff options
context:
space:
mode:
authorMarek Fajkus <marek.faj@gmail.com>2020-08-07 20:59:51 +0200
committerJon <jonringer@users.noreply.github.com>2020-09-08 13:28:55 -0700
commitf1e071e0481be2ba7659e41100745c9deca8d9ee (patch)
tree32437d7a1ae3792e5e517b6ab66df5c13a4bb347
parentdf767479723f3497767b8c629ef3ebefcefe1743 (diff)
downloadnixpkgs-f1e071e0481be2ba7659e41100745c9deca8d9ee.tar
nixpkgs-f1e071e0481be2ba7659e41100745c9deca8d9ee.tar.gz
nixpkgs-f1e071e0481be2ba7659e41100745c9deca8d9ee.tar.bz2
nixpkgs-f1e071e0481be2ba7659e41100745c9deca8d9ee.tar.lz
nixpkgs-f1e071e0481be2ba7659e41100745c9deca8d9ee.tar.xz
nixpkgs-f1e071e0481be2ba7659e41100745c9deca8d9ee.tar.zst
nixpkgs-f1e071e0481be2ba7659e41100745c9deca8d9ee.zip
bs-platform: 7.3.2 -> 8.2.0
-rw-r--r--pkgs/development/compilers/bs-platform/build-bs-platform.nix7
-rw-r--r--pkgs/development/compilers/bs-platform/default.nix6
-rw-r--r--pkgs/development/compilers/bs-platform/jscomp-release-ninja.patch16
3 files changed, 24 insertions, 5 deletions
diff --git a/pkgs/development/compilers/bs-platform/build-bs-platform.nix b/pkgs/development/compilers/bs-platform/build-bs-platform.nix
index 71ba415d620..18c61d0d923 100644
--- a/pkgs/development/compilers/bs-platform/build-bs-platform.nix
+++ b/pkgs/development/compilers/bs-platform/build-bs-platform.nix
@@ -3,6 +3,7 @@
 
 { stdenv, fetchFromGitHub, ninja, runCommand, nodejs, python3,
   ocaml-version, version, src,
+  patches ? [],
   ocaml ? (import ./ocaml.nix {
     version = ocaml-version;
     inherit stdenv;
@@ -22,7 +23,7 @@ let
 in
 
 stdenv.mkDerivation rec {
-  inherit src version;
+  inherit src version patches;
   pname = "bs-platform";
 
   BS_RELEASE_BUILD = "true";
@@ -34,7 +35,7 @@ stdenv.mkDerivation rec {
 
   buildInputs = [ nodejs python3 custom-ninja ];
 
-  patchPhase = ''
+  prePatch = ''
     sed -i 's:./configure.py --bootstrap:python3 ./configure.py --bootstrap:' ./scripts/install.js
     mkdir -p ./native/${ocaml-version}/bin
     ln -sf ${ocaml}/bin/*  ./native/${ocaml-version}/bin
@@ -46,7 +47,7 @@ stdenv.mkDerivation rec {
   buildPhase = ''
     # This is an unfortunate name, but it's actually how to build a release
     # binary for BuckleScript
-    node scripts/install.js
+    npm run postinstall
   '';
 
   installPhase = ''
diff --git a/pkgs/development/compilers/bs-platform/default.nix b/pkgs/development/compilers/bs-platform/default.nix
index 0fd696c69f0..18436bca347 100644
--- a/pkgs/development/compilers/bs-platform/default.nix
+++ b/pkgs/development/compilers/bs-platform/default.nix
@@ -4,14 +4,16 @@ let
 in
 (build-bs-platform rec {
   inherit stdenv runCommand fetchFromGitHub ninja nodejs python3;
-  version = "7.3.2";
+  version = "8.2.0";
   ocaml-version = "4.06.1";
 
+  patches = [ ./jscomp-release-ninja.patch ];
+
   src = fetchFromGitHub {
     owner = "BuckleScript";
     repo = "bucklescript";
     rev = version;
-    sha256 = "1nvp7wiiv149r4qf9bgc84bm4w7s44sjq9i7j103v24wllzz218s";
+    sha256 = "1hql7sxps1k17zmwyha6idq6nw20abpq770l55ry722birclmsmf";
     fetchSubmodules = true;
   };
 }).overrideAttrs (attrs: {
diff --git a/pkgs/development/compilers/bs-platform/jscomp-release-ninja.patch b/pkgs/development/compilers/bs-platform/jscomp-release-ninja.patch
new file mode 100644
index 00000000000..96235f92131
--- /dev/null
+++ b/pkgs/development/compilers/bs-platform/jscomp-release-ninja.patch
@@ -0,0 +1,16 @@
+ jscomp/others/release.ninja | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/jscomp/others/release.ninja b/jscomp/others/release.ninja
+index 9ea6d11c5..a91ed9c80 100644
+--- a/jscomp/others/release.ninja
++++ b/jscomp/others/release.ninja
+@@ -30,7 +30,7 @@ build others/js_json.cmj : cc_cmi others/js_json.ml | others/js_array2.cmj other
+ build others/js_json.cmi : cc others/js_json.mli | others/js_dict.cmi others/js_null.cmi others/js_string.cmj others/js_types.cmi runtime
+ build others/js_list.cmj : cc_cmi others/js_list.ml | others/js_array2.cmj others/js_list.cmi others/js_vector.cmj runtime
+ build others/js_list.cmi : cc others/js_list.mli | others/js_vector.cmi runtime
+-build others/js_mapperRt.cmj : cc_cmi others/js_mapperRt.ml | others/js_mapperRt.cmi runtime
++build others/js_mapperRt.cmj : cc_cmi others/js_mapperRt.ml | others/js_array2.cmj others/js_mapperRt.cmi runtime
+ build others/js_mapperRt.cmi : cc others/js_mapperRt.mli | runtime
+ build others/js_math.cmi others/js_math.cmj : cc others/js_math.ml | others/js_int.cmj runtime
+ build others/js_null.cmj : cc_cmi others/js_null.ml | others/js_exn.cmj others/js_null.cmi runtime
\ No newline at end of file