@@ -3,13 +3,13 @@
33, vmopts ? null
44}:
55
6−{ name, product, version, src, wmClass, jdk, meta, extraLdPath ? [] }:
6+{ name, product, version, src, wmClass, jdk, meta, extraLdPath ? [] }@args:
77
88with lib;
99
1010let loName = toLower product;
1111 hiName = toUpper product;
12− execName = concatStringsSep "-" (init (splitString "-" name));
12+ mainProgram = concatStringsSep "-" (init (splitString "-" name));
1313 vmoptsName = loName
1414 + ( if (with stdenv.hostPlatform; (is32bit || isDarwin))
1515 then ""
@@ -18,15 +18,17 @@ let loName = toLower product;
1818in
1919
2020with stdenv; lib.makeOverridable mkDerivation rec {
21− inherit name src meta;
21+ inherit name src;
22+ meta = args.meta // { inherit mainProgram; };
23+
2224 desktopItem = makeDesktopItem {
23− name = execName;
24− exec = execName;
25+ name = mainProgram;
26+ exec = mainProgram;
2527 comment = lib.replaceChars ["\n"] [" "] meta.longDescription;
2628 desktopName = product;
2729 genericName = meta.description;
2830 categories = "Development;";
29− icon = execName;
31+ icon = mainProgram;
3032 extraEntries = ''
3133 StartupWMClass=${wmClass}
3234 '';
@@ -64,13 +66,13 @@ with stdenv; lib.makeOverridable mkDerivation rec {
6466 installPhase = ''
6567 mkdir -p $out/{bin,$name,share/pixmaps,libexec/${name}}
6668 cp -a . $out/$name
67− ln -s $out/$name/bin/${loName}.png $out/share/pixmaps/${execName}.png
69+ ln -s $out/$name/bin/${loName}.png $out/share/pixmaps/${mainProgram}.png
6870 mv bin/fsnotifier* $out/libexec/${name}/.
6971
7072 jdk=${jdk.home}
7173 item=${desktopItem}
7274
73− makeWrapper "$out/$name/bin/${loName}.sh" "$out/bin/${execName}" \
75+ makeWrapper "$out/$name/bin/${loName}.sh" "$out/bin/${mainProgram}" \
7476 --prefix PATH : "$out/libexec/${name}:${lib.optionalString (stdenv.isDarwin) "${jdk}/jdk/Contents/Home/bin:"}${lib.makeBinPath [ jdk coreutils gnugrep which git ]}" \
7577 --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath ([
7678 # Some internals want libstdc++.so.6