diff --git a/pkgs/development/ocaml-modules/cmdliner/1_1.nix b/pkgs/development/ocaml-modules/cmdliner/1_1.nix deleted file mode 100644 index cf03c32d7e8b..000000000000 --- a/pkgs/development/ocaml-modules/cmdliner/1_1.nix +++ /dev/null @@ -1,37 +0,0 @@ -{ - lib, - stdenv, - fetchurl, - ocaml, -}: - -stdenv.mkDerivation rec { - pname = "cmdliner"; - version = "1.3.0"; - - src = fetchurl { - url = "https://erratique.ch/software/${pname}/releases/${pname}-${version}.tbz"; - sha256 = "sha256-joGA9XO0QPanqMII2rLK5KgjhP7HMtInhNG7bmQWjLs="; - }; - - 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 = { - homepage = "https://erratique.ch/software/cmdliner"; - description = "OCaml module for the declarative definition of command line interfaces"; - license = lib.licenses.isc; - inherit (ocaml.meta) platforms; - maintainers = [ lib.maintainers.vbgl ]; - broken = !(lib.versionAtLeast ocaml.version "4.08"); - }; -} diff --git a/pkgs/development/ocaml-modules/cmdliner/1_0.nix b/pkgs/development/ocaml-modules/cmdliner/default.nix similarity index 50% rename from pkgs/development/ocaml-modules/cmdliner/1_0.nix rename to pkgs/development/ocaml-modules/cmdliner/default.nix index 772e688a9981..2bbd345df67e 100644 --- a/pkgs/development/ocaml-modules/cmdliner/1_0.nix +++ b/pkgs/development/ocaml-modules/cmdliner/default.nix @@ -3,15 +3,21 @@ stdenv, fetchurl, ocaml, + version ? "1.3.0", }: -stdenv.mkDerivation rec { +stdenv.mkDerivation { pname = "cmdliner"; - version = "1.0.4"; + inherit version; src = fetchurl { - url = "https://erratique.ch/software/${pname}/releases/${pname}-${version}.tbz"; - sha256 = "1h04q0zkasd0mw64ggh4y58lgzkhg6yhzy60lab8k8zq9ba96ajw"; + url = "https://erratique.ch/software/cmdliner/releases/cmdliner-${version}.tbz"; + hash = + { + "1.0.4" = "sha256-XCqT1Er4o4mWosD4D715cP5HUfEEvkcMr6BpNT/ABMA="; + "1.3.0" = "sha256-joGA9XO0QPanqMII2rLK5KgjhP7HMtInhNG7bmQWjLs="; + } + ."${version}"; }; nativeBuildInputs = [ ocaml ]; @@ -19,11 +25,11 @@ stdenv.mkDerivation rec { makeFlags = [ "PREFIX=$(out)" ]; installTargets = "install install-doc"; installFlags = [ - "LIBDIR=$(out)/lib/ocaml/${ocaml.version}/site-lib/${pname}" - "DOCDIR=$(out)/share/doc/${pname}" + "LIBDIR=$(out)/lib/ocaml/${ocaml.version}/site-lib/cmdliner" + "DOCDIR=$(out)/share/doc/cmdliner" ]; postInstall = '' - mv $out/lib/ocaml/${ocaml.version}/site-lib/${pname}/{opam,${pname}.opam} + mv $out/lib/ocaml/${ocaml.version}/site-lib/cmdliner/{opam,cmdliner.opam} ''; meta = { @@ -32,6 +38,5 @@ stdenv.mkDerivation rec { license = lib.licenses.isc; inherit (ocaml.meta) platforms; maintainers = [ lib.maintainers.vbgl ]; - broken = !(lib.versionAtLeast ocaml.version "4.03"); }; } diff --git a/pkgs/development/ocaml-modules/ocamlformat/generic.nix b/pkgs/development/ocaml-modules/ocamlformat/generic.nix index d4f2f3336fe8..e59d117413e0 100644 --- a/pkgs/development/ocaml-modules/ocamlformat/generic.nix +++ b/pkgs/development/ocaml-modules/ocamlformat/generic.nix @@ -6,7 +6,7 @@ base, camlp-streams, cmdliner_1_0, - cmdliner_1_1, + cmdliner_1, csexp, dune-build-info, either, @@ -65,7 +65,7 @@ rec { "0.9.0"; }; - cmdliner_v = if lib.versionAtLeast version "0.21.0" then cmdliner_1_1 else cmdliner_1_0; + cmdliner_v = if lib.versionAtLeast version "0.21.0" then cmdliner_1 else cmdliner_1_0; library_deps = [ base diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 8542c13c2767..ba38de552496 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -244,13 +244,11 @@ let cmarkit = callPackage ../development/ocaml-modules/cmarkit { }; - # The 1.1.0 release broke a lot of packages and is not compatible with - # OCaml < 4.08. - cmdliner = if lib.versionAtLeast ocaml.version "4.08" then cmdliner_1_1 else cmdliner_1_0; + cmdliner = callPackage ../development/ocaml-modules/cmdliner { }; - cmdliner_1_0 = callPackage ../development/ocaml-modules/cmdliner/1_0.nix { }; + cmdliner_1_0 = cmdliner.override { version = "1.0.4"; }; - cmdliner_1_1 = callPackage ../development/ocaml-modules/cmdliner/1_1.nix { }; + cmdliner_1 = cmdliner.override { version = "1.3.0"; }; cohttp = callPackage ../development/ocaml-modules/cohttp { }; @@ -2317,6 +2315,7 @@ let // lib.optionalAttrs config.allowAliases { biocaml = throw "biocaml has been removed"; # 2025-06-04 chacha = throw "chacha has been removed because it has been marked as broken since at least November 2024. It is now vendored inside mirage-crypto, consider using that instead."; # Added 2025-10-11 + cmdliner_1_1 = cmdliner_1; # Added 2026-01-28 dune_2 = pkgs.dune_2; # Added 2025-12-08 dune_3 = pkgs.dune_3; # Added 2025-12-08 gd4o = throw "ocamlPackages.gd4o is not maintained, use ocamlPackages.gd instead";