ocamlPackages.ppxlib: 0.12.0 → 0.13.0
Also refactor to ease selection of a custom version
This commit is contained in:
parent
8274fec350
commit
6a7f79ed83
@ -1,24 +1,28 @@
|
|||||||
{ lib, fetchFromGitHub, buildDunePackage, ocaml
|
{ lib, fetchFromGitHub, buildDunePackage, ocaml
|
||||||
, legacy ? false
|
, version ? "0.13.0"
|
||||||
, ocaml-compiler-libs, ocaml-migrate-parsetree, ppx_derivers, stdio
|
, ocaml-compiler-libs, ocaml-migrate-parsetree, ppx_derivers, stdio
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let param =
|
let param = {
|
||||||
if legacy then {
|
"0.8.1" = {
|
||||||
version = "0.8.1";
|
|
||||||
sha256 = "0vm0jajmg8135scbg0x60ivyy5gzv4abwnl7zls2mrw23ac6kml6";
|
sha256 = "0vm0jajmg8135scbg0x60ivyy5gzv4abwnl7zls2mrw23ac6kml6";
|
||||||
} else {
|
max_version = "4.10";
|
||||||
version = "0.12.0";
|
};
|
||||||
sha256 = "1cg0is23c05k1rc94zcdz452p9zn11dpqxm1pnifwx5iygz3w0a1";
|
"0.13.0" = {
|
||||||
}; in
|
sha256 = "0c54g22pm6lhfh3f7s5wbah8y48lr5lj3cqsbvgi99bly1b5vqvl";
|
||||||
|
};
|
||||||
|
}."${version}"; in
|
||||||
|
|
||||||
if lib.versionAtLeast ocaml.version "4.10" && legacy
|
if param ? max_version && lib.versionAtLeast ocaml.version param.max_version
|
||||||
|
|| param ? min_version && !lib.versionAtLeast ocaml.version param.min_version
|
||||||
then throw "ppxlib-${param.version} is not available for OCaml ${ocaml.version}"
|
then throw "ppxlib-${param.version} is not available for OCaml ${ocaml.version}"
|
||||||
else
|
else
|
||||||
|
|
||||||
buildDunePackage rec {
|
buildDunePackage rec {
|
||||||
pname = "ppxlib";
|
pname = "ppxlib";
|
||||||
inherit (param) version;
|
inherit version;
|
||||||
|
|
||||||
|
useDune2 = param.useDune2 or false;
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "ocaml-ppx";
|
owner = "ocaml-ppx";
|
||||||
|
@ -1064,14 +1064,14 @@ let
|
|||||||
then import ../development/ocaml-modules/janestreet/0.12.nix {
|
then import ../development/ocaml-modules/janestreet/0.12.nix {
|
||||||
inherit ctypes janePackage num octavius re;
|
inherit ctypes janePackage num octavius re;
|
||||||
inherit (pkgs) openssl;
|
inherit (pkgs) openssl;
|
||||||
ppxlib = ppxlib.override { legacy = true; };
|
ppxlib = ppxlib.override { version = "0.8.1"; };
|
||||||
}
|
}
|
||||||
else import ../development/ocaml-modules/janestreet {
|
else import ../development/ocaml-modules/janestreet {
|
||||||
inherit janePackage ocamlbuild angstrom ctypes cryptokit;
|
inherit janePackage ocamlbuild angstrom ctypes cryptokit;
|
||||||
inherit magic-mime num ocaml-migrate-parsetree octavius ounit;
|
inherit magic-mime num ocaml-migrate-parsetree octavius ounit;
|
||||||
inherit ppx_deriving re;
|
inherit ppx_deriving re;
|
||||||
inherit (pkgs) openssl;
|
inherit (pkgs) openssl;
|
||||||
ppxlib = ppxlib.override { legacy = true; };
|
ppxlib = ppxlib.override { version = "0.8.1"; };
|
||||||
};
|
};
|
||||||
|
|
||||||
janeStreet_0_9_0 = import ../development/ocaml-modules/janestreet/old.nix {
|
janeStreet_0_9_0 = import ../development/ocaml-modules/janestreet/old.nix {
|
||||||
|
Loading…
Reference in New Issue
Block a user