Skip to content

Commit 51457da

Browse files
committed
ocamlPackages.ulex: mark as unavailable for ocaml 5.0+
1 parent 9f8ced3 commit 51457da

File tree

1 file changed

+40
-36
lines changed

1 file changed

+40
-36
lines changed

pkgs/development/ocaml-modules/ulex/default.nix

Lines changed: 40 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -23,39 +23,43 @@ let
2323
};
2424
in
2525

26-
stdenv.mkDerivation rec {
27-
name = "ocaml${ocaml.version}-${pname}-${version}";
28-
inherit (param) version;
29-
30-
src = fetchFromGitHub {
31-
owner = "whitequark";
32-
repo = pname;
33-
rev = "v${version}";
34-
inherit (param) sha256;
35-
};
36-
37-
createFindlibDestdir = true;
38-
39-
nativeBuildInputs = [
40-
ocaml
41-
findlib
42-
ocamlbuild
43-
camlp4
44-
];
45-
propagatedBuildInputs = [ camlp4 ];
46-
47-
strictDeps = true;
48-
49-
buildFlags = [
50-
"all"
51-
"all.opt"
52-
];
53-
54-
meta = {
55-
inherit (src.meta) homepage;
56-
description = "Lexer generator for Unicode and OCaml";
57-
license = lib.licenses.mit;
58-
inherit (ocaml.meta) platforms;
59-
maintainers = [ lib.maintainers.roconnor ];
60-
};
61-
}
26+
lib.throwIf (lib.versionAtLeast ocaml.version "5.0")
27+
"ulex is not available for OCaml ${ocaml.version}"
28+
29+
stdenv.mkDerivation
30+
rec {
31+
name = "ocaml${ocaml.version}-${pname}-${version}";
32+
inherit (param) version;
33+
34+
src = fetchFromGitHub {
35+
owner = "whitequark";
36+
repo = pname;
37+
rev = "v${version}";
38+
inherit (param) sha256;
39+
};
40+
41+
createFindlibDestdir = true;
42+
43+
nativeBuildInputs = [
44+
ocaml
45+
findlib
46+
ocamlbuild
47+
camlp4
48+
];
49+
propagatedBuildInputs = [ camlp4 ];
50+
51+
strictDeps = true;
52+
53+
buildFlags = [
54+
"all"
55+
"all.opt"
56+
];
57+
58+
meta = {
59+
inherit (src.meta) homepage;
60+
description = "Lexer generator for Unicode and OCaml";
61+
license = lib.licenses.mit;
62+
inherit (ocaml.meta) platforms;
63+
maintainers = [ lib.maintainers.roconnor ];
64+
};
65+
}

0 commit comments

Comments
 (0)