diff options
author | Vladimír Čunát <vcunat@gmail.com> | 2017-07-02 09:32:43 +0200 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2017-07-07 12:02:29 -0400 |
commit | dfc004e69c23cb48cce2c7537169a81b299a0af9 (patch) | |
tree | b297211c5ec12a3882e0940925687d74e4ae53ef /pkgs/stdenv | |
parent | 5afcdc88fa7ce9583eecec136de49685923e8df7 (diff) | |
download | nixlib-dfc004e69c23cb48cce2c7537169a81b299a0af9.tar nixlib-dfc004e69c23cb48cce2c7537169a81b299a0af9.tar.gz nixlib-dfc004e69c23cb48cce2c7537169a81b299a0af9.tar.bz2 nixlib-dfc004e69c23cb48cce2c7537169a81b299a0af9.tar.lz nixlib-dfc004e69c23cb48cce2c7537169a81b299a0af9.tar.xz nixlib-dfc004e69c23cb48cce2c7537169a81b299a0af9.tar.zst nixlib-dfc004e69c23cb48cce2c7537169a81b299a0af9.zip |
lib.lists.mutuallyExclusive: add function
Diffstat (limited to 'pkgs/stdenv')
-rw-r--r-- | pkgs/stdenv/generic/default.nix | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/pkgs/stdenv/generic/default.nix b/pkgs/stdenv/generic/default.nix index 065f4fb508de..690b917b3762 100644 --- a/pkgs/stdenv/generic/default.nix +++ b/pkgs/stdenv/generic/default.nix @@ -45,13 +45,8 @@ let throw ''‘${showLicense license}’ is not an attribute of lib.licenses'' ) list; - mutuallyExclusive = a: b: - (builtins.length a) == 0 || - (!(builtins.elem (builtins.head a) b) && - mutuallyExclusive (builtins.tail a) b); - areLicenseListsValid = - if mutuallyExclusive whitelist blacklist then + if lib.mutuallyExclusive whitelist blacklist then assert onlyLicenses whitelist; assert onlyLicenses blacklist; true else throw "whitelistedLicenses and blacklistedLicenses are not mutually exclusive."; |