From 1e0b14522ac929abb3f7d51480f2357b7a61b1aa Mon Sep 17 00:00:00 2001 From: Nicolas Pierron Date: Sun, 3 Jan 2010 11:07:05 +0000 Subject: [PATCH] * Retrieve the filename of a path. svn path=/nixpkgs/trunk/; revision=19180 --- pkgs/lib/strings.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/lib/strings.nix b/pkgs/lib/strings.nix index e82fa0ebae08..838990793276 100644 --- a/pkgs/lib/strings.nix +++ b/pkgs/lib/strings.nix @@ -141,4 +141,6 @@ rec { else s; + basename = s: lib.last (splitString "/" s); + }