firefox-esr: Fix name

The Firefox wrapped called itself "firefox" rather than "firefox-esr".

Also eliminate a use of splitString which is evil and should never be
used.
This commit is contained in:
Eelco Dolstra 2016-04-01 13:51:24 +02:00
parent 13a1c7b8c1
commit 2f0195003e
2 changed files with 3 additions and 2 deletions

View File

@ -122,6 +122,7 @@ common = { pname, version, sha256 }: stdenv.mkDerivation rec {
passthru = {
inherit gtk nspr version;
isFirefox3Like = true;
browserName = pname;
};
};

View File

@ -9,8 +9,8 @@
}:
## configurability of the wrapper itself
browser :
{ browserName ? (lib.head (lib.splitString "-" browser.name)) # name of the executable
browser:
{ browserName ? browser.browserName or (builtins.parseDrvName browser.name).name
, name ? (browserName + "-" + (builtins.parseDrvName browser.name).version)
, desktopName ? # browserName with first letter capitalized
(lib.toUpper (lib.substring 0 1 browserName) + lib.substring 1 (-1) browserName)