summary refs log tree commit diff
path: root/pkgs/build-support/ocaml
diff options
context:
space:
mode:
authorsuperherointj <5861043+superherointj@users.noreply.github.com>2021-06-10 11:17:11 -0300
committerVincent Laporte <vbgl@users.noreply.github.com>2021-06-11 11:08:12 +0200
commit15807923f9a9f4dd29f29f37b454a07220bdc922 (patch)
treebc95b9322b4681e06ab2d690cebe3340215c52e0 /pkgs/build-support/ocaml
parenta8aa34c80a379013db3480ea2e7752490c897938 (diff)
downloadnixpkgs-15807923f9a9f4dd29f29f37b454a07220bdc922.tar
nixpkgs-15807923f9a9f4dd29f29f37b454a07220bdc922.tar.gz
nixpkgs-15807923f9a9f4dd29f29f37b454a07220bdc922.tar.bz2
nixpkgs-15807923f9a9f4dd29f29f37b454a07220bdc922.tar.lz
nixpkgs-15807923f9a9f4dd29f29f37b454a07220bdc922.tar.xz
nixpkgs-15807923f9a9f4dd29f29f37b454a07220bdc922.tar.zst
nixpkgs-15807923f9a9f4dd29f29f37b454a07220bdc922.zip
build-support.ocaml.dune: handle minimalOCamlVersion typo
Diffstat (limited to 'pkgs/build-support/ocaml')
-rw-r--r--pkgs/build-support/ocaml/dune.nix6
1 files changed, 3 insertions, 3 deletions
diff --git a/pkgs/build-support/ocaml/dune.nix b/pkgs/build-support/ocaml/dune.nix
index 56fe8a60484..c049878d013 100644
--- a/pkgs/build-support/ocaml/dune.nix
+++ b/pkgs/build-support/ocaml/dune.nix
@@ -4,8 +4,8 @@
 
 let Dune = if args.useDune2 or false then dune_2 else dune_1; in
 
-if args ? minimumOCamlVersion &&
-   ! lib.versionAtLeast ocaml.version args.minimumOCamlVersion
+if (args ? minimumOCamlVersion && ! lib.versionAtLeast ocaml.version args.minimumOCamlVersion) ||
+   (args ? minimalOCamlVersion && ! lib.versionAtLeast ocaml.version args.minimalOCamlVersion)
 then throw "${pname}-${version} is not available for OCaml ${ocaml.version}"
 else
 
@@ -29,7 +29,7 @@ stdenv.mkDerivation ({
     runHook postInstall
   '';
 
-} // args // {
+} // (builtins.removeAttrs args [ "minimalOCamlVersion" ]) // {
 
   name = "ocaml${ocaml.version}-${pname}-${version}";