diff options
author | lassulus <lassulus@lassul.us> | 2021-12-23 21:49:55 +0100 |
---|---|---|
committer | lassulus <lassulus@lassul.us> | 2021-12-23 21:49:55 +0100 |
commit | 29b796f5216a6743f6c0230b23048fada0d6c2ef (patch) | |
tree | 77a856185e5d0b47b334651900a54d6e566c1c83 /lib | |
parent | fb9ef6eda60b4d36c288c0c8806dbcb32df54a10 (diff) | |
parent | d4521eb339a47c52c5e8f7d82969b54f6dce1e9c (diff) |
Merge remote-tracking branch 'ni/master'
Diffstat (limited to 'lib')
-rw-r--r-- | lib/default.nix | 2 |
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; |