about summary refs log tree commit diff
path: root/pkgs/development/compilers/bs-platform
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/compilers/bs-platform')
-rw-r--r--pkgs/development/compilers/bs-platform/build-bs-platform.nix66
-rw-r--r--pkgs/development/compilers/bs-platform/default.nix27
-rw-r--r--pkgs/development/compilers/bs-platform/jscomp-release-ninja.patch16
-rw-r--r--pkgs/development/compilers/bs-platform/ocaml.nix23
4 files changed, 0 insertions, 132 deletions
diff --git a/pkgs/development/compilers/bs-platform/build-bs-platform.nix b/pkgs/development/compilers/bs-platform/build-bs-platform.nix
deleted file mode 100644
index 1097e7d3f81f..000000000000
--- a/pkgs/development/compilers/bs-platform/build-bs-platform.nix
+++ /dev/null
@@ -1,66 +0,0 @@
-# This file is based on https://github.com/turboMaCk/bs-platform.nix/blob/master/build-bs-platform.nix
-# to make potential future updates simpler
-
-{ lib, stdenv, ninja, runCommand, nodejs, python3,
-  ocaml-version, version, src,
-  patches ? [],
-  ocaml ? (import ./ocaml.nix {
-    version = ocaml-version;
-    inherit lib stdenv;
-    src = "${src}/ocaml";
-  }),
-  custom-ninja ? (ninja.overrideAttrs (attrs: {
-    src = runCommand "ninja-patched-source" {} ''
-      mkdir -p $out
-      tar zxvf ${src}/vendor/ninja.tar.gz -C $out
-    '';
-    patches = [];
-  })),
-  ...
-}:
-
-let
-  bin_folder = if stdenv.isDarwin then "darwin" else "linux";
-in
-
-stdenv.mkDerivation rec {
-  inherit src version patches;
-  pname = "bs-platform";
-
-  BS_RELEASE_BUILD = "true";
-
-  # BuckleScript's idiosyncratic build process only builds artifacts required
-  # for editor-tooling to work when this environment variable is set:
-  # https://github.com/BuckleScript/bucklescript/blob/7.2.0/scripts/install.js#L225-L227
-  BS_TRAVIS_CI = "1";
-
-  buildInputs = [ nodejs python3 custom-ninja ];
-
-  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
-  '';
-
-  # avoid building the development version, will break aarch64 build
-  dontConfigure = true;
-
-  buildPhase = ''
-    # This is an unfortunate name, but it's actually how to build a release
-    # binary for BuckleScript
-    npm run postinstall
-  '';
-
-  installPhase = ''
-    mkdir -p $out/bin
-    cp -rf jscomp lib ${bin_folder} vendor odoc_gen native bsb bsc bsrefmt $out
-    mkdir -p $out/lib/ocaml
-    cp jscomp/runtime/js.* jscomp/runtime/*.cm* $out/lib/ocaml
-    cp jscomp/others/*.ml jscomp/others/*.mli jscomp/others/*.cm* $out/lib/ocaml
-    cp jscomp/stdlib-406/*.ml jscomp/stdlib-406/*.mli jscomp/stdlib-406/*.cm* $out/lib/ocaml
-    cp bsconfig.json package.json $out
-    ln -s $out/bsb $out/bin/bsb
-    ln -s $out/bsc $out/bin/bsc
-    ln -s $out/bsrefmt $out/bin/bsrefmt
-  '';
-}
diff --git a/pkgs/development/compilers/bs-platform/default.nix b/pkgs/development/compilers/bs-platform/default.nix
deleted file mode 100644
index a1b8ad550ac3..000000000000
--- a/pkgs/development/compilers/bs-platform/default.nix
+++ /dev/null
@@ -1,27 +0,0 @@
-{ lib, stdenv, runCommand, fetchFromGitHub, ninja, nodejs, python3, ... }:
-let
-  build-bs-platform = import ./build-bs-platform.nix;
-in
-(build-bs-platform rec {
-  inherit lib stdenv runCommand fetchFromGitHub ninja nodejs python3;
-  version = "8.2.0";
-  ocaml-version = "4.06.1";
-
-  patches = [ ./jscomp-release-ninja.patch ];
-
-  src = fetchFromGitHub {
-    owner = "BuckleScript";
-    repo = "bucklescript";
-    rev = version;
-    sha256 = "1hql7sxps1k17zmwyha6idq6nw20abpq770l55ry722birclmsmf";
-    fetchSubmodules = true;
-  };
-}).overrideAttrs (attrs: {
-  meta = with lib; {
-    description = "JavaScript backend for OCaml focused on smooth integration and clean generated code";
-    homepage = "https://bucklescript.github.io";
-    license = licenses.lgpl3;
-    maintainers = with maintainers; [ turbomack gamb ];
-    platforms = platforms.all;
-  };
-})
diff --git a/pkgs/development/compilers/bs-platform/jscomp-release-ninja.patch b/pkgs/development/compilers/bs-platform/jscomp-release-ninja.patch
deleted file mode 100644
index 96235f921317..000000000000
--- a/pkgs/development/compilers/bs-platform/jscomp-release-ninja.patch
+++ /dev/null
@@ -1,16 +0,0 @@
- 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
diff --git a/pkgs/development/compilers/bs-platform/ocaml.nix b/pkgs/development/compilers/bs-platform/ocaml.nix
deleted file mode 100644
index 206a3aff61cb..000000000000
--- a/pkgs/development/compilers/bs-platform/ocaml.nix
+++ /dev/null
@@ -1,23 +0,0 @@
-{ lib, stdenv, src, version }:
-stdenv.mkDerivation rec {
-  inherit src version;
-  pname = "ocaml-bs";
-  configurePhase = ''
-    ./configure -prefix $out
-  '';
-
-  # Workaround ocaml-4.06 limitation of duplicate definitions.
-  #   ld: libcamlrun.a(minor_gc.o):/build/ocaml/byterun/caml/major_gc.h:67: multiple definition of
-  #     `caml_major_ring'; libcamlrun.a(stacks.o):/build/ocaml/byterun/caml/major_gc.h:67: first defined here
-  # Match -fcommon workaround in ocaml-4.06 itself.
-  env.NIX_CFLAGS_COMPILE = "-fcommon";
-
-  buildPhase = ''
-    make -j9 world.opt
-  '';
-
-  meta = with lib; {
-    branch = "4.06";
-    platforms = platforms.all;
-  };
-}