diff options
author | Anders Kaseorg <andersk@mit.edu> | 2022-04-25 13:35:24 -0700 |
---|---|---|
committer | Anders Kaseorg <andersk@mit.edu> | 2022-04-25 13:35:24 -0700 |
commit | 6920d8ca42b081c874486ad16fc66f43d8bb8074 (patch) | |
tree | 7dcfdc6b44c84a854a68c9bc36d849e5c9470ad5 /pkgs/build-support | |
parent | 00e66f10fa1120875201eace3b0a238f7d1b39ca (diff) | |
download | nixpkgs-6920d8ca42b081c874486ad16fc66f43d8bb8074.tar nixpkgs-6920d8ca42b081c874486ad16fc66f43d8bb8074.tar.gz nixpkgs-6920d8ca42b081c874486ad16fc66f43d8bb8074.tar.bz2 nixpkgs-6920d8ca42b081c874486ad16fc66f43d8bb8074.tar.lz nixpkgs-6920d8ca42b081c874486ad16fc66f43d8bb8074.tar.xz nixpkgs-6920d8ca42b081c874486ad16fc66f43d8bb8074.tar.zst nixpkgs-6920d8ca42b081c874486ad16fc66f43d8bb8074.zip |
treewide: Simplify negated uses of versionAtLeast, versionOlder
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/ocaml/dune.nix | 4 | ||||
-rw-r--r-- | pkgs/build-support/ocaml/oasis.nix | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/pkgs/build-support/ocaml/dune.nix b/pkgs/build-support/ocaml/dune.nix index f82bac7d199..2ded76d3cd4 100644 --- a/pkgs/build-support/ocaml/dune.nix +++ b/pkgs/build-support/ocaml/dune.nix @@ -7,8 +7,8 @@ let Dune = { "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) +if (args ? minimumOCamlVersion && lib.versionOlder ocaml.version args.minimumOCamlVersion) || + (args ? minimalOCamlVersion && lib.versionOlder ocaml.version args.minimalOCamlVersion) then throw "${pname}-${version} is not available for OCaml ${ocaml.version}" else diff --git a/pkgs/build-support/ocaml/oasis.nix b/pkgs/build-support/ocaml/oasis.nix index 8f81344daf0..91daad59050 100644 --- a/pkgs/build-support/ocaml/oasis.nix +++ b/pkgs/build-support/ocaml/oasis.nix @@ -8,7 +8,7 @@ }@args: if args ? minimumOCamlVersion && - ! lib.versionAtLeast ocaml.version args.minimumOCamlVersion + lib.versionOlder ocaml.version args.minimumOCamlVersion then throw "${pname}-${version} is not available for OCaml ${ocaml.version}" else |