diff options
author | Jan Tojnar <jtojnar@gmail.com> | 2020-03-24 01:51:55 +0100 |
---|---|---|
committer | Jan Tojnar <jtojnar@gmail.com> | 2020-03-24 01:51:55 +0100 |
commit | 986fbf47998f6ad70a084e702db24c11a01e5a83 (patch) | |
tree | c523b60b5fb0a3c5cbef5c515de538f1168e411e /pkgs/build-support | |
parent | bca769cbb789c7eb476154f809fcafb31a347c61 (diff) | |
parent | cbd504c0ae8eb3be7cbf0e28eee3d85c9d6b7ce4 (diff) | |
download | nixlib-986fbf47998f6ad70a084e702db24c11a01e5a83.tar nixlib-986fbf47998f6ad70a084e702db24c11a01e5a83.tar.gz nixlib-986fbf47998f6ad70a084e702db24c11a01e5a83.tar.bz2 nixlib-986fbf47998f6ad70a084e702db24c11a01e5a83.tar.lz nixlib-986fbf47998f6ad70a084e702db24c11a01e5a83.tar.xz nixlib-986fbf47998f6ad70a084e702db24c11a01e5a83.tar.zst nixlib-986fbf47998f6ad70a084e702db24c11a01e5a83.zip |
Merge branch 'staging-next' into staging
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/ocaml/dune.nix | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/pkgs/build-support/ocaml/dune.nix b/pkgs/build-support/ocaml/dune.nix index a0aac1447969..435bbe89c1c4 100644 --- a/pkgs/build-support/ocaml/dune.nix +++ b/pkgs/build-support/ocaml/dune.nix @@ -1,7 +1,9 @@ -{ stdenv, ocaml, findlib, dune, opaline }: +{ stdenv, ocaml, findlib, dune, dune_2, opaline }: { pname, version, buildInputs ? [], ... }@args: +let Dune = if args.useDune2 or false then dune_2 else dune; in + if args ? minimumOCamlVersion && ! stdenv.lib.versionAtLeast ocaml.version args.minimumOCamlVersion then throw "${pname}-${version} is not available for OCaml ${ocaml.version}" @@ -29,7 +31,7 @@ stdenv.mkDerivation ({ name = "ocaml${ocaml.version}-${pname}-${version}"; - buildInputs = [ ocaml dune findlib ] ++ buildInputs; + buildInputs = [ ocaml Dune findlib ] ++ buildInputs; meta = (args.meta or {}) // { platforms = args.meta.platforms or ocaml.meta.platforms; }; |