diff options
author | Felix Buehler <account@buehler.rocks> | 2023-06-04 14:20:51 +0200 |
---|---|---|
committer | Felix Buehler <account@buehler.rocks> | 2023-06-06 22:54:31 +0200 |
commit | ed3b102d1e51fe69d73dac210719e3a75f69fa85 (patch) | |
tree | b3f5e8513913f0be81dd916ba9cd4bad8956a8a9 /pkgs/development/lisp-modules-obsolete | |
parent | f47f0a525cac079318e62fef27439f17afa18e7a (diff) |
treewide: use use lib.optionalAttrs instead of 'then {}'
Diffstat (limited to 'pkgs/development/lisp-modules-obsolete')
-rw-r--r-- | pkgs/development/lisp-modules-obsolete/quicklisp-to-nix-overrides.nix | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/pkgs/development/lisp-modules-obsolete/quicklisp-to-nix-overrides.nix b/pkgs/development/lisp-modules-obsolete/quicklisp-to-nix-overrides.nix index 6b0e72032126b..50bf5bcc461b6 100644 --- a/pkgs/development/lisp-modules-obsolete/quicklisp-to-nix-overrides.nix +++ b/pkgs/development/lisp-modules-obsolete/quicklisp-to-nix-overrides.nix @@ -4,8 +4,7 @@ let skipBuildPhase = x: { overrides = y: ((x.overrides y) // { buildPhase = "true"; }); }; - multiOverride = l: x: if l == [] then {} else - ((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: {}); |