Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dune: init at 2.1.0 #74261

Merged
merged 12 commits into from Dec 23, 2019
8 changes: 4 additions & 4 deletions pkgs/development/ocaml-modules/biniou/default.nix
Expand Up @@ -2,13 +2,13 @@

buildDunePackage rec {
pname = "biniou";
version = "1.2.0";
version = "1.2.1";

src = fetchFromGitHub {
owner = "mjambon";
owner = "ocaml-community";
repo = pname;
rev = "v${version}";
sha256 = "0mjpgwyfq2b2izjw0flmlpvdjgqpq8shs89hxj1np2r50csr8dcb";
rev = version;
sha256 = "0x2kiy809n1j0yf32l7hj102y628jp5jdrkbi3z7ld8jq04h1790";
};

propagatedBuildInputs = [ easy-format ];
Expand Down
6 changes: 3 additions & 3 deletions pkgs/development/ocaml-modules/dtoa/default.nix
Expand Up @@ -2,13 +2,13 @@

buildDunePackage rec {
pname = "dtoa";
version = "0.3.1";
version = "0.3.2";

minimumOCamlVersion = "4.02";

src = fetchurl {
url = "https://github.com/flowtype/ocaml-${pname}/releases/download/v${version}/${pname}-${version}.tbz";
sha256 = "0rzysj07z2q6gk0yhjxnjnba01vmdb9x32wwna10qk3rrb8r2pnn";
url = "https://github.com/flowtype/ocaml-${pname}/releases/download/v${version}/${pname}-v${version}.tbz";
sha256 = "0zkhn0rdq82g6gamsv6nkx6i44s8104nh6jg5xydazl9jl1704xn";
};

hardeningDisable = stdenv.lib.optional stdenv.isDarwin "strictoverflow";
Expand Down
17 changes: 17 additions & 0 deletions pkgs/development/ocaml-modules/dune-configurator/default.nix
@@ -0,0 +1,17 @@
{ lib, buildDunePackage, dune_2, dune-private-libs }:

buildDunePackage rec {
pname = "dune-configurator";

inherit (dune_2) src version;

dontAddPrefix = true;

propagatedBuildInputs = [ dune-private-libs ];

meta = with lib; {
description = "Helper library for gathering system configuration";
maintainers = [ maintainers.marsam ];
license = licenses.mit;
};
}
15 changes: 15 additions & 0 deletions pkgs/development/ocaml-modules/dune-private-libs/default.nix
@@ -0,0 +1,15 @@
{ lib, buildDunePackage, dune_2 }:

buildDunePackage rec {
pname = "dune-private-libs";

inherit (dune_2) src version;

dontAddPrefix = true;

meta = with lib; {
description = "Private libraries of Dune";
maintainers = [ maintainers.marsam ];
license = licenses.mit;
};
}
6 changes: 3 additions & 3 deletions pkgs/development/ocaml-modules/ppx_gen_rec/default.nix
Expand Up @@ -2,13 +2,13 @@

buildDunePackage rec {
pname = "ppx_gen_rec";
version = "1.0.0";
version = "1.1.0";

minimumOCamlVersion = "4.01";

src = fetchurl {
url = "https://github.com/flowtype/ocaml-${pname}/releases/download/v${version}/${pname}-${version}.tbz";
sha256 = "0qy0wa3rd5yh1612jijadi1yddfslpsmmmf69phi2dhr3vmkhza7";
url = "https://github.com/flowtype/ocaml-${pname}/releases/download/v${version}/${pname}-v${version}.tbz";
sha256 = "0fwi4bknq8h9zgpsarjvnzdm9bm8qlyyw0lz30pihg02aiiljqbh";
};

buildInputs = [ ocaml-migrate-parsetree ];
Expand Down
8 changes: 4 additions & 4 deletions pkgs/development/ocaml-modules/rope/default.nix
Expand Up @@ -2,10 +2,10 @@

let param =
if stdenv.lib.versionAtLeast ocaml.version "4.03"
then {
version = "0.6.1";
url = " https://github.com/Chris00/ocaml-rope/releases/download/0.6.1/rope-0.6.1.tbz";
sha256 = "1zqh28jz1zjb0l354wi1046qpkwmk582ssz0gsqh6d44wpspdxk2";
then rec {
version = "0.6.2";
url = "https://github.com/Chris00/ocaml-rope/releases/download/${version}/rope-${version}.tbz";
sha256 = "15cvfa0s1vjx7gjd07d3fkznilishqf4z4h2q5f20wm9ysjh2h2i";
buildInputs = [ dune ];
extra = {
buildPhase = "dune build -p rope";
Expand Down
18 changes: 6 additions & 12 deletions pkgs/development/ocaml-modules/stdint/default.nix
@@ -1,26 +1,20 @@
{ stdenv, fetchFromGitHub, ocaml, findlib, dune }:
{ stdenv, fetchFromGitHub, buildDunePackage }:

stdenv.mkDerivation rec {
buildDunePackage rec {
pname = "stdint";
name = "ocaml${ocaml.version}-${pname}-${version}";
version = "0.5.1";
version = "0.6.0";

src = fetchFromGitHub {
owner = "andrenth";
repo = "ocaml-stdint";
rev = version;
sha256 = "0z2z77m3clna9m9k0f8fd1400cdlglvy1kr893qs3907b3v0c057";
sha256 = "19ccxs0vij81vyc9nqc9kbr154ralb9dgc2y2nr71a5xkx6xfn0y";
};

buildInputs = [ ocaml findlib dune ];

buildPhase = "dune build -p ${pname}";
inherit (dune) installPhase;

meta = {
description = "Various signed and unsigned integers for OCaml";
homepage = "https://github.com/andrenth/ocaml-stdint";
license = stdenv.lib.licenses.mit;
maintainers = [ stdenv.lib.maintainers.gebner ];
inherit (src.meta) homepage;
inherit (ocaml.meta) platforms;
};
}
6 changes: 3 additions & 3 deletions pkgs/development/ocaml-modules/wtf8/default.nix
Expand Up @@ -2,13 +2,13 @@

buildDunePackage rec {
pname = "wtf8";
version = "1.0.1";
version = "1.0.2";

minimumOCamlVersion = "4.02";

src = fetchurl {
url = "https://github.com/flowtype/ocaml-${pname}/releases/download/v${version}/${pname}-${version}.tbz";
sha256 = "1msg3vycd3k8qqj61sc23qks541cxpb97vrnrvrhjnqxsqnh6ygq";
url = "https://github.com/flowtype/ocaml-${pname}/releases/download/v${version}/${pname}-v${version}.tbz";
sha256 = "09ygcxxd5warkdzz17rgpidrd0pg14cy2svvnvy1hna080lzg7vp";
};

meta = with stdenv.lib; {
Expand Down
6 changes: 3 additions & 3 deletions pkgs/development/tools/ocaml/cppo/default.nix
Expand Up @@ -7,8 +7,8 @@ assert stdenv.lib.versionAtLeast ocaml.version "3.12";

let param =
if stdenv.lib.versionAtLeast ocaml.version "4.02" then {
version = "1.6.5";
sha256 = "03c0amszy28shinvz61hm340jz446zz5763a1pdqlza36kwcj0p0";
version = "1.6.6";
sha256 = "1smcc0l6fh2n0y6bp96c69j5nw755jja99w0b206wx3yb2m4w2hs";
buildInputs = [ dune ];
extra = {
inherit (dune) installPhase;
Expand All @@ -31,7 +31,7 @@ stdenv.mkDerivation ({
name = "${pname}-${param.version}";

src = fetchFromGitHub {
owner = "mjambon";
owner = "ocaml-community";
repo = pname;
rev = "v${param.version}";
inherit (param) sha256;
Expand Down
31 changes: 31 additions & 0 deletions pkgs/development/tools/ocaml/dune/2.nix
@@ -0,0 +1,31 @@
{ stdenv, fetchurl, ocaml, findlib }:

if stdenv.lib.versionOlder ocaml.version "4.07"
then throw "dune is not available for OCaml ${ocaml.version}"
else

stdenv.mkDerivation rec {
pname = "dune";
version = "2.1.0";

src = fetchurl {
url = "https://github.com/ocaml/dune/releases/download/${version}/dune-${version}.tbz";
sha256 = "1hf8c0djx2v1jpjba0z096gw6qdr0igsljrf0qh0ggphg9valsmj";
};

buildInputs = [ ocaml findlib ];

buildFlags = "release";

dontAddPrefix = true;

installFlags = [ "PREFIX=${placeholder "out"}" "LIBDIR=$(OCAMLFIND_DESTDIR)" ];

meta = {
homepage = "https://dune.build/";
description = "A composable build system";
maintainers = [ stdenv.lib.maintainers.vbgl stdenv.lib.maintainers.marsam ];
license = stdenv.lib.licenses.mit;
inherit (ocaml.meta) platforms;
};
}
17 changes: 6 additions & 11 deletions pkgs/development/tools/ocaml/ocp-index/default.nix
@@ -1,29 +1,24 @@
{ stdenv, fetchFromGitHub, ocaml, findlib, dune, ocp-build, ocp-indent, cmdliner, re }:

stdenv.mkDerivation rec {
{ stdenv, fetchFromGitHub, buildDunePackage, ocp-build, ocp-indent, cmdliner, re, }:

buildDunePackage rec {
pname = "ocp-index";
version = "1.1.9";
name = "ocaml${ocaml.version}-ocp-index-${version}";

src = fetchFromGitHub {
owner = "OCamlPro";
repo = "ocp-index";
repo = pname;
rev = version;
sha256 = "0dq1kap16xfajc6gg9hbiadax782winpvxnr3dkm2ncznnxds37p";
};

buildInputs = [ ocaml findlib dune ocp-build cmdliner re ];
propagatedBuildInputs = [ ocp-indent ];

buildPhase = "dune build -p ocp-index";
buildInputs = [ ocp-build cmdliner re ];

inherit (dune) installPhase;
propagatedBuildInputs = [ ocp-indent ];

meta = {
homepage = http://typerex.ocamlpro.com/ocp-index.html;
description = "A simple and light-weight documentation extractor for OCaml";
license = stdenv.lib.licenses.lgpl3;
platforms = ocaml.meta.platforms or [];
maintainers = with stdenv.lib.maintainers; [ vbgl ];
};
}
8 changes: 3 additions & 5 deletions pkgs/development/tools/ocaml/utop/default.nix
@@ -1,12 +1,12 @@
{ stdenv, fetchurl, ocaml, findlib, dune
, lambdaTerm, cppo, makeWrapper
, lambdaTerm, cppo, makeWrapper, buildDunePackage
}:

if !stdenv.lib.versionAtLeast ocaml.version "4.03"
then throw "utop is not available for OCaml ${ocaml.version}"
else

stdenv.mkDerivation rec {
buildDunePackage rec {
pname = "utop";
version = "2.4.2";

Expand All @@ -16,12 +16,10 @@ stdenv.mkDerivation rec {
};

nativeBuildInputs = [ makeWrapper ];
buildInputs = [ ocaml findlib cppo dune ];
buildInputs = [ cppo ];

propagatedBuildInputs = [ lambdaTerm ];

inherit (dune) installPhase;

postFixup =
let
path = "etc/utop/env";
Expand Down
2 changes: 1 addition & 1 deletion pkgs/top-level/all-packages.nix
Expand Up @@ -1614,7 +1614,7 @@ in

dua = callPackage ../tools/misc/dua { };

inherit (ocamlPackages) dune;
inherit (ocamlPackages) dune dune_2;

duperemove = callPackage ../tools/filesystems/duperemove { };

Expand Down
8 changes: 8 additions & 0 deletions pkgs/top-level/ocaml-packages.nix
Expand Up @@ -16,6 +16,8 @@ let

buildDunePackage = callPackage ../build-support/ocaml/dune.nix {};

buildDune2Package = buildDunePackage.override { dune = dune_2; };

alcotest = callPackage ../development/ocaml-modules/alcotest {};

angstrom = callPackage ../development/ocaml-modules/angstrom { };
Expand Down Expand Up @@ -237,6 +239,12 @@ let

dune = callPackage ../development/tools/ocaml/dune { };

dune_2 = callPackage ../development/tools/ocaml/dune/2.nix { };

dune-configurator = callPackage ../development/ocaml-modules/dune-configurator { buildDunePackage = buildDune2Package; };

dune-private-libs = callPackage ../development/ocaml-modules/dune-private-libs { buildDunePackage = buildDune2Package; };

earley = callPackage ../development/ocaml-modules/earley { };

earlybird = callPackage ../development/ocaml-modules/earlybird { };
Expand Down