mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-10 06:04:14 +00:00
![Guillaume Girol](/assets/img/avatar_default.png)
checkInputs used to be added to nativeBuildInputs. Now we have nativeCheckInputs to do that instead. Doing this treewide change allows to keep hashes identical to before the introduction of nativeCheckInputs.
55 lines
1.1 KiB
Nix
55 lines
1.1 KiB
Nix
{ lib
|
|
, fetchurl
|
|
, buildDunePackage
|
|
, ocaml
|
|
, ounit
|
|
, ppx_deriving
|
|
, ppx_sexp_conv
|
|
, ppxlib
|
|
, version ? if lib.versionAtLeast ocaml.version "4.11" then "1.10.0" else "1.9.1"
|
|
}:
|
|
|
|
let param = {
|
|
"1.9.1" = {
|
|
sha256 = "sha256-0bSY4u44Ds84XPIbcT5Vt4AG/4PkzFKMl9CDGFZyIdI=";
|
|
};
|
|
"1.10.0" = {
|
|
sha256 = "sha256-MA8sf0F7Ch1wJDL8E8470ukKx7KieWyjWJnJQsqBVW8=";
|
|
};
|
|
}."${version}"; in
|
|
|
|
lib.throwIfNot (lib.versionAtLeast ppxlib.version "0.24.0")
|
|
"ppx_import is not available with ppxlib-${ppxlib.version}"
|
|
|
|
buildDunePackage rec {
|
|
pname = "ppx_import";
|
|
inherit version;
|
|
|
|
useDune2 = true;
|
|
|
|
minimalOCamlVersion = "4.05";
|
|
|
|
src = fetchurl {
|
|
url = "https://github.com/ocaml-ppx/ppx_import/releases/download/${version}/ppx_import-${version}.tbz";
|
|
inherit (param) sha256;
|
|
};
|
|
|
|
propagatedBuildInputs = [
|
|
ppxlib
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
ounit
|
|
ppx_deriving
|
|
ppx_sexp_conv
|
|
];
|
|
|
|
doCheck = true;
|
|
|
|
meta = {
|
|
description = "A syntax extension for importing declarations from interface files";
|
|
license = lib.licenses.mit;
|
|
homepage = "https://github.com/ocaml-ppx/ppx_import";
|
|
};
|
|
}
|