summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2019-09-04 20:17:02 +0200
committertv <tv@krebsco.de>2019-09-04 20:28:00 +0200
commit38bf02df0aedd219d70be49c363ccac4da2d09ca (patch)
tree9804d9498a3f1e40da4a9c767abf8a2a285fcb8e /lib
parentaac6c242e8da2d630da4b712e20622db604da75a (diff)
lib: add packageName
Diffstat (limited to 'lib')
-rw-r--r--lib/default.nix3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/default.nix b/lib/default.nix
index 8ba55b571..14e6e27a3 100644
--- a/lib/default.nix
+++ b/lib/default.nix
@@ -30,6 +30,9 @@ let
listToAttrs (map (name: nameValuePair name set.${name})
(filter (flip hasAttr set) names));
+ packageName = pkg:
+ pkg.pname or (parseDrvName pkg.name).name;
+
test = re: x: isString x && testString re x;
testString = re: x: match re x != null;