From 38bf02df0aedd219d70be49c363ccac4da2d09ca Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 4 Sep 2019 20:17:02 +0200 Subject: lib: add packageName --- lib/default.nix | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib') 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; -- cgit v1.2.3