Merge pull request #237631 from drupol/fix-pr-235924/add-missing-parentheses

treewide: use lib.optionalAttrs instead of 'then {}'
This commit is contained in:
Pol Dellaiera 2023-06-13 23:12:50 +02:00 committed by GitHub
commit 1f5a30f310
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,7 +4,7 @@ let
skipBuildPhase = x: {
overrides = y: ((x.overrides y) // { buildPhase = "true"; });
};
multiOverride = l: x: pkgs.lib.optionalAttrs (l != []) ((builtins.head l) x) // (multiOverride (builtins.tail l) x);
multiOverride = l: x: pkgs.lib.optionalAttrs (l != []) (((builtins.head l) x) // (multiOverride (builtins.tail l) x));
lispName = (clwrapper.lisp.pname or (builtins.parseDrvName clwrapper.lisp.name).name);
ifLispIn = l: f: if (pkgs.lib.elem lispName l) then f else (x: {});
ifLispNotIn = l: f: if ! (pkgs.lib.elem lispName l) then f else (x: {});