about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/editors/jetbrains/common.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/editors/jetbrains/common.nix')
-rw-r--r--nixpkgs/pkgs/applications/editors/jetbrains/common.nix18
1 files changed, 10 insertions, 8 deletions
diff --git a/nixpkgs/pkgs/applications/editors/jetbrains/common.nix b/nixpkgs/pkgs/applications/editors/jetbrains/common.nix
index 635a8dbf46f7..dcbaa136795a 100644
--- a/nixpkgs/pkgs/applications/editors/jetbrains/common.nix
+++ b/nixpkgs/pkgs/applications/editors/jetbrains/common.nix
@@ -3,13 +3,13 @@
 , vmopts ? null
 }:
 
-{ name, product, version, src, wmClass, jdk, meta, extraLdPath ? [] }:
+{ name, product, version, src, wmClass, jdk, meta, extraLdPath ? [] }@args:
 
 with lib;
 
 let loName = toLower product;
     hiName = toUpper product;
-    execName = concatStringsSep "-" (init (splitString "-" name));
+    mainProgram = concatStringsSep "-" (init (splitString "-" name));
     vmoptsName = loName
                + ( if (with stdenv.hostPlatform; (is32bit || isDarwin))
                    then ""
@@ -18,15 +18,17 @@ let loName = toLower product;
 in
 
 with stdenv; lib.makeOverridable mkDerivation rec {
-  inherit name src meta;
+  inherit name src;
+  meta = args.meta // { inherit mainProgram; };
+
   desktopItem = makeDesktopItem {
-    name = execName;
-    exec = execName;
+    name = mainProgram;
+    exec = mainProgram;
     comment = lib.replaceChars ["\n"] [" "] meta.longDescription;
     desktopName = product;
     genericName = meta.description;
     categories = "Development;";
-    icon = execName;
+    icon = mainProgram;
     extraEntries = ''
       StartupWMClass=${wmClass}
     '';
@@ -64,13 +66,13 @@ with stdenv; lib.makeOverridable mkDerivation rec {
   installPhase = ''
     mkdir -p $out/{bin,$name,share/pixmaps,libexec/${name}}
     cp -a . $out/$name
-    ln -s $out/$name/bin/${loName}.png $out/share/pixmaps/${execName}.png
+    ln -s $out/$name/bin/${loName}.png $out/share/pixmaps/${mainProgram}.png
     mv bin/fsnotifier* $out/libexec/${name}/.
 
     jdk=${jdk.home}
     item=${desktopItem}
 
-    makeWrapper "$out/$name/bin/${loName}.sh" "$out/bin/${execName}" \
+    makeWrapper "$out/$name/bin/${loName}.sh" "$out/bin/${mainProgram}" \
       --prefix PATH : "$out/libexec/${name}:${lib.optionalString (stdenv.isDarwin) "${jdk}/jdk/Contents/Home/bin:"}${lib.makeBinPath [ jdk coreutils gnugrep which git ]}" \
       --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath ([
         # Some internals want libstdc++.so.6