forked from mirrors/nixpkgs
ocamlformat: 0.20.0 and 0.20.1 (#152199)
* ocaml-version: 3.1.0 -> 3.4.0 * ocamlformat: 0.19.0 -> 0.20.0 * odoc-parser: refactor use version variable use version to compute the uri for the archive * odoc-parser: 0.9.0 -> 1.0.0 * odoc-parser: allow multiple versions allow both 0.9.0 and 1.0.0 to accommodate different version of ocamlformat * ocamlformat: 0.20.0 -> 0.20.1
This commit is contained in:
parent
f08f8d2ae6
commit
a7f4d6bae9
pkgs
development
ocaml-modules
tools/ocaml/ocamlformat
top-level
|
@ -2,11 +2,11 @@
|
|||
|
||||
buildDunePackage rec {
|
||||
pname = "ocaml-version";
|
||||
version = "3.1.0";
|
||||
version = "3.4.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/ocurrent/ocaml-version/releases/download/v${version}/ocaml-version-v${version}.tbz";
|
||||
sha256 = "sha256-rHuhagnY9yISdC85NpgPv667aYx7v2JRgq99ayw83l8=";
|
||||
sha256 = "sha256-2MG+tejY67dxC19DTOZqPsi3UrHk1rqHxP4nRSvbiiU=";
|
||||
};
|
||||
|
||||
minimumOCamlVersion = "4.07";
|
||||
|
|
|
@ -1,14 +1,24 @@
|
|||
{ lib, fetchurl, buildDunePackage, astring, result }:
|
||||
{ lib, fetchurl, buildDunePackage, astring, result , version ? "1.0.0" }:
|
||||
|
||||
let param = {
|
||||
"1.0.0" = {
|
||||
sha256 = "sha256-tqoI6nGp662bK+vE2h7aDXE882dObVfRBFnZNChueqE=";
|
||||
};
|
||||
"0.9.0" = {
|
||||
sha256 = "sha256-3w2tG605v03mvmZsS2O5c71y66O3W+n3JjFxIbXwvXk=";
|
||||
};
|
||||
}."${version}"; in
|
||||
|
||||
let v = version; in
|
||||
buildDunePackage rec {
|
||||
pname = "odoc-parser";
|
||||
version = "0.9.0";
|
||||
inherit version;
|
||||
|
||||
minimumOCamlVersion = "4.02";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/ocaml-doc/odoc-parser/releases/download/0.9.0/odoc-parser-0.9.0.tbz";
|
||||
sha256 = "0ydxy2sj2w9i4vvyjnxplgmp5gbkp5ilnv36pvk4vgrrmldss3fz";
|
||||
url = "https://github.com/ocaml-doc/odoc-parser/releases/download/${version}/odoc-parser-${version}.tbz";
|
||||
inherit (param) sha256;
|
||||
};
|
||||
|
||||
useDune2 = true;
|
||||
|
|
|
@ -60,5 +60,13 @@ rec {
|
|||
version = "0.19.0";
|
||||
};
|
||||
|
||||
ocamlformat = ocamlformat_0_19_0;
|
||||
ocamlformat_0_20_0 = mkOCamlformat {
|
||||
version = "0.20.0";
|
||||
};
|
||||
|
||||
ocamlformat_0_20_1 = mkOCamlformat {
|
||||
version = "0.20.1";
|
||||
};
|
||||
|
||||
ocamlformat = ocamlformat_0_20_1;
|
||||
}
|
||||
|
|
|
@ -23,6 +23,8 @@ let src =
|
|||
"0.17.0" = "0f1lxp697yq61z8gqxjjaqd2ns8fd1vjfggn55x0gh9dx098p138";
|
||||
"0.18.0" = "0571kzmb1h03qj74090n3mg8wfbh29qqrkdjkai6rnl5chll86lq";
|
||||
"0.19.0" = "0ihgwl7d489g938m1jvgx8azdgq9f5np5mzqwwya797hx2m4dz32";
|
||||
"0.20.0" = "sha256-JtmNCgwjbCyUE4bWqdH5Nc2YSit+rekwS43DcviIfgk=";
|
||||
"0.20.1" = "sha256-fTpRZFQW+ngoc0T6A69reEUAZ6GmHkeQvxspd5zRAjU=";
|
||||
}."${version}";
|
||||
};
|
||||
ocamlPackages =
|
||||
|
@ -47,7 +49,26 @@ buildDunePackage {
|
|||
useDune2 = true;
|
||||
|
||||
buildInputs =
|
||||
if lib.versionAtLeast version "0.19.0"
|
||||
if lib.versionAtLeast version "0.20.0"
|
||||
then [
|
||||
base
|
||||
cmdliner
|
||||
dune-build-info
|
||||
either
|
||||
fix
|
||||
fpath
|
||||
menhir
|
||||
menhirLib
|
||||
menhirSdk
|
||||
ocaml-version
|
||||
ocp-indent
|
||||
(if version == "0.20.0" then odoc-parser.override { version = "0.9.0"; } else odoc-parser)
|
||||
re
|
||||
stdio
|
||||
uuseg
|
||||
uutf
|
||||
]
|
||||
else if lib.versionAtLeast version "0.19.0"
|
||||
then [
|
||||
base
|
||||
cmdliner
|
||||
|
@ -62,7 +83,7 @@ buildDunePackage {
|
|||
menhirSdk
|
||||
ocp-indent
|
||||
dune-build-info
|
||||
odoc-parser
|
||||
(odoc-parser.override { version = "0.9.0"; })
|
||||
]
|
||||
else if lib.versionAtLeast version "0.18.0"
|
||||
then [
|
||||
|
|
|
@ -12824,7 +12824,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_19_0 ocamlformat_0_20_0 ocamlformat_0_20_1;
|
||||
|
||||
orc = callPackage ../development/compilers/orc { };
|
||||
|
||||
|
|
Loading…
Reference in a new issue