ocamlPackages.dune_2: use pkgs.dune_2 for OCaml < 4.07

authored by Vincent Laporte and committed by Vincent Laporte f31adf28 311e883b

+6 -1
+6 -1
pkgs/top-level/ocaml-packages.nix
··· 217 217 218 218 dune = callPackage ../development/tools/ocaml/dune { }; 219 219 220 - dune_2 = callPackage ../development/tools/ocaml/dune/2.nix { }; 220 + dune_2 = 221 + if lib.versionAtLeast ocaml.version "4.07" 222 + then callPackage ../development/tools/ocaml/dune/2.nix { } 223 + else if lib.versionAtLeast ocaml.version "4.02" 224 + then pkgs.dune_2 225 + else throw "dune_2 is not available for OCaml ${ocaml.version}"; 221 226 222 227 dune-build-info = callPackage ../development/ocaml-modules/dune-build-info { }; 223 228