From 5a61d189974198bcf61b494f11aabb65a77cb03e Mon Sep 17 00:00:00 2001 From: Jules Aguillon Date: Mon, 25 Apr 2022 19:19:57 +0200 Subject: [PATCH 1/3] ocamlPackages.cmdliner_1_1: init at 1.1.1 Add the latest version of cmdliner. This release broke many packages and have more constraining dependencies so the previous version cannot be removed from nixpkgs for now. The previous version is still available as ocamlPackages.cmdliner_1_0 and ocamlPackages.cmdliner points to it for now. --- .../cmdliner/{default.nix => 1_0.nix} | 0 .../ocaml-modules/cmdliner/1_1.nix | 32 +++++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 8 ++++- 3 files changed, 39 insertions(+), 1 deletion(-) rename pkgs/development/ocaml-modules/cmdliner/{default.nix => 1_0.nix} (100%) create mode 100644 pkgs/development/ocaml-modules/cmdliner/1_1.nix diff --git a/pkgs/development/ocaml-modules/cmdliner/default.nix b/pkgs/development/ocaml-modules/cmdliner/1_0.nix similarity index 100% rename from pkgs/development/ocaml-modules/cmdliner/default.nix rename to pkgs/development/ocaml-modules/cmdliner/1_0.nix diff --git a/pkgs/development/ocaml-modules/cmdliner/1_1.nix b/pkgs/development/ocaml-modules/cmdliner/1_1.nix new file mode 100644 index 000000000000..001d967fca1b --- /dev/null +++ b/pkgs/development/ocaml-modules/cmdliner/1_1.nix @@ -0,0 +1,32 @@ +{ lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, result }: + +stdenv.mkDerivation rec { + pname = "cmdliner"; + version = "1.1.1"; + + src = fetchurl { + url = "https://erratique.ch/software/${pname}/releases/${pname}-${version}.tbz"; + sha256 = "sha256-oa6Hw6eZQO+NHdWfdED3dtHckm4BmEbdMiAuRkYntfs="; + }; + + minimalOCamlVersion = "4.08"; + nativeBuildInputs = [ ocaml ]; + + makeFlags = [ "PREFIX=$(out)" ]; + installTargets = "install install-doc"; + installFlags = [ + "LIBDIR=$(out)/lib/ocaml/${ocaml.version}/site-lib/${pname}" + "DOCDIR=$(out)/share/doc/${pname}" + ]; + postInstall = '' + mv $out/lib/ocaml/${ocaml.version}/site-lib/${pname}/{opam,${pname}.opam} + ''; + + meta = with lib; { + homepage = "https://erratique.ch/software/cmdliner"; + description = "An OCaml module for the declarative definition of command line interfaces"; + license = licenses.isc; + inherit (ocaml.meta) platforms; + maintainers = [ maintainers.vbgl ]; + }; +} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index a1effc538b60..3bbfd736f7f0 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -177,7 +177,13 @@ let cil = callPackage ../development/ocaml-modules/cil { }; - cmdliner = callPackage ../development/ocaml-modules/cmdliner { }; + cmdliner_1_0 = callPackage ../development/ocaml-modules/cmdliner/1_0.nix { }; + + cmdliner_1_1 = callPackage ../development/ocaml-modules/cmdliner/1_1.nix { }; + + # The 1.1.0 release broke a lot of packages and is not compatible with + # OCaml < 4.08. + cmdliner = cmdliner_1_0; cohttp = callPackage ../development/ocaml-modules/cohttp { }; From 29750d369c0a6bbce1b4f57b4a6f63da06a31390 Mon Sep 17 00:00:00 2001 From: Jules Aguillon Date: Mon, 25 Apr 2022 19:25:00 +0200 Subject: [PATCH 2/3] ocamlformat: 0.20.1 -> 0.21.0 The cmdliner dependency changed. Update older version to use cmdliner_1_0 explicitly to be ready when it changes. --- .../tools/ocaml/ocamlformat/default.nix | 6 +++++- .../tools/ocaml/ocamlformat/generic.nix | 16 ++++++++-------- pkgs/top-level/all-packages.nix | 2 +- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/pkgs/development/tools/ocaml/ocamlformat/default.nix b/pkgs/development/tools/ocaml/ocamlformat/default.nix index 096fe1b4324a..5847f18ba3d9 100644 --- a/pkgs/development/tools/ocaml/ocamlformat/default.nix +++ b/pkgs/development/tools/ocaml/ocamlformat/default.nix @@ -68,5 +68,9 @@ rec { version = "0.20.1"; }; - ocamlformat = ocamlformat_0_20_1; + ocamlformat_0_21_0 = mkOCamlformat { + version = "0.21.0"; + }; + + ocamlformat = ocamlformat_0_21_0; } diff --git a/pkgs/development/tools/ocaml/ocamlformat/generic.nix b/pkgs/development/tools/ocaml/ocamlformat/generic.nix index 517ca6585fe1..7eee57e9abcc 100644 --- a/pkgs/development/tools/ocaml/ocamlformat/generic.nix +++ b/pkgs/development/tools/ocaml/ocamlformat/generic.nix @@ -25,6 +25,7 @@ let src = "0.19.0" = "0ihgwl7d489g938m1jvgx8azdgq9f5np5mzqwwya797hx2m4dz32"; "0.20.0" = "sha256-JtmNCgwjbCyUE4bWqdH5Nc2YSit+rekwS43DcviIfgk="; "0.20.1" = "sha256-fTpRZFQW+ngoc0T6A69reEUAZ6GmHkeQvxspd5zRAjU="; + "0.21.0" = "sha256-KhgX9rxYH/DM6fCqloe4l7AnJuKrdXSe6Y1XY3BXMy0="; }."${version}"; }; ocamlPackages = @@ -60,7 +61,7 @@ buildDunePackage { if lib.versionAtLeast version "0.20.0" then [ base - cmdliner + (if lib.versionAtLeast version "0.21.0" then cmdliner_1_1 else cmdliner_1_0) dune-build-info either fix @@ -78,7 +79,7 @@ buildDunePackage { else if lib.versionAtLeast version "0.19.0" then [ base - cmdliner + cmdliner_1_0 fpath re stdio @@ -94,7 +95,7 @@ buildDunePackage { else if lib.versionAtLeast version "0.18.0" then [ base - cmdliner + cmdliner_1_0 fpath odoc re @@ -112,7 +113,7 @@ buildDunePackage { else if lib.versionAtLeast version "0.17.0" then [ base - cmdliner + cmdliner_1_0 fpath odoc re @@ -131,7 +132,7 @@ buildDunePackage { else if lib.versionAtLeast version "0.15.1" then [ base - cmdliner + cmdliner_1_0 fpath odoc re @@ -148,7 +149,7 @@ buildDunePackage { else if lib.versionAtLeast version "0.14" then [ base - cmdliner + cmdliner_1_0 fpath ocaml-migrate-parsetree odoc @@ -161,7 +162,7 @@ buildDunePackage { menhirSdk ] else [ base - cmdliner + cmdliner_1_0 fpath ocaml-migrate-parsetree odoc @@ -178,4 +179,3 @@ buildDunePackage { license = lib.licenses.mit; }; } - diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5ebb7608596b..d7c7cf7cadf6 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -13570,7 +13570,7 @@ with pkgs; ocamlformat_0_11_0 ocamlformat_0_12 ocamlformat_0_13_0 ocamlformat_0_14_0 ocamlformat_0_14_1 ocamlformat_0_14_2 ocamlformat_0_14_3 ocamlformat_0_15_0 ocamlformat_0_15_1 ocamlformat_0_16_0 ocamlformat_0_17_0 ocamlformat_0_18_0 - ocamlformat_0_19_0 ocamlformat_0_20_0 ocamlformat_0_20_1; + ocamlformat_0_19_0 ocamlformat_0_20_0 ocamlformat_0_20_1 ocamlformat_0_21_0; orc = callPackage ../development/compilers/orc { }; From bcbbbea82e5a0618f3a11126fea7210bb9af1031 Mon Sep 17 00:00:00 2001 From: Jules Aguillon Date: Mon, 25 Apr 2022 19:35:21 +0200 Subject: [PATCH 3/3] ocamlPackages.cmdliner_1_0: Update license License changed on version 1.0.0 from bsd3 to isc. --- pkgs/development/ocaml-modules/cmdliner/1_0.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/ocaml-modules/cmdliner/1_0.nix b/pkgs/development/ocaml-modules/cmdliner/1_0.nix index ed96b1b61553..718c6b95a069 100644 --- a/pkgs/development/ocaml-modules/cmdliner/1_0.nix +++ b/pkgs/development/ocaml-modules/cmdliner/1_0.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { meta = with lib; { homepage = "https://erratique.ch/software/cmdliner"; description = "An OCaml module for the declarative definition of command line interfaces"; - license = licenses.bsd3; + license = licenses.isc; inherit (ocaml.meta) platforms; maintainers = [ maintainers.vbgl ]; };