diff options
author | tv <tv@krebsco.de> | 2019-09-04 20:17:02 +0200 |
---|---|---|
committer | tv <tv@krebsco.de> | 2019-09-04 20:28:00 +0200 |
commit | 9993d4d94ee83fef3dcf4da3ed5c86c197e58220 (patch) | |
tree | 7b1871a8865a47d959f6ce5d8e34a9fdf41173d2 /lib/default.nix | |
parent | 31d85e4997f081dd09186e66b6ec042a2013df66 (diff) |
lib: add packageName
Diffstat (limited to 'lib/default.nix')
-rw-r--r-- | lib/default.nix | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/default.nix b/lib/default.nix index 8ba55b5..14e6e27 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; |