Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
56 lines
1.2 KiB
Nix
56 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
fetchurl,
|
|
buildDunePackage,
|
|
ocaml,
|
|
ounit,
|
|
ppx_deriving,
|
|
ppx_sexp_conv,
|
|
ppxlib,
|
|
version ? if lib.versionAtLeast ocaml.version "4.11" then "1.11.0" else "1.9.1",
|
|
}:
|
|
|
|
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;
|
|
|
|
minimalOCamlVersion = "4.05";
|
|
|
|
src = fetchurl {
|
|
url =
|
|
let
|
|
dir = if lib.versionAtLeast version "1.11" then "v${version}" else "${version}";
|
|
in
|
|
"https://github.com/ocaml-ppx/ppx_import/releases/download/${dir}/ppx_import-${version}.tbz";
|
|
|
|
hash =
|
|
{
|
|
"1.9.1" = "sha256-0bSY4u44Ds84XPIbcT5Vt4AG/4PkzFKMl9CDGFZyIdI=";
|
|
"1.11.0" = "sha256-Jmfv1IkQoaTkyxoxp9FI0ChNESqCaoDsA7D4ZUbOrBo=";
|
|
}
|
|
."${version}";
|
|
};
|
|
|
|
propagatedBuildInputs = [
|
|
ppxlib
|
|
];
|
|
|
|
checkInputs = [
|
|
ounit
|
|
ppx_deriving
|
|
ppx_sexp_conv
|
|
];
|
|
|
|
doCheck = true;
|
|
|
|
meta = {
|
|
description = "Syntax extension for importing declarations from interface files";
|
|
license = lib.licenses.mit;
|
|
homepage = "https://github.com/ocaml-ppx/ppx_import";
|
|
};
|
|
}
|