From 2b0fc36c9005006d6170f56e4a0e006ce00ed44c Mon Sep 17 00:00:00 2001 From: sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> Date: Mon, 7 Dec 2020 00:42:51 +0100 Subject: [PATCH] ocamlPackages.js_of_ocaml*: 3.7.0 -> 3.8.0 ocamlPackages.js_of_ocaml*: use buildDunePackage to fix installation ocamlPackages.js_of_ocaml*: fix style for editorconfig Closes #106343 --- .../tools/ocaml/js_of_ocaml/camlp4.nix | 26 +++++++-------- .../tools/ocaml/js_of_ocaml/compiler.nix | 32 +++++++++---------- .../tools/ocaml/js_of_ocaml/default.nix | 17 ++++------ .../tools/ocaml/js_of_ocaml/lwt.nix | 15 ++++----- .../tools/ocaml/js_of_ocaml/ocamlbuild.nix | 14 +++----- .../tools/ocaml/js_of_ocaml/ppx.nix | 14 ++++---- .../ocaml/js_of_ocaml/ppx_deriving_json.nix | 18 +++-------- .../tools/ocaml/js_of_ocaml/tyxml.nix | 16 ++++------ 8 files changed, 64 insertions(+), 88 deletions(-) diff --git a/pkgs/development/tools/ocaml/js_of_ocaml/camlp4.nix b/pkgs/development/tools/ocaml/js_of_ocaml/camlp4.nix index e9e7f9d279ea..a08aaac832e3 100644 --- a/pkgs/development/tools/ocaml/js_of_ocaml/camlp4.nix +++ b/pkgs/development/tools/ocaml/js_of_ocaml/camlp4.nix @@ -1,21 +1,19 @@ -{ stdenv, fetchFromGitHub, ocaml, findlib, dune, js_of_ocaml-compiler +{ buildDunePackage, fetchFromGitHub, js_of_ocaml-compiler , camlp4, ocsigen_deriving }: -stdenv.mkDerivation rec { - version = "3.2.1"; - pname = "js_of_ocaml-camlp4"; +buildDunePackage rec { + version = "3.2.1"; + pname = "js_of_ocaml-camlp4"; - src = fetchFromGitHub { - owner = "ocsigen"; - repo = "js_of_ocaml"; - rev = version; - sha256 = "1v2hfq0ra9j07yz6pj6m03hrvgys4vmx0gclchv94yywpb2wc7ik"; - }; + src = fetchFromGitHub { + owner = "ocsigen"; + repo = "js_of_ocaml"; + rev = version; + sha256 = "1v2hfq0ra9j07yz6pj6m03hrvgys4vmx0gclchv94yywpb2wc7ik"; + }; - inherit (js_of_ocaml-compiler) installPhase meta; + inherit (js_of_ocaml-compiler) meta; - buildInputs = [ ocaml findlib dune camlp4 ocsigen_deriving ]; - - buildPhase = "dune build -p js_of_ocaml-camlp4"; + buildInputs = [ camlp4 ocsigen_deriving ]; } diff --git a/pkgs/development/tools/ocaml/js_of_ocaml/compiler.nix b/pkgs/development/tools/ocaml/js_of_ocaml/compiler.nix index 6bad201cc4c9..f1398c2f7c7d 100644 --- a/pkgs/development/tools/ocaml/js_of_ocaml/compiler.nix +++ b/pkgs/development/tools/ocaml/js_of_ocaml/compiler.nix @@ -1,28 +1,28 @@ { lib, fetchurl, buildDunePackage -, ocaml, findlib, cmdliner, dune_2, cppo, yojson, ocaml-migrate-parsetree +, cmdliner, cppo, yojson, ppxlib , menhir }: buildDunePackage rec { - pname = "js_of_ocaml-compiler"; - version = "3.7.1"; - useDune2 = true; + pname = "js_of_ocaml-compiler"; + version = "3.8.0"; + useDune2 = true; - src = fetchurl { - url = "https://github.com/ocsigen/js_of_ocaml/releases/download/${version}/js_of_ocaml-${version}.tbz"; - sha256 = "0i0smhvsfx2ydmbyg5ai5cgqsfnng8rkcvys4i3fa55cw24aknrn"; - }; + src = fetchurl { + url = "https://github.com/ocsigen/js_of_ocaml/releases/download/${version}/js_of_ocaml-${version}.tbz"; + sha256 = "069jyiayxcgwnips3adxb3d53mzd4rrq2783b9fgmsiyzm545lcy"; + }; - nativeBuildInputs = [ ocaml findlib dune_2 cppo menhir ]; + nativeBuildInputs = [ cppo menhir ]; buildInputs = [ cmdliner ]; configurePlatforms = []; - propagatedBuildInputs = [ yojson ocaml-migrate-parsetree ]; + propagatedBuildInputs = [ yojson ppxlib ]; - meta = { - description = "Compiler from OCaml bytecode to Javascript"; - license = lib.licenses.gpl2; - maintainers = [ lib.maintainers.vbgl ]; - homepage = "https://ocsigen.org/js_of_ocaml/"; - }; + meta = { + description = "Compiler from OCaml bytecode to Javascript"; + license = lib.licenses.gpl2; + maintainers = [ lib.maintainers.vbgl ]; + homepage = "https://ocsigen.org/js_of_ocaml/"; + }; } diff --git a/pkgs/development/tools/ocaml/js_of_ocaml/default.nix b/pkgs/development/tools/ocaml/js_of_ocaml/default.nix index 9a57b590d6cf..25826e94eb3a 100644 --- a/pkgs/development/tools/ocaml/js_of_ocaml/default.nix +++ b/pkgs/development/tools/ocaml/js_of_ocaml/default.nix @@ -1,16 +1,13 @@ -{ stdenv, ocaml, findlib, dune_2, js_of_ocaml-compiler -, ocaml-migrate-parsetree, ppx_tools_versioned, uchar +{ buildDunePackage, js_of_ocaml-compiler +, ppxlib, uchar }: -stdenv.mkDerivation { - pname = "js_of_ocaml"; +buildDunePackage { + pname = "js_of_ocaml"; - inherit (js_of_ocaml-compiler) version src installPhase meta; + inherit (js_of_ocaml-compiler) version src meta useDune2; - buildInputs = [ findlib ocaml-migrate-parsetree ppx_tools_versioned ]; - nativeBuildInputs = [ ocaml findlib dune_2 ]; + buildInputs = [ ppxlib ]; - propagatedBuildInputs = [ js_of_ocaml-compiler uchar ]; - - buildPhase = "dune build -p js_of_ocaml"; + propagatedBuildInputs = [ js_of_ocaml-compiler uchar ]; } diff --git a/pkgs/development/tools/ocaml/js_of_ocaml/lwt.nix b/pkgs/development/tools/ocaml/js_of_ocaml/lwt.nix index 2ad8578894f5..81b1a41614b0 100644 --- a/pkgs/development/tools/ocaml/js_of_ocaml/lwt.nix +++ b/pkgs/development/tools/ocaml/js_of_ocaml/lwt.nix @@ -1,16 +1,13 @@ -{ stdenv, ocaml, findlib, dune_2, js_of_ocaml-compiler, js_of_ocaml-ppx -, ocaml-migrate-parsetree, ppx_tools_versioned +{ buildDunePackage, js_of_ocaml-compiler, js_of_ocaml-ppx , js_of_ocaml, ocaml_lwt, lwt_log }: -stdenv.mkDerivation { - pname = "js_of_ocaml-lwt"; +buildDunePackage { + pname = "js_of_ocaml-lwt"; - inherit (js_of_ocaml-compiler) version src installPhase meta; + inherit (js_of_ocaml-compiler) version src meta useDune2; - buildInputs = [ ocaml findlib dune_2 js_of_ocaml-ppx ocaml-migrate-parsetree ppx_tools_versioned ]; + buildInputs = [ js_of_ocaml-ppx ]; - propagatedBuildInputs = [ js_of_ocaml ocaml_lwt lwt_log ]; - - buildPhase = "dune build -p js_of_ocaml-lwt"; + propagatedBuildInputs = [ js_of_ocaml ocaml_lwt lwt_log ]; } diff --git a/pkgs/development/tools/ocaml/js_of_ocaml/ocamlbuild.nix b/pkgs/development/tools/ocaml/js_of_ocaml/ocamlbuild.nix index 50bcd69eb66a..6abb1ac1b3ae 100644 --- a/pkgs/development/tools/ocaml/js_of_ocaml/ocamlbuild.nix +++ b/pkgs/development/tools/ocaml/js_of_ocaml/ocamlbuild.nix @@ -1,15 +1,11 @@ -{ stdenv, ocaml, findlib, dune_2, js_of_ocaml-compiler +{ buildDunePackage, js_of_ocaml-compiler , ocamlbuild }: -stdenv.mkDerivation { - pname = "js_of_ocaml-ocamlbuild"; +buildDunePackage { + pname = "js_of_ocaml-ocamlbuild"; - inherit (js_of_ocaml-compiler) version src installPhase meta; + inherit (js_of_ocaml-compiler) version src meta useDune2; - buildInputs = [ ocaml findlib dune_2 ]; - - propagatedBuildInputs = [ ocamlbuild ]; - - buildPhase = "dune build -p js_of_ocaml-ocamlbuild"; + propagatedBuildInputs = [ ocamlbuild ]; } diff --git a/pkgs/development/tools/ocaml/js_of_ocaml/ppx.nix b/pkgs/development/tools/ocaml/js_of_ocaml/ppx.nix index 69783c7eada1..b29ef435e46c 100644 --- a/pkgs/development/tools/ocaml/js_of_ocaml/ppx.nix +++ b/pkgs/development/tools/ocaml/js_of_ocaml/ppx.nix @@ -1,14 +1,12 @@ -{ stdenv, ocaml, findlib, dune_2, js_of_ocaml-compiler -, ocaml-migrate-parsetree, ppx_tools_versioned +{ buildDunePackage, js_of_ocaml-compiler +, ppxlib , js_of_ocaml }: -stdenv.mkDerivation { - pname = "js_of_ocaml-ppx"; +buildDunePackage { + pname = "js_of_ocaml-ppx"; - inherit (js_of_ocaml-compiler) version src installPhase meta; + inherit (js_of_ocaml-compiler) version src meta useDune2; - buildInputs = [ ocaml findlib dune_2 ocaml-migrate-parsetree ppx_tools_versioned js_of_ocaml ]; - - buildPhase = "dune build -p js_of_ocaml-ppx"; + buildInputs = [ ppxlib js_of_ocaml ]; } diff --git a/pkgs/development/tools/ocaml/js_of_ocaml/ppx_deriving_json.nix b/pkgs/development/tools/ocaml/js_of_ocaml/ppx_deriving_json.nix index 8cf05c2a98d5..d862d4bc67b7 100644 --- a/pkgs/development/tools/ocaml/js_of_ocaml/ppx_deriving_json.nix +++ b/pkgs/development/tools/ocaml/js_of_ocaml/ppx_deriving_json.nix @@ -1,19 +1,11 @@ -{ stdenv, ocaml, findlib, dune_2, js_of_ocaml-compiler +{ buildDunePackage, js_of_ocaml-compiler , js_of_ocaml, ppxlib }: -if !stdenv.lib.versionAtLeast ppxlib.version "0.14" -then throw "js_of_ocaml-ppx_deriving_json is not compatible with ppxlib ${ppxlib.version}" -else +buildDunePackage { + pname = "js_of_ocaml-ppx_deriving_json"; -stdenv.mkDerivation { - pname = "js_of_ocaml-ppx_deriving_json"; + inherit (js_of_ocaml-compiler) version src meta useDune2; - inherit (js_of_ocaml-compiler) version src installPhase meta; - - buildInputs = [ ocaml findlib dune_2 ]; - - propagatedBuildInputs = [ js_of_ocaml ppxlib ]; - - buildPhase = "dune build -p js_of_ocaml-ppx_deriving_json"; + propagatedBuildInputs = [ js_of_ocaml ppxlib ]; } diff --git a/pkgs/development/tools/ocaml/js_of_ocaml/tyxml.nix b/pkgs/development/tools/ocaml/js_of_ocaml/tyxml.nix index fcfeeaf8d99a..7082e4b86c97 100644 --- a/pkgs/development/tools/ocaml/js_of_ocaml/tyxml.nix +++ b/pkgs/development/tools/ocaml/js_of_ocaml/tyxml.nix @@ -1,16 +1,14 @@ -{ stdenv, ocaml, findlib, dune_2, js_of_ocaml-compiler -, js_of_ocaml-ppx, ocaml-migrate-parsetree, ppx_tools_versioned +{ buildDunePackage, js_of_ocaml-compiler +, js_of_ocaml-ppx , js_of_ocaml, reactivedata, tyxml }: -stdenv.mkDerivation { - pname = "js_of_ocaml-tyxml"; +buildDunePackage { + pname = "js_of_ocaml-tyxml"; - inherit (js_of_ocaml-compiler) version src installPhase meta; + inherit (js_of_ocaml-compiler) version src meta useDune2; - buildInputs = [ ocaml findlib dune_2 js_of_ocaml-ppx ocaml-migrate-parsetree ppx_tools_versioned ]; + buildInputs = [ js_of_ocaml-ppx ]; - propagatedBuildInputs = [ js_of_ocaml reactivedata tyxml ]; - - buildPhase = "dune build -p js_of_ocaml-tyxml"; + propagatedBuildInputs = [ js_of_ocaml reactivedata tyxml ]; }