mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-10-30 06:01:19 +00:00
ocamlPackages.buildDunePackage: add support for dune 3
This commit is contained in:
parent
97e5863569
commit
15f220b07c
@ -1,8 +1,11 @@
|
||||
{ lib, stdenv, ocaml, findlib, dune_1, dune_2 }:
|
||||
{ lib, stdenv, ocaml, findlib, dune_1, dune_2, dune_3 }:
|
||||
|
||||
{ pname, version, nativeBuildInputs ? [], enableParallelBuilding ? true, ... }@args:
|
||||
|
||||
let Dune = if args.useDune2 or true then dune_2 else dune_1; in
|
||||
let Dune =
|
||||
let dune-version = args . duneVersion or (if args.useDune2 or true then "2" else "1"); in
|
||||
{ "1" = dune_1; "2" = dune_2; "3" = dune_3; }."${dune-version}"
|
||||
; in
|
||||
|
||||
if (args ? minimumOCamlVersion && ! lib.versionAtLeast ocaml.version args.minimumOCamlVersion) ||
|
||||
(args ? minimalOCamlVersion && ! lib.versionAtLeast ocaml.version args.minimalOCamlVersion)
|
||||
@ -31,7 +34,7 @@ stdenv.mkDerivation ({
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
} // (builtins.removeAttrs args [ "minimalOCamlVersion" ]) // {
|
||||
} // (builtins.removeAttrs args [ "minimalOCamlVersion" "duneVersion" ]) // {
|
||||
|
||||
name = "ocaml${ocaml.version}-${pname}-${version}";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user