summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/default.nix2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/default.nix b/lib/default.nix
index 738e52186..574713e48 100644
--- a/lib/default.nix
+++ b/lib/default.nix
@@ -39,6 +39,8 @@ let
listToAttrs (map (name: nameValuePair name set.${name})
(filter (flip hasAttr set) names));
+ maybeHead = x: if isList x && length x > 0 then head x else null;
+
packageName = pkg:
pkg.pname or (parseDrvName pkg.name).name;