1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/development/ocaml-modules/ppxlib/default.nix

41 lines
982 B
Nix
Raw Normal View History

{ lib, fetchFromGitHub, buildDunePackage, ocaml
, legacy ? false
2018-07-05 20:40:30 +01:00
, ocaml-compiler-libs, ocaml-migrate-parsetree, ppx_derivers, stdio
}:
let param =
if legacy then {
version = "0.8.1";
sha256 = "0vm0jajmg8135scbg0x60ivyy5gzv4abwnl7zls2mrw23ac6kml6";
} else {
version = "0.12.0";
sha256 = "1cg0is23c05k1rc94zcdz452p9zn11dpqxm1pnifwx5iygz3w0a1";
}; in
if lib.versionAtLeast ocaml.version "4.10" && legacy
then throw "ppxlib-${param.version} is not available for OCaml ${ocaml.version}"
else
buildDunePackage rec {
pname = "ppxlib";
inherit (param) version;
2018-07-05 20:40:30 +01:00
src = fetchFromGitHub {
owner = "ocaml-ppx";
repo = pname;
2018-07-05 20:40:30 +01:00
rev = version;
inherit (param) sha256;
2018-07-05 20:40:30 +01:00
};
propagatedBuildInputs = [
ocaml-compiler-libs ocaml-migrate-parsetree ppx_derivers stdio
];
meta = {
description = "Comprehensive ppx tool set";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.vbgl ];
2018-07-05 20:40:30 +01:00
inherit (src.meta) homepage;
};
}