Merge pull request #170297 from Julow/ocamlformat_0_21

Ocamlformat 0.21.0 and Cmdliner 1.1.1
This commit is contained in:
Guillaume Girol 2022-05-23 19:06:30 +00:00 committed by GitHub
commit 09f34965e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 54 additions and 12 deletions

View File

@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
meta = with lib; { meta = with lib; {
homepage = "https://erratique.ch/software/cmdliner"; homepage = "https://erratique.ch/software/cmdliner";
description = "An OCaml module for the declarative definition of command line interfaces"; description = "An OCaml module for the declarative definition of command line interfaces";
license = licenses.bsd3; license = licenses.isc;
inherit (ocaml.meta) platforms; inherit (ocaml.meta) platforms;
maintainers = [ maintainers.vbgl ]; maintainers = [ maintainers.vbgl ];
}; };

View File

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

View File

@ -68,5 +68,9 @@ rec {
version = "0.20.1"; version = "0.20.1";
}; };
ocamlformat = ocamlformat_0_20_1; ocamlformat_0_21_0 = mkOCamlformat {
version = "0.21.0";
};
ocamlformat = ocamlformat_0_21_0;
} }

View File

@ -25,6 +25,7 @@ let src =
"0.19.0" = "0ihgwl7d489g938m1jvgx8azdgq9f5np5mzqwwya797hx2m4dz32"; "0.19.0" = "0ihgwl7d489g938m1jvgx8azdgq9f5np5mzqwwya797hx2m4dz32";
"0.20.0" = "sha256-JtmNCgwjbCyUE4bWqdH5Nc2YSit+rekwS43DcviIfgk="; "0.20.0" = "sha256-JtmNCgwjbCyUE4bWqdH5Nc2YSit+rekwS43DcviIfgk=";
"0.20.1" = "sha256-fTpRZFQW+ngoc0T6A69reEUAZ6GmHkeQvxspd5zRAjU="; "0.20.1" = "sha256-fTpRZFQW+ngoc0T6A69reEUAZ6GmHkeQvxspd5zRAjU=";
"0.21.0" = "sha256-KhgX9rxYH/DM6fCqloe4l7AnJuKrdXSe6Y1XY3BXMy0=";
}."${version}"; }."${version}";
}; };
ocamlPackages = ocamlPackages =
@ -60,7 +61,7 @@ buildDunePackage {
if lib.versionAtLeast version "0.20.0" if lib.versionAtLeast version "0.20.0"
then [ then [
base base
cmdliner (if lib.versionAtLeast version "0.21.0" then cmdliner_1_1 else cmdliner_1_0)
dune-build-info dune-build-info
either either
fix fix
@ -78,7 +79,7 @@ buildDunePackage {
else if lib.versionAtLeast version "0.19.0" else if lib.versionAtLeast version "0.19.0"
then [ then [
base base
cmdliner cmdliner_1_0
fpath fpath
re re
stdio stdio
@ -94,7 +95,7 @@ buildDunePackage {
else if lib.versionAtLeast version "0.18.0" else if lib.versionAtLeast version "0.18.0"
then [ then [
base base
cmdliner cmdliner_1_0
fpath fpath
odoc odoc
re re
@ -112,7 +113,7 @@ buildDunePackage {
else if lib.versionAtLeast version "0.17.0" else if lib.versionAtLeast version "0.17.0"
then [ then [
base base
cmdliner cmdliner_1_0
fpath fpath
odoc odoc
re re
@ -131,7 +132,7 @@ buildDunePackage {
else if lib.versionAtLeast version "0.15.1" else if lib.versionAtLeast version "0.15.1"
then [ then [
base base
cmdliner cmdliner_1_0
fpath fpath
odoc odoc
re re
@ -148,7 +149,7 @@ buildDunePackage {
else if lib.versionAtLeast version "0.14" else if lib.versionAtLeast version "0.14"
then [ then [
base base
cmdliner cmdliner_1_0
fpath fpath
ocaml-migrate-parsetree ocaml-migrate-parsetree
odoc odoc
@ -161,7 +162,7 @@ buildDunePackage {
menhirSdk menhirSdk
] else [ ] else [
base base
cmdliner cmdliner_1_0
fpath fpath
ocaml-migrate-parsetree ocaml-migrate-parsetree
odoc odoc
@ -178,4 +179,3 @@ buildDunePackage {
license = lib.licenses.mit; license = lib.licenses.mit;
}; };
} }

View File

@ -13568,7 +13568,7 @@ with pkgs;
ocamlformat_0_11_0 ocamlformat_0_12 ocamlformat_0_13_0 ocamlformat_0_14_0 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_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_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 { }; orc = callPackage ../development/compilers/orc { };

View File

@ -177,7 +177,13 @@ let
cil = callPackage ../development/ocaml-modules/cil { }; 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 { }; cohttp = callPackage ../development/ocaml-modules/cohttp { };