Merge pull request #74261 from marsam/update-dune

dune: init at 2.1.0
This commit is contained in:
Mario Rodas 2019-12-23 09:19:21 -05:00 committed by GitHub
commit 8d3199b549
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 107 additions and 49 deletions

View file

@ -2,13 +2,13 @@
buildDunePackage rec { buildDunePackage rec {
pname = "biniou"; pname = "biniou";
version = "1.2.0"; version = "1.2.1";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "mjambon"; owner = "ocaml-community";
repo = pname; repo = pname;
rev = "v${version}"; rev = version;
sha256 = "0mjpgwyfq2b2izjw0flmlpvdjgqpq8shs89hxj1np2r50csr8dcb"; sha256 = "0x2kiy809n1j0yf32l7hj102y628jp5jdrkbi3z7ld8jq04h1790";
}; };
propagatedBuildInputs = [ easy-format ]; propagatedBuildInputs = [ easy-format ];

View file

@ -2,13 +2,13 @@
buildDunePackage rec { buildDunePackage rec {
pname = "dtoa"; pname = "dtoa";
version = "0.3.1"; version = "0.3.2";
minimumOCamlVersion = "4.02"; minimumOCamlVersion = "4.02";
src = fetchurl { src = fetchurl {
url = "https://github.com/flowtype/ocaml-${pname}/releases/download/v${version}/${pname}-${version}.tbz"; url = "https://github.com/flowtype/ocaml-${pname}/releases/download/v${version}/${pname}-v${version}.tbz";
sha256 = "0rzysj07z2q6gk0yhjxnjnba01vmdb9x32wwna10qk3rrb8r2pnn"; sha256 = "0zkhn0rdq82g6gamsv6nkx6i44s8104nh6jg5xydazl9jl1704xn";
}; };
hardeningDisable = stdenv.lib.optional stdenv.isDarwin "strictoverflow"; hardeningDisable = stdenv.lib.optional stdenv.isDarwin "strictoverflow";

View file

@ -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;
};
}

View file

@ -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;
};
}

View file

@ -2,13 +2,13 @@
buildDunePackage rec { buildDunePackage rec {
pname = "ppx_gen_rec"; pname = "ppx_gen_rec";
version = "1.0.0"; version = "1.1.0";
minimumOCamlVersion = "4.01"; minimumOCamlVersion = "4.01";
src = fetchurl { src = fetchurl {
url = "https://github.com/flowtype/ocaml-${pname}/releases/download/v${version}/${pname}-${version}.tbz"; url = "https://github.com/flowtype/ocaml-${pname}/releases/download/v${version}/${pname}-v${version}.tbz";
sha256 = "0qy0wa3rd5yh1612jijadi1yddfslpsmmmf69phi2dhr3vmkhza7"; sha256 = "0fwi4bknq8h9zgpsarjvnzdm9bm8qlyyw0lz30pihg02aiiljqbh";
}; };
buildInputs = [ ocaml-migrate-parsetree ]; buildInputs = [ ocaml-migrate-parsetree ];

View file

@ -2,10 +2,10 @@
let param = let param =
if stdenv.lib.versionAtLeast ocaml.version "4.03" if stdenv.lib.versionAtLeast ocaml.version "4.03"
then { then rec {
version = "0.6.1"; version = "0.6.2";
url = " https://github.com/Chris00/ocaml-rope/releases/download/0.6.1/rope-0.6.1.tbz"; url = "https://github.com/Chris00/ocaml-rope/releases/download/${version}/rope-${version}.tbz";
sha256 = "1zqh28jz1zjb0l354wi1046qpkwmk582ssz0gsqh6d44wpspdxk2"; sha256 = "15cvfa0s1vjx7gjd07d3fkznilishqf4z4h2q5f20wm9ysjh2h2i";
buildInputs = [ dune ]; buildInputs = [ dune ];
extra = { extra = {
buildPhase = "dune build -p rope"; buildPhase = "dune build -p rope";

View file

@ -1,26 +1,20 @@
{ stdenv, fetchFromGitHub, ocaml, findlib, dune }: { stdenv, fetchFromGitHub, buildDunePackage }:
stdenv.mkDerivation rec { buildDunePackage rec {
pname = "stdint"; pname = "stdint";
name = "ocaml${ocaml.version}-${pname}-${version}"; version = "0.6.0";
version = "0.5.1";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "andrenth"; owner = "andrenth";
repo = "ocaml-stdint"; repo = "ocaml-stdint";
rev = version; rev = version;
sha256 = "0z2z77m3clna9m9k0f8fd1400cdlglvy1kr893qs3907b3v0c057"; sha256 = "19ccxs0vij81vyc9nqc9kbr154ralb9dgc2y2nr71a5xkx6xfn0y";
}; };
buildInputs = [ ocaml findlib dune ];
buildPhase = "dune build -p ${pname}";
inherit (dune) installPhase;
meta = { meta = {
description = "Various signed and unsigned integers for OCaml"; description = "Various signed and unsigned integers for OCaml";
homepage = "https://github.com/andrenth/ocaml-stdint";
license = stdenv.lib.licenses.mit; license = stdenv.lib.licenses.mit;
maintainers = [ stdenv.lib.maintainers.gebner ]; maintainers = [ stdenv.lib.maintainers.gebner ];
inherit (src.meta) homepage;
inherit (ocaml.meta) platforms;
}; };
} }

View file

@ -2,13 +2,13 @@
buildDunePackage rec { buildDunePackage rec {
pname = "wtf8"; pname = "wtf8";
version = "1.0.1"; version = "1.0.2";
minimumOCamlVersion = "4.02"; minimumOCamlVersion = "4.02";
src = fetchurl { src = fetchurl {
url = "https://github.com/flowtype/ocaml-${pname}/releases/download/v${version}/${pname}-${version}.tbz"; url = "https://github.com/flowtype/ocaml-${pname}/releases/download/v${version}/${pname}-v${version}.tbz";
sha256 = "1msg3vycd3k8qqj61sc23qks541cxpb97vrnrvrhjnqxsqnh6ygq"; sha256 = "09ygcxxd5warkdzz17rgpidrd0pg14cy2svvnvy1hna080lzg7vp";
}; };
meta = with stdenv.lib; { meta = with stdenv.lib; {

View file

@ -7,8 +7,8 @@ assert stdenv.lib.versionAtLeast ocaml.version "3.12";
let param = let param =
if stdenv.lib.versionAtLeast ocaml.version "4.02" then { if stdenv.lib.versionAtLeast ocaml.version "4.02" then {
version = "1.6.5"; version = "1.6.6";
sha256 = "03c0amszy28shinvz61hm340jz446zz5763a1pdqlza36kwcj0p0"; sha256 = "1smcc0l6fh2n0y6bp96c69j5nw755jja99w0b206wx3yb2m4w2hs";
buildInputs = [ dune ]; buildInputs = [ dune ];
extra = { extra = {
inherit (dune) installPhase; inherit (dune) installPhase;
@ -31,7 +31,7 @@ stdenv.mkDerivation ({
name = "${pname}-${param.version}"; name = "${pname}-${param.version}";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "mjambon"; owner = "ocaml-community";
repo = pname; repo = pname;
rev = "v${param.version}"; rev = "v${param.version}";
inherit (param) sha256; inherit (param) sha256;

View file

@ -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;
};
}

View file

@ -1,29 +1,24 @@
{ stdenv, fetchFromGitHub, ocaml, findlib, dune, ocp-build, ocp-indent, cmdliner, re }: { stdenv, fetchFromGitHub, buildDunePackage, ocp-build, ocp-indent, cmdliner, re, }:
stdenv.mkDerivation rec {
buildDunePackage rec {
pname = "ocp-index";
version = "1.1.9"; version = "1.1.9";
name = "ocaml${ocaml.version}-ocp-index-${version}";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "OCamlPro"; owner = "OCamlPro";
repo = "ocp-index"; repo = pname;
rev = version; rev = version;
sha256 = "0dq1kap16xfajc6gg9hbiadax782winpvxnr3dkm2ncznnxds37p"; sha256 = "0dq1kap16xfajc6gg9hbiadax782winpvxnr3dkm2ncznnxds37p";
}; };
buildInputs = [ ocaml findlib dune ocp-build cmdliner re ]; buildInputs = [ ocp-build cmdliner re ];
propagatedBuildInputs = [ ocp-indent ]; propagatedBuildInputs = [ ocp-indent ];
buildPhase = "dune build -p ocp-index";
inherit (dune) installPhase;
meta = { meta = {
homepage = http://typerex.ocamlpro.com/ocp-index.html; homepage = http://typerex.ocamlpro.com/ocp-index.html;
description = "A simple and light-weight documentation extractor for OCaml"; description = "A simple and light-weight documentation extractor for OCaml";
license = stdenv.lib.licenses.lgpl3; license = stdenv.lib.licenses.lgpl3;
platforms = ocaml.meta.platforms or [];
maintainers = with stdenv.lib.maintainers; [ vbgl ]; maintainers = with stdenv.lib.maintainers; [ vbgl ];
}; };
} }

View file

@ -1,12 +1,12 @@
{ stdenv, fetchurl, ocaml, findlib, dune { stdenv, fetchurl, ocaml, findlib, dune
, lambdaTerm, cppo, makeWrapper , lambdaTerm, cppo, makeWrapper, buildDunePackage
}: }:
if !stdenv.lib.versionAtLeast ocaml.version "4.03" if !stdenv.lib.versionAtLeast ocaml.version "4.03"
then throw "utop is not available for OCaml ${ocaml.version}" then throw "utop is not available for OCaml ${ocaml.version}"
else else
stdenv.mkDerivation rec { buildDunePackage rec {
pname = "utop"; pname = "utop";
version = "2.4.2"; version = "2.4.2";
@ -16,12 +16,10 @@ stdenv.mkDerivation rec {
}; };
nativeBuildInputs = [ makeWrapper ]; nativeBuildInputs = [ makeWrapper ];
buildInputs = [ ocaml findlib cppo dune ]; buildInputs = [ cppo ];
propagatedBuildInputs = [ lambdaTerm ]; propagatedBuildInputs = [ lambdaTerm ];
inherit (dune) installPhase;
postFixup = postFixup =
let let
path = "etc/utop/env"; path = "etc/utop/env";

View file

@ -1614,7 +1614,7 @@ in
dua = callPackage ../tools/misc/dua { }; dua = callPackage ../tools/misc/dua { };
inherit (ocamlPackages) dune; inherit (ocamlPackages) dune dune_2;
duperemove = callPackage ../tools/filesystems/duperemove { }; duperemove = callPackage ../tools/filesystems/duperemove { };

View file

@ -16,6 +16,8 @@ let
buildDunePackage = callPackage ../build-support/ocaml/dune.nix {}; buildDunePackage = callPackage ../build-support/ocaml/dune.nix {};
buildDune2Package = buildDunePackage.override { dune = dune_2; };
alcotest = callPackage ../development/ocaml-modules/alcotest {}; alcotest = callPackage ../development/ocaml-modules/alcotest {};
alcotest-lwt = callPackage ../development/ocaml-modules/alcotest/lwt.nix {}; alcotest-lwt = callPackage ../development/ocaml-modules/alcotest/lwt.nix {};
@ -239,6 +241,12 @@ let
dune = callPackage ../development/tools/ocaml/dune { }; 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 { }; earley = callPackage ../development/ocaml-modules/earley { };
earlybird = callPackage ../development/ocaml-modules/earlybird { }; earlybird = callPackage ../development/ocaml-modules/earlybird { };