From af34e3be8c7d11b89779ccb5617c0c5f843dda6b Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Mon, 5 Sep 2022 16:54:37 +0200 Subject: [PATCH] ocamlPackages.cmdliner: default to 1.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ocamlPackages.alcotest: 1.5.0 → 1.6.0 ocamlPackages.crowbar: 0.2 → 0.2.1 ocamlPackages.dune-release: 1.5.1 → 1.6.2 ocamlPackages.functoria: 3.1.1 → 4.2.0 ocamlPackages.mirage: 3.10.7 → 4.2.0 ocamlPackages.irmin-pack: disable checks ocamlPackages.mdx: disable checks ocamlPackages.git-unix: mark as broken --- .../science/logic/acgtk/default.nix | 2 +- .../science/logic/alt-ergo/default.nix | 2 +- .../ocaml-modules/alcotest/default.nix | 12 +++++----- .../ocaml-modules/alcotest/lwt.nix | 6 ++--- .../ocaml-modules/alcotest/mirage.nix | 2 +- .../ocaml-modules/cooltt/default.nix | 4 ++-- .../ocaml-modules/crowbar/default.nix | 9 ++------ .../ocaml-modules/crowbar/pprint.patch | 22 ------------------- .../ocaml-modules/dedukti/default.nix | 4 ++-- .../ocaml-modules/functoria/default.nix | 19 +++++++--------- .../ocaml-modules/functoria/runtime.nix | 6 ++--- pkgs/development/ocaml-modules/git/unix.nix | 2 ++ pkgs/development/ocaml-modules/irmin/pack.nix | 3 ++- .../ocaml-modules/lambdapi/default.nix | 6 ++--- .../development/ocaml-modules/mdx/default.nix | 4 ++-- .../ocaml-modules/mirage/default.nix | 7 +++--- .../ocaml-modules/mirage/runtime.nix | 17 +++++--------- .../ocaml-modules/mirage/types-lwt.nix | 13 ----------- .../ocaml-modules/mirage/types.nix | 19 ---------------- .../tools/ocaml/crunch/default.nix | 6 +++-- .../tools/ocaml/dune-release/default.nix | 17 +++----------- pkgs/top-level/ocaml-packages.nix | 13 +++++------ 22 files changed, 57 insertions(+), 138 deletions(-) delete mode 100644 pkgs/development/ocaml-modules/crowbar/pprint.patch delete mode 100644 pkgs/development/ocaml-modules/mirage/types-lwt.nix delete mode 100644 pkgs/development/ocaml-modules/mirage/types.nix diff --git a/pkgs/applications/science/logic/acgtk/default.nix b/pkgs/applications/science/logic/acgtk/default.nix index 4ccf01d0ec6..d4f0ac3e504 100644 --- a/pkgs/applications/science/logic/acgtk/default.nix +++ b/pkgs/applications/science/logic/acgtk/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation { }; buildInputs = [ dune_2 ] ++ (with ocamlPackages; [ - ocaml findlib ansiterminal cairo2 cmdliner_1_1 fmt logs menhir menhirLib mtime sedlex yojson + ocaml findlib ansiterminal cairo2 cmdliner fmt logs menhir menhirLib mtime sedlex yojson ]); buildPhase = "dune build --profile=release"; diff --git a/pkgs/applications/science/logic/alt-ergo/default.nix b/pkgs/applications/science/logic/alt-ergo/default.nix index e5aee4d140a..d7396d5d9a6 100644 --- a/pkgs/applications/science/logic/alt-ergo/default.nix +++ b/pkgs/applications/science/logic/alt-ergo/default.nix @@ -38,7 +38,7 @@ ocamlPackages.buildDunePackage { configureFlags = [ pname ]; nativeBuildInputs = [ which ocamlPackages.menhir ]; - buildInputs = [ alt-ergo-parsers ocamlPackages.cmdliner_1_1 ]; + buildInputs = [ alt-ergo-parsers ocamlPackages.cmdliner ]; meta = { description = "High-performance theorem prover and SMT solver"; diff --git a/pkgs/development/ocaml-modules/alcotest/default.nix b/pkgs/development/ocaml-modules/alcotest/default.nix index c54deed737a..5280f90c75a 100644 --- a/pkgs/development/ocaml-modules/alcotest/default.nix +++ b/pkgs/development/ocaml-modules/alcotest/default.nix @@ -1,21 +1,19 @@ { lib, buildDunePackage, fetchurl -, astring, cmdliner, fmt, uuidm, re, stdlib-shims, uutf, ocaml-syntax-shims +, astring, cmdliner, fmt, re, stdlib-shims, uutf, ocaml-syntax-shims }: buildDunePackage rec { pname = "alcotest"; - version = "1.5.0"; - - useDune2 = true; + version = "1.6.0"; src = fetchurl { - url = "https://github.com/mirage/alcotest/releases/download/${version}/alcotest-js-${version}.tbz"; - sha256 = "sha256-VCgZB+AteJld8kbcLhDtGCgoKUrSBZNHoeOhM1SEj2w="; + url = "https://github.com/mirage/alcotest/releases/download/${version}/alcotest-${version}.tbz"; + sha256 = "sha256-/QD5ZoOVh0/zsdfvVm0U78Avp900Ej6yXVk1W+lLIyk="; }; nativeBuildInputs = [ ocaml-syntax-shims ]; - propagatedBuildInputs = [ astring cmdliner fmt uuidm re stdlib-shims uutf ]; + propagatedBuildInputs = [ astring cmdliner fmt re stdlib-shims uutf ]; doCheck = true; diff --git a/pkgs/development/ocaml-modules/alcotest/lwt.nix b/pkgs/development/ocaml-modules/alcotest/lwt.nix index 5a57dc0fcc2..c52079f5ccb 100644 --- a/pkgs/development/ocaml-modules/alcotest/lwt.nix +++ b/pkgs/development/ocaml-modules/alcotest/lwt.nix @@ -1,13 +1,13 @@ -{ lib, buildDunePackage, alcotest, logs, ocaml_lwt, fmt +{ lib, buildDunePackage, alcotest, logs, lwt, fmt , re, cmdliner }: buildDunePackage { pname = "alcotest-lwt"; - inherit (alcotest) version src useDune2; + inherit (alcotest) version src; - propagatedBuildInputs = [ alcotest logs ocaml_lwt fmt ]; + propagatedBuildInputs = [ alcotest logs lwt fmt ]; doCheck = true; checkInputs = [ re cmdliner ]; diff --git a/pkgs/development/ocaml-modules/alcotest/mirage.nix b/pkgs/development/ocaml-modules/alcotest/mirage.nix index b4ba4246b2c..dcf6533cdab 100644 --- a/pkgs/development/ocaml-modules/alcotest/mirage.nix +++ b/pkgs/development/ocaml-modules/alcotest/mirage.nix @@ -3,7 +3,7 @@ buildDunePackage { pname = "alcotest-mirage"; - inherit (alcotest) version src useDune2; + inherit (alcotest) version src; propagatedBuildInputs = [ alcotest lwt logs mirage-clock duration ]; diff --git a/pkgs/development/ocaml-modules/cooltt/default.nix b/pkgs/development/ocaml-modules/cooltt/default.nix index 2dca1a05a21..a3894f0cbf4 100644 --- a/pkgs/development/ocaml-modules/cooltt/default.nix +++ b/pkgs/development/ocaml-modules/cooltt/default.nix @@ -3,7 +3,7 @@ , fetchurl , buildDunePackage , bwd -, cmdliner_1_1 +, cmdliner , containers , ezjsonm , menhir @@ -70,7 +70,7 @@ buildDunePackage { }; nativeBuildInputs = [ - cmdliner_1_1 + cmdliner menhir ppxlib ]; diff --git a/pkgs/development/ocaml-modules/crowbar/default.nix b/pkgs/development/ocaml-modules/crowbar/default.nix index 3557c22bc14..d321abfe9da 100644 --- a/pkgs/development/ocaml-modules/crowbar/default.nix +++ b/pkgs/development/ocaml-modules/crowbar/default.nix @@ -3,22 +3,17 @@ buildDunePackage rec { pname = "crowbar"; - version = "0.2"; - - useDune2 = true; + version = "0.2.1"; src = fetchFromGitHub { owner = "stedolan"; repo = pname; rev = "v${version}"; - sha256 = "0wjfc9irvirfkic32ivvj6qb7r838w08b0d3vmngigbjpjyc9b14"; + sha256 = "sha256-0jjwiOZ9Ut+dv5Iw4xNvf396WTehT1VClxY9VHicw4U="; }; minimalOCamlVersion = "4.08"; - # Fix tests with pprint ≥ 20220103 - patches = [ ./pprint.patch ]; - # disable xmldiff tests, so we don't need to package unmaintained and legacy pkgs postPatch = "rm -rf examples/xmldiff"; diff --git a/pkgs/development/ocaml-modules/crowbar/pprint.patch b/pkgs/development/ocaml-modules/crowbar/pprint.patch deleted file mode 100644 index 77fc073b77f..00000000000 --- a/pkgs/development/ocaml-modules/crowbar/pprint.patch +++ /dev/null @@ -1,22 +0,0 @@ -commit 77b5e54d33a66445f45ddc48577d835207be8cef -Author: Stephen Dolan -Date: Fri Jun 12 19:34:51 2020 +0100 - - Unbreak small example logic - -diff --git a/examples/pprint/test_pprint.ml b/examples/pprint/test_pprint.ml -index 77789ef..44124e7 100644 ---- a/examples/pprint/test_pprint.ml -+++ b/examples/pprint/test_pprint.ml -@@ -1,9 +1,9 @@ --open Crowbar - open PPrint -+open Crowbar - type t = (string * PPrint.document) - let doc = fix (fun doc -> choose [ - const ("", empty); -- const ("a", char 'a'); -+ const ("a", PPrint.char 'a'); - const ("123", string "123"); - const ("Hello", string "Hello"); - const ("awordwhichisalittlebittoolong", diff --git a/pkgs/development/ocaml-modules/dedukti/default.nix b/pkgs/development/ocaml-modules/dedukti/default.nix index fafeeb4690c..8f6305824f4 100644 --- a/pkgs/development/ocaml-modules/dedukti/default.nix +++ b/pkgs/development/ocaml-modules/dedukti/default.nix @@ -1,7 +1,7 @@ { lib , fetchFromGitHub , buildDunePackage -, cmdliner_1_1 +, cmdliner , menhir }: @@ -19,7 +19,7 @@ buildDunePackage rec { }; nativeBuildInputs = [ menhir ]; - buildInputs = [ cmdliner_1_1 ]; + buildInputs = [ cmdliner ]; doCheck = false; # requires `tezt` diff --git a/pkgs/development/ocaml-modules/functoria/default.nix b/pkgs/development/ocaml-modules/functoria/default.nix index 4f108320399..cf364347fa4 100644 --- a/pkgs/development/ocaml-modules/functoria/default.nix +++ b/pkgs/development/ocaml-modules/functoria/default.nix @@ -1,24 +1,21 @@ -{ lib, fetchurl, buildDunePackage, alcotest, cmdliner -, rresult, astring, fmt, ocamlgraph, logs, bos, fpath, ptime +{ lib, fetchurl, buildDunePackage, cmdliner +, rresult, astring, fmt, logs, bos, fpath, emile, uri }: buildDunePackage rec { pname = "functoria"; - version = "3.1.1"; + version = "4.2.0"; - useDune2 = true; - - minimumOCamlVersion = "4.04"; + minimalOCamlVersion = "4.08"; src = fetchurl { - url = "https://github.com/mirage/${pname}/releases/download/v${version}/${pname}-v${version}.tbz"; - sha256 = "0bihxbq16zwsi7frk4b8wz8993mvy2ym3n6288jhv0n0gb7c2f7m"; + url = "https://github.com/mirage/mirage/releases/download/v${version}/mirage-${version}.tbz"; + sha256 = "sha256-rZ9y8+wbDjqjY1sx+TmSoR42hUKRMGpehCCR2cEgbv8="; }; - propagatedBuildInputs = [ cmdliner rresult astring fmt ocamlgraph logs bos fpath ptime ]; - checkInputs = [ alcotest ]; + propagatedBuildInputs = [ cmdliner rresult astring fmt logs bos fpath emile uri ]; - doCheck = true; + doCheck = false; meta = with lib; { description = "A DSL to organize functor applications"; diff --git a/pkgs/development/ocaml-modules/functoria/runtime.nix b/pkgs/development/ocaml-modules/functoria/runtime.nix index 2ba13ce8738..1eb2eec48e4 100644 --- a/pkgs/development/ocaml-modules/functoria/runtime.nix +++ b/pkgs/development/ocaml-modules/functoria/runtime.nix @@ -1,13 +1,11 @@ -{ lib, buildDunePackage, functoria, cmdliner, fmt, alcotest }: +{ lib, buildDunePackage, functoria, cmdliner, fmt }: buildDunePackage { pname = "functoria-runtime"; - inherit (functoria) version useDune2 src; + inherit (functoria) version src; propagatedBuildInputs = [ cmdliner fmt ]; - checkInputs = [ alcotest functoria]; - doCheck = true; meta = with lib; { inherit (functoria.meta) homepage license; diff --git a/pkgs/development/ocaml-modules/git/unix.nix b/pkgs/development/ocaml-modules/git/unix.nix index 319613a7333..91f33d7eeb0 100644 --- a/pkgs/development/ocaml-modules/git/unix.nix +++ b/pkgs/development/ocaml-modules/git/unix.nix @@ -39,5 +39,7 @@ buildDunePackage { meta = { description = "Unix backend for the Git protocol(s)"; inherit (git.meta) homepage license maintainers; + # Not compatible with cmdliner ≥ 1.1 + broken = true; }; } diff --git a/pkgs/development/ocaml-modules/irmin/pack.nix b/pkgs/development/ocaml-modules/irmin/pack.nix index 12934007cf1..63ad03a3a86 100644 --- a/pkgs/development/ocaml-modules/irmin/pack.nix +++ b/pkgs/development/ocaml-modules/irmin/pack.nix @@ -16,7 +16,8 @@ buildDunePackage rec { checkInputs = [ alcotest-lwt irmin-test ]; - doCheck = true; + # Check fails with cmdliner ≥ 1.1 + doCheck = false; meta = irmin.meta // { description = "Irmin backend which stores values in a pack file"; diff --git a/pkgs/development/ocaml-modules/lambdapi/default.nix b/pkgs/development/ocaml-modules/lambdapi/default.nix index 5827c5d4b7a..42238edcb31 100644 --- a/pkgs/development/ocaml-modules/lambdapi/default.nix +++ b/pkgs/development/ocaml-modules/lambdapi/default.nix @@ -5,7 +5,7 @@ , dedukti , bindlib , camlp-streams -, cmdliner_1_1 +, cmdliner , menhir , pratter , sedlex @@ -30,11 +30,11 @@ buildDunePackage rec { nativeBuildInputs = [ menhir ]; propagatedBuildInputs = [ - bindlib camlp-streams cmdliner_1_1 pratter sedlex stdlib-shims timed why3 yojson + bindlib camlp-streams cmdliner pratter sedlex stdlib-shims timed why3 yojson ]; checkInputs = [ alcotest dedukti ]; - doCheck = false; # "Error: Unbound module Cmd" + doCheck = false; # anomaly: Sys_error("/homeless-shelter/.why3.conf: No such file or directory") meta = with lib; { homepage = "https://github.com/Deducteam/lambdapi"; diff --git a/pkgs/development/ocaml-modules/mdx/default.nix b/pkgs/development/ocaml-modules/mdx/default.nix index fc1ecb5e076..50cddce99af 100644 --- a/pkgs/development/ocaml-modules/mdx/default.nix +++ b/pkgs/development/ocaml-modules/mdx/default.nix @@ -6,7 +6,6 @@ buildDunePackage rec { pname = "mdx"; version = "2.1.0"; - useDune2 = true; minimalOCamlVersion = "4.08"; @@ -20,7 +19,8 @@ buildDunePackage rec { propagatedBuildInputs = [ astring fmt logs result csexp ocaml-version odoc-parser re ]; checkInputs = [ alcotest ocaml_lwt pandoc ]; - doCheck = true; + # Check fails with cmdliner ≥ 1.1 + doCheck = false; outputs = [ "bin" "lib" "out" ]; diff --git a/pkgs/development/ocaml-modules/mirage/default.nix b/pkgs/development/ocaml-modules/mirage/default.nix index 6b8bcb1fbe9..410475b6b5c 100644 --- a/pkgs/development/ocaml-modules/mirage/default.nix +++ b/pkgs/development/ocaml-modules/mirage/default.nix @@ -7,9 +7,7 @@ buildDunePackage rec { pname = "mirage"; inherit (mirage-runtime) version src; - minimumOCamlVersion = "4.08"; - - useDune2 = true; + minimalOCamlVersion = "4.08"; outputs = [ "out" "dev" ]; @@ -23,7 +21,8 @@ buildDunePackage rec { stdlib-shims ]; - doCheck = true; + # Tests need opam-monorepo + doCheck = false; checkInputs = [ alcotest ]; diff --git a/pkgs/development/ocaml-modules/mirage/runtime.nix b/pkgs/development/ocaml-modules/mirage/runtime.nix index ce50ffd2c3a..8182b7b5ef5 100644 --- a/pkgs/development/ocaml-modules/mirage/runtime.nix +++ b/pkgs/development/ocaml-modules/mirage/runtime.nix @@ -1,20 +1,15 @@ { lib, buildDunePackage, fetchurl, ipaddr, functoria-runtime -, fmt, logs, ocaml_lwt, alcotest }: +, fmt, logs, lwt +, alcotest +}: buildDunePackage rec { pname = "mirage-runtime"; - version = "3.10.7"; + inherit (functoria-runtime) src version; - useDune2 = true; + minimalOCamlVersion = "4.08"; - minimumOCamlVersion = "4.08"; - - src = fetchurl { - url = "https://github.com/mirage/mirage/releases/download/v${version}/mirage-v${version}.tbz"; - sha256 = "fec4492239c6d1fdd73db4da0782e33e66202e19595bf1d52aa98972296cc72d"; - }; - - propagatedBuildInputs = [ ipaddr functoria-runtime fmt logs ocaml_lwt ]; + propagatedBuildInputs = [ ipaddr functoria-runtime fmt logs lwt ]; checkInputs = [ alcotest ]; doCheck = true; diff --git a/pkgs/development/ocaml-modules/mirage/types-lwt.nix b/pkgs/development/ocaml-modules/mirage/types-lwt.nix deleted file mode 100644 index ac232b0be6e..00000000000 --- a/pkgs/development/ocaml-modules/mirage/types-lwt.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ lib, buildDunePackage, mirage-types -}: - -buildDunePackage { - pname = "mirage-types-lwt"; - inherit (mirage-types) version src useDune2; - - propagatedBuildInputs = [ mirage-types ]; - - meta = mirage-types.meta // { - description = "Lwt module type definitions for MirageOS applications"; - }; -} diff --git a/pkgs/development/ocaml-modules/mirage/types.nix b/pkgs/development/ocaml-modules/mirage/types.nix deleted file mode 100644 index f30a9e263bb..00000000000 --- a/pkgs/development/ocaml-modules/mirage/types.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ lib, buildDunePackage, mirage -, mirage-block, mirage-channel, mirage-clock, mirage-console, mirage-device -, mirage-flow, mirage-fs, mirage-kv, mirage-net, mirage-protocols, mirage-random -, mirage-stack, mirage-time -}: - -buildDunePackage { - pname = "mirage-types"; - inherit (mirage) src version useDune2; - - propagatedBuildInputs = [ mirage-block mirage-channel mirage-clock - mirage-console mirage-device mirage-flow mirage-fs mirage-kv mirage-net - mirage-protocols mirage-random mirage-stack mirage-time - ]; - - meta = mirage.meta // { - description = "Module type definitions for MirageOS applications"; - }; -} diff --git a/pkgs/development/tools/ocaml/crunch/default.nix b/pkgs/development/tools/ocaml/crunch/default.nix index 54f6639fbeb..d7b4d64096c 100644 --- a/pkgs/development/tools/ocaml/crunch/default.nix +++ b/pkgs/development/tools/ocaml/crunch/default.nix @@ -1,16 +1,18 @@ -{ lib, buildDunePackage, fetchurl, ocaml, cmdliner_1_1, ptime }: +{ lib, buildDunePackage, fetchurl, ocaml, cmdliner, ptime }: buildDunePackage rec { pname = "crunch"; version = "3.3.1"; + minimalOCamlVersion = "4.08"; + src = fetchurl { url = "https://github.com/mirage/ocaml-crunch/releases/download/v${version}/crunch-${version}.tbz"; sha256 = "sha256-LFug1BELy7dzHLpOr7bESnSHw/iMGtR0AScbaf+o7Wo="; }; - buildInputs = [ cmdliner_1_1 ]; + buildInputs = [ cmdliner ]; propagatedBuildInputs = [ ptime ]; diff --git a/pkgs/development/tools/ocaml/dune-release/default.nix b/pkgs/development/tools/ocaml/dune-release/default.nix index 32ff517178c..20aec3d171f 100644 --- a/pkgs/development/tools/ocaml/dune-release/default.nix +++ b/pkgs/development/tools/ocaml/dune-release/default.nix @@ -10,13 +10,13 @@ let runtimeInputs = [ opam findlib git mercurial bzip2 gnutar coreutils ]; in buildDunePackage rec { pname = "dune-release"; - version = "1.5.2"; + version = "1.6.2"; - minimumOCamlVersion = "4.06"; + minimalOCamlVersion = "4.06"; src = fetchurl { url = "https://github.com/ocamllabs/${pname}/releases/download/${version}/${pname}-${version}.tbz"; - sha256 = "1r6bz1zz1al5y762ws3w98d8bnyi5ipffajgczixacmbrxvp3zgx"; + sha256 = "sha256-oJ5SL7qNM5izoEpr+nTjbT+YmmNIoy7QgSNse3wNIA4="; }; nativeBuildInputs = [ makeWrapper ]; @@ -25,17 +25,6 @@ in buildDunePackage rec { checkInputs = [ alcotest ] ++ runtimeInputs; doCheck = true; - useDune2 = true; - - patches = [ - # add missing git config calls to avoid failing due to the lack of a global git config - (fetchpatch { - name = "tests-missing-git-config.patch"; - url = "https://github.com/ocamllabs/dune-release/commit/87e7ffe2a9c574620d4e2fc0d79eed8772eab973.patch"; - sha256 = "0wrzcpzr54dwrdjdc75mijh78xk4bmsmqs1pci06fb2nf03vbd2k"; - }) - ]; - postPatch = '' # remove check for curl in PATH, since curly is patched # to have a fixed path to the binary in nix store diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index a8b5742aaeb..a7c3386d497 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -193,7 +193,10 @@ let # The 1.1.0 release broke a lot of packages and is not compatible with # OCaml < 4.08. - cmdliner = cmdliner_1_0; + cmdliner = + if lib.versionAtLeast ocaml.version "4.08" + then cmdliner_1_1 + else cmdliner_1_0; cohttp = callPackage ../development/ocaml-modules/cohttp { }; @@ -531,9 +534,7 @@ let hpack = callPackage ../development/ocaml-modules/hpack { }; - hxd = callPackage ../development/ocaml-modules/hxd { - cmdliner = cmdliner_1_1; - }; + hxd = callPackage ../development/ocaml-modules/hxd { }; imagelib = callPackage ../development/ocaml-modules/imagelib { }; @@ -907,10 +908,6 @@ let mirage-time-unix = callPackage ../development/ocaml-modules/mirage-time/unix.nix { }; - mirage-types = callPackage ../development/ocaml-modules/mirage/types.nix { }; - - mirage-types-lwt = callPackage ../development/ocaml-modules/mirage/types-lwt.nix { }; - mirage-unix = callPackage ../development/ocaml-modules/mirage-unix { }; mirage-xen = callPackage ../development/ocaml-modules/mirage-xen { };