summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2021-12-23 21:49:55 +0100
committerlassulus <lassulus@lassul.us>2021-12-23 21:49:55 +0100
commit29b796f5216a6743f6c0230b23048fada0d6c2ef (patch)
tree77a856185e5d0b47b334651900a54d6e566c1c83 /lib
parentfb9ef6eda60b4d36c288c0c8806dbcb32df54a10 (diff)
parentd4521eb339a47c52c5e8f7d82969b54f6dce1e9c (diff)
Merge remote-tracking branch 'ni/master'
Diffstat (limited to 'lib')
-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;