git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #74261 from marsam/update-dune

dune: init at 2.1.0

commit8d3199b549b9e5fa734d9f6c5f47a0c975bfce59 authorMario Rodas <marsam@users.noreply.github.com> dateMon 23 Dec 2019, 09:19 (7 years ago) parent73a21075eb4a23
14 files changed+107−49
pkgs/development/ocaml-modules/biniou/default.nix+4−4 pkgs/development/ocaml-modules/dtoa/default.nix+3−3 pkgs/development/ocaml-modules/dune-configurator/default.nix+17 pkgs/development/ocaml-modules/dune-private-libs/default.nix+15 pkgs/development/ocaml-modules/ppx_gen_rec/default.nix+3−3 pkgs/development/ocaml-modules/rope/default.nix+4−4 pkgs/development/ocaml-modules/stdint/default.nix+6−12 pkgs/development/ocaml-modules/wtf8/default.nix+3−3 pkgs/development/tools/ocaml/cppo/default.nix+3−3 pkgs/development/tools/ocaml/dune/2.nix+31 pkgs/development/tools/ocaml/ocp-index/default.nix+6−11 pkgs/development/tools/ocaml/utop/default.nix+3−5 pkgs/top-level/all-packages.nix+1−1 pkgs/top-level/ocaml-packages.nix+8
pkgs/development/ocaml-modules/biniou/default.nix+4−4
@@ -2,13 +2,13 @@
22
33buildDunePackage rec {
44 pname = "biniou";
5− version = "1.2.0";
5+ version = "1.2.1";
66
77 src = fetchFromGitHub {
8− owner = "mjambon";
8+ owner = "ocaml-community";
99 repo = pname;
10− rev = "v${version}";
11− sha256 = "0mjpgwyfq2b2izjw0flmlpvdjgqpq8shs89hxj1np2r50csr8dcb";
10+ rev = version;
11+ sha256 = "0x2kiy809n1j0yf32l7hj102y628jp5jdrkbi3z7ld8jq04h1790";
1212 };
1313
1414 propagatedBuildInputs = [ easy-format ];
pkgs/development/ocaml-modules/dtoa/default.nix+3−3
@@ -2,13 +2,13 @@
22
33buildDunePackage rec {
44 pname = "dtoa";
5− version = "0.3.1";
5+ version = "0.3.2";
66
77 minimumOCamlVersion = "4.02";
88
99 src = fetchurl {
10− url = "https://github.com/flowtype/ocaml-${pname}/releases/download/v${version}/${pname}-${version}.tbz";
11− sha256 = "0rzysj07z2q6gk0yhjxnjnba01vmdb9x32wwna10qk3rrb8r2pnn";
10+ url = "https://github.com/flowtype/ocaml-${pname}/releases/download/v${version}/${pname}-v${version}.tbz";
11+ sha256 = "0zkhn0rdq82g6gamsv6nkx6i44s8104nh6jg5xydazl9jl1704xn";
1212 };
1313
1414 hardeningDisable = stdenv.lib.optional stdenv.isDarwin "strictoverflow";
pkgs/development/ocaml-modules/dune-configurator/default.nixnew file+17
@@ -0,0 +1,17 @@
1+{ lib, buildDunePackage, dune_2, dune-private-libs }:
2+
3+buildDunePackage rec {
4+ pname = "dune-configurator";
5+
6+ inherit (dune_2) src version;
7+
8+ dontAddPrefix = true;
9+
10+ propagatedBuildInputs = [ dune-private-libs ];
11+
12+ meta = with lib; {
13+ description = "Helper library for gathering system configuration";
14+ maintainers = [ maintainers.marsam ];
15+ license = licenses.mit;
16+ };
17+}
pkgs/development/ocaml-modules/dune-private-libs/default.nixnew file+15
@@ -0,0 +1,15 @@
1+{ lib, buildDunePackage, dune_2 }:
2+
3+buildDunePackage rec {
4+ pname = "dune-private-libs";
5+
6+ inherit (dune_2) src version;
7+
8+ dontAddPrefix = true;
9+
10+ meta = with lib; {
11+ description = "Private libraries of Dune";
12+ maintainers = [ maintainers.marsam ];
13+ license = licenses.mit;
14+ };
15+}
pkgs/development/ocaml-modules/ppx_gen_rec/default.nix+3−3
@@ -2,13 +2,13 @@
22
33buildDunePackage rec {
44 pname = "ppx_gen_rec";
5− version = "1.0.0";
5+ version = "1.1.0";
66
77 minimumOCamlVersion = "4.01";
88
99 src = fetchurl {
10− url = "https://github.com/flowtype/ocaml-${pname}/releases/download/v${version}/${pname}-${version}.tbz";
11− sha256 = "0qy0wa3rd5yh1612jijadi1yddfslpsmmmf69phi2dhr3vmkhza7";
10+ url = "https://github.com/flowtype/ocaml-${pname}/releases/download/v${version}/${pname}-v${version}.tbz";
11+ sha256 = "0fwi4bknq8h9zgpsarjvnzdm9bm8qlyyw0lz30pihg02aiiljqbh";
1212 };
1313
1414 buildInputs = [ ocaml-migrate-parsetree ];
pkgs/development/ocaml-modules/rope/default.nix+4−4
@@ -2,10 +2,10 @@
22
33let param =
44 if stdenv.lib.versionAtLeast ocaml.version "4.03"
5− then {
6− version = "0.6.1";
7− url = " https://github.com/Chris00/ocaml-rope/releases/download/0.6.1/rope-0.6.1.tbz";
8− sha256 = "1zqh28jz1zjb0l354wi1046qpkwmk582ssz0gsqh6d44wpspdxk2";
5+ then rec {
6+ version = "0.6.2";
7+ url = "https://github.com/Chris00/ocaml-rope/releases/download/${version}/rope-${version}.tbz";
8+ sha256 = "15cvfa0s1vjx7gjd07d3fkznilishqf4z4h2q5f20wm9ysjh2h2i";
99 buildInputs = [ dune ];
1010 extra = {
1111 buildPhase = "dune build -p rope";
pkgs/development/ocaml-modules/stdint/default.nix+6−12
@@ -1,26 +1,20 @@
1−{ stdenv, fetchFromGitHub, ocaml, findlib, dune }:
1+{ stdenv, fetchFromGitHub, buildDunePackage }:
22
3−stdenv.mkDerivation rec {
3+buildDunePackage rec {
44 pname = "stdint";
5− name = "ocaml${ocaml.version}-${pname}-${version}";
6− version = "0.5.1";
5+ version = "0.6.0";
6+
77 src = fetchFromGitHub {
88 owner = "andrenth";
99 repo = "ocaml-stdint";
1010 rev = version;
11− sha256 = "0z2z77m3clna9m9k0f8fd1400cdlglvy1kr893qs3907b3v0c057";
11+ sha256 = "19ccxs0vij81vyc9nqc9kbr154ralb9dgc2y2nr71a5xkx6xfn0y";
1212 };
1313
14− buildInputs = [ ocaml findlib dune ];
15−
16− buildPhase = "dune build -p ${pname}";
17− inherit (dune) installPhase;
18−
1914 meta = {
2015 description = "Various signed and unsigned integers for OCaml";
16+ homepage = "https://github.com/andrenth/ocaml-stdint";
2117 license = stdenv.lib.licenses.mit;
2218 maintainers = [ stdenv.lib.maintainers.gebner ];
23− inherit (src.meta) homepage;
24− inherit (ocaml.meta) platforms;
2519 };
2620}
pkgs/development/ocaml-modules/wtf8/default.nix+3−3
@@ -2,13 +2,13 @@
22
33buildDunePackage rec {
44 pname = "wtf8";
5− version = "1.0.1";
5+ version = "1.0.2";
66
77 minimumOCamlVersion = "4.02";
88
99 src = fetchurl {
10− url = "https://github.com/flowtype/ocaml-${pname}/releases/download/v${version}/${pname}-${version}.tbz";
11− sha256 = "1msg3vycd3k8qqj61sc23qks541cxpb97vrnrvrhjnqxsqnh6ygq";
10+ url = "https://github.com/flowtype/ocaml-${pname}/releases/download/v${version}/${pname}-v${version}.tbz";
11+ sha256 = "09ygcxxd5warkdzz17rgpidrd0pg14cy2svvnvy1hna080lzg7vp";
1212 };
1313
1414 meta = with stdenv.lib; {
pkgs/development/tools/ocaml/cppo/default.nix+3−3
@@ -7,8 +7,8 @@ assert stdenv.lib.versionAtLeast ocaml.version "3.12";
77
88let param =
99 if stdenv.lib.versionAtLeast ocaml.version "4.02" then {
10− version = "1.6.5";
11− sha256 = "03c0amszy28shinvz61hm340jz446zz5763a1pdqlza36kwcj0p0";
10+ version = "1.6.6";
11+ sha256 = "1smcc0l6fh2n0y6bp96c69j5nw755jja99w0b206wx3yb2m4w2hs";
1212 buildInputs = [ dune ];
1313 extra = {
1414 inherit (dune) installPhase;
@@ -31,7 +31,7 @@ stdenv.mkDerivation ({
3131 name = "${pname}-${param.version}";
3232
3333 src = fetchFromGitHub {
34− owner = "mjambon";
34+ owner = "ocaml-community";
3535 repo = pname;
3636 rev = "v${param.version}";
3737 inherit (param) sha256;
pkgs/development/tools/ocaml/dune/2.nixnew file+31
@@ -0,0 +1,31 @@
1+{ stdenv, fetchurl, ocaml, findlib }:
2+
3+if stdenv.lib.versionOlder ocaml.version "4.07"
4+then throw "dune is not available for OCaml ${ocaml.version}"
5+else
6+
7+stdenv.mkDerivation rec {
8+ pname = "dune";
9+ version = "2.1.0";
10+
11+ src = fetchurl {
12+ url = "https://github.com/ocaml/dune/releases/download/${version}/dune-${version}.tbz";
13+ sha256 = "1hf8c0djx2v1jpjba0z096gw6qdr0igsljrf0qh0ggphg9valsmj";
14+ };
15+
16+ buildInputs = [ ocaml findlib ];
17+
18+ buildFlags = "release";
19+
20+ dontAddPrefix = true;
21+
22+ installFlags = [ "PREFIX=${placeholder "out"}" "LIBDIR=$(OCAMLFIND_DESTDIR)" ];
23+
24+ meta = {
25+ homepage = "https://dune.build/";
26+ description = "A composable build system";
27+ maintainers = [ stdenv.lib.maintainers.vbgl stdenv.lib.maintainers.marsam ];
28+ license = stdenv.lib.licenses.mit;
29+ inherit (ocaml.meta) platforms;
30+ };
31+}
pkgs/development/tools/ocaml/ocp-index/default.nix+6−11
@@ -1,29 +1,24 @@
1−{ stdenv, fetchFromGitHub, ocaml, findlib, dune, ocp-build, ocp-indent, cmdliner, re }:
2−
3−stdenv.mkDerivation rec {
1+{ stdenv, fetchFromGitHub, buildDunePackage, ocp-build, ocp-indent, cmdliner, re, }:
42
3+buildDunePackage rec {
4+ pname = "ocp-index";
55 version = "1.1.9";
6− name = "ocaml${ocaml.version}-ocp-index-${version}";
76
87 src = fetchFromGitHub {
98 owner = "OCamlPro";
10− repo = "ocp-index";
9+ repo = pname;
1110 rev = version;
1211 sha256 = "0dq1kap16xfajc6gg9hbiadax782winpvxnr3dkm2ncznnxds37p";
1312 };
1413
15− buildInputs = [ ocaml findlib dune ocp-build cmdliner re ];
16− propagatedBuildInputs = [ ocp-indent ];
17−
18− buildPhase = "dune build -p ocp-index";
14+ buildInputs = [ ocp-build cmdliner re ];
1915
20− inherit (dune) installPhase;
16+ propagatedBuildInputs = [ ocp-indent ];
2117
2218 meta = {
2319 homepage = http://typerex.ocamlpro.com/ocp-index.html;
2420 description = "A simple and light-weight documentation extractor for OCaml";
2521 license = stdenv.lib.licenses.lgpl3;
26− platforms = ocaml.meta.platforms or [];
2722 maintainers = with stdenv.lib.maintainers; [ vbgl ];
2823 };
2924}
pkgs/development/tools/ocaml/utop/default.nix+3−5
@@ -1,12 +1,12 @@
11{ stdenv, fetchurl, ocaml, findlib, dune
2−, lambdaTerm, cppo, makeWrapper
2+, lambdaTerm, cppo, makeWrapper, buildDunePackage
33}:
44
55if !stdenv.lib.versionAtLeast ocaml.version "4.03"
66then throw "utop is not available for OCaml ${ocaml.version}"
77else
88
9−stdenv.mkDerivation rec {
9+buildDunePackage rec {
1010 pname = "utop";
1111 version = "2.4.2";
1212
@@ -16,12 +16,10 @@ stdenv.mkDerivation rec {
1616 };
1717
1818 nativeBuildInputs = [ makeWrapper ];
19− buildInputs = [ ocaml findlib cppo dune ];
19+ buildInputs = [ cppo ];
2020
2121 propagatedBuildInputs = [ lambdaTerm ];
2222
23− inherit (dune) installPhase;
24−
2523 postFixup =
2624 let
2725 path = "etc/utop/env";
pkgs/top-level/all-packages.nix+1−1
@@ -1614,7 +1614,7 @@ in
16141614
16151615 dua = callPackage ../tools/misc/dua { };
16161616
1617− inherit (ocamlPackages) dune;
1617+ inherit (ocamlPackages) dune dune_2;
16181618
16191619 duperemove = callPackage ../tools/filesystems/duperemove { };
16201620
pkgs/top-level/ocaml-packages.nix+8
@@ -16,6 +16,8 @@ let
1616
1717 buildDunePackage = callPackage ../build-support/ocaml/dune.nix {};
1818
19+ buildDune2Package = buildDunePackage.override { dune = dune_2; };
20+
1921 alcotest = callPackage ../development/ocaml-modules/alcotest {};
2022
2123 alcotest-lwt = callPackage ../development/ocaml-modules/alcotest/lwt.nix {};
@@ -239,6 +241,12 @@ let
239241
240242 dune = callPackage ../development/tools/ocaml/dune { };
241243
244+ dune_2 = callPackage ../development/tools/ocaml/dune/2.nix { };
245+
246+ dune-configurator = callPackage ../development/ocaml-modules/dune-configurator { buildDunePackage = buildDune2Package; };
247+
248+ dune-private-libs = callPackage ../development/ocaml-modules/dune-private-libs { buildDunePackage = buildDune2Package; };
249+
242250 earley = callPackage ../development/ocaml-modules/earley { };
243251
244252 earlybird = callPackage ../development/ocaml-modules/earlybird { };