about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/tools/ocaml/js_of_ocaml/default.nix
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2020-07-13 23:20:04 +0000
committerAlyssa Ross <hi@alyssa.is>2020-07-13 23:21:06 +0000
commita42c1d6d62656dcf9bd85de620f2e200a5ad22d8 (patch)
tree7d481fea9872f62a034452612be17f4494159baa /nixpkgs/pkgs/development/tools/ocaml/js_of_ocaml/default.nix
parent55f69a6b0e53c1c4b3e0396937c53bf5662b5519 (diff)
parent9480bae337095fd24f61380bce3174fdfe926a00 (diff)
downloadnixlib-a42c1d6d62656dcf9bd85de620f2e200a5ad22d8.tar
nixlib-a42c1d6d62656dcf9bd85de620f2e200a5ad22d8.tar.gz
nixlib-a42c1d6d62656dcf9bd85de620f2e200a5ad22d8.tar.bz2
nixlib-a42c1d6d62656dcf9bd85de620f2e200a5ad22d8.tar.lz
nixlib-a42c1d6d62656dcf9bd85de620f2e200a5ad22d8.tar.xz
nixlib-a42c1d6d62656dcf9bd85de620f2e200a5ad22d8.tar.zst
nixlib-a42c1d6d62656dcf9bd85de620f2e200a5ad22d8.zip
Merge commit '9480bae337095fd24f61380bce3174fdfe926a00'
This is the last nixos-unstable release before 13b2903169f, which I'm a
bit nervous about.  So I want the update including that one to be as
small as possible, hence going to this one first.
Diffstat (limited to 'nixpkgs/pkgs/development/tools/ocaml/js_of_ocaml/default.nix')
-rw-r--r--nixpkgs/pkgs/development/tools/ocaml/js_of_ocaml/default.nix42
1 files changed, 10 insertions, 32 deletions
diff --git a/nixpkgs/pkgs/development/tools/ocaml/js_of_ocaml/default.nix b/nixpkgs/pkgs/development/tools/ocaml/js_of_ocaml/default.nix
index 7f6426c9610d..9ca6ca67421f 100644
--- a/nixpkgs/pkgs/development/tools/ocaml/js_of_ocaml/default.nix
+++ b/nixpkgs/pkgs/development/tools/ocaml/js_of_ocaml/default.nix
@@ -1,40 +1,18 @@
-{ stdenv, fetchurl, ocaml, findlib, lwt, menhir, ocsigen_deriving, ppx_deriving, camlp4, ocamlbuild
-, cmdliner, tyxml, reactivedata, cppo, which, base64, uchar, yojson
+{ stdenv, ocaml, findlib, dune, js_of_ocaml-compiler
+, ocaml-migrate-parsetree, ppx_tools_versioned, uchar
 }:
 
-let version = if stdenv.lib.versionAtLeast ocaml.version "4.02"
-  then "2.8.4" else "2.7";
-in
-
 stdenv.mkDerivation {
-  pname = "js_of_ocaml";
-  inherit version;
-  src = fetchurl {
-    url = "https://github.com/ocsigen/js_of_ocaml/archive/${version}.tar.gz";
-    sha256 = {
-      "2.7" = "1dali1akyd4zmkwav0d957ynxq2jj6cc94r4xiaql7ca89ajz4jj";
-      "2.8.4" = "098ph50s9kqw6rc3qjn39zv9b5swdf4qr44afwqfkkjgjs5d7vbl";
-    }.${version};
-  };
+  pname = "js_of_ocaml"; 
+
+  inherit (js_of_ocaml-compiler) version src installPhase meta;
 
-  buildInputs = [ ocaml findlib menhir ocsigen_deriving ocamlbuild
-                 cmdliner reactivedata cppo which base64 ]
-  ++ stdenv.lib.optionals (stdenv.lib.versionAtLeast ocaml.version "4.02") [ yojson tyxml ];
-  propagatedBuildInputs = [ lwt camlp4 ppx_deriving ]
-  ++ stdenv.lib.optional (version == "2.8.4") uchar;
+  buildInputs = [ findlib ocaml-migrate-parsetree ppx_tools_versioned ];
+  nativeBuildInputs = [ ocaml findlib dune ];
 
-  patches = [ ./Makefile.conf.diff ];
+  postPatch = "patchShebangs lib/generate_stubs.sh";
 
-  createFindlibDestdir = true;
+	propagatedBuildInputs = [ js_of_ocaml-compiler uchar ];
 
-  meta = with stdenv.lib; {
-    homepage = "http://ocsigen.org/js_of_ocaml/";
-    description = "Compiler of OCaml bytecode to Javascript. It makes it possible to run Ocaml programs in a Web browser";
-    license = licenses.lgpl2;
-    platforms = ocaml.meta.platforms or [];
-    maintainers = [
-      maintainers.gal_bolle
-    ];
-    broken = versionAtLeast ocaml.version "4.05";
-  };
+	buildPhase = "dune build -p js_of_ocaml";
 }