Merge pull request #125498 from Atemu/jetbrains-mainProgram
This commit is contained in:
commit
71a97e076d
@ -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
|
||||
|
@ -24,9 +24,8 @@ openjdk11.overrideAttrs (oldAttrs: rec {
|
||||
your own risk.
|
||||
'';
|
||||
homepage = "https://bintray.com/jetbrains/intellij-jdk/";
|
||||
license = licenses.gpl2;
|
||||
inherit (openjdk11.meta) license platforms mainProgram;
|
||||
maintainers = with maintainers; [ edwtjo petabyteboy ];
|
||||
platforms = [ "i686-linux" "x86_64-linux" "aarch64-linux" "armv7l-linux" "armv6l-linux" ];
|
||||
};
|
||||
passthru = oldAttrs.passthru // {
|
||||
home = "${jetbrains.jdk}/lib/openjdk";
|
||||
|
@ -136,14 +136,7 @@ let
|
||||
|
||||
disallowedReferences = [ openjdk11-bootstrap ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://openjdk.java.net/";
|
||||
license = licenses.gpl2;
|
||||
description = "The open-source Java Development Kit";
|
||||
maintainers = with maintainers; [ edwtjo asbachb ];
|
||||
platforms = [ "i686-linux" "x86_64-linux" "aarch64-linux" "armv7l-linux" "armv6l-linux" ];
|
||||
mainProgram = "java";
|
||||
};
|
||||
meta = import ./meta.nix lib;
|
||||
|
||||
passthru = {
|
||||
architecture = "";
|
||||
|
@ -145,14 +145,7 @@ let
|
||||
|
||||
disallowedReferences = [ openjdk11 ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://openjdk.java.net/";
|
||||
license = licenses.gpl2;
|
||||
description = "The open-source Java Development Kit";
|
||||
maintainers = with maintainers; [ edwtjo ];
|
||||
platforms = [ "i686-linux" "x86_64-linux" "aarch64-linux" "armv7l-linux" "armv6l-linux" ];
|
||||
mainProgram = "java";
|
||||
};
|
||||
meta = import ./meta.nix lib;
|
||||
|
||||
passthru = {
|
||||
architecture = "";
|
||||
|
@ -145,14 +145,7 @@ let
|
||||
|
||||
disallowedReferences = [ openjdk13-bootstrap ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://openjdk.java.net/";
|
||||
license = licenses.gpl2;
|
||||
description = "The open-source Java Development Kit";
|
||||
maintainers = with maintainers; [ edwtjo ];
|
||||
platforms = [ "i686-linux" "x86_64-linux" "aarch64-linux" "armv7l-linux" "armv6l-linux" ];
|
||||
mainProgram = "java";
|
||||
};
|
||||
meta = import ./meta.nix lib;
|
||||
|
||||
passthru = {
|
||||
architecture = "";
|
||||
|
@ -141,14 +141,7 @@ let
|
||||
|
||||
disallowedReferences = [ openjdk14-bootstrap ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://openjdk.java.net/";
|
||||
license = licenses.gpl2;
|
||||
description = "The open-source Java Development Kit";
|
||||
maintainers = with maintainers; [ edwtjo ];
|
||||
platforms = [ "i686-linux" "x86_64-linux" "aarch64-linux" "armv7l-linux" "armv6l-linux" ];
|
||||
mainProgram = "java";
|
||||
};
|
||||
meta = import ./meta.nix lib;
|
||||
|
||||
passthru = {
|
||||
architecture = "";
|
||||
|
@ -141,14 +141,7 @@ let
|
||||
|
||||
disallowedReferences = [ openjdk15-bootstrap ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://openjdk.java.net/";
|
||||
license = licenses.gpl2;
|
||||
description = "The open-source Java Development Kit";
|
||||
maintainers = with maintainers; [ edwtjo ];
|
||||
platforms = [ "i686-linux" "x86_64-linux" "aarch64-linux" "armv7l-linux" "armv6l-linux" ];
|
||||
mainProgram = "java";
|
||||
};
|
||||
meta = import ./meta.nix lib;
|
||||
|
||||
passthru = {
|
||||
architecture = "";
|
||||
|
@ -147,14 +147,7 @@ let
|
||||
|
||||
disallowedReferences = [ openjdk16-bootstrap ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://openjdk.java.net/";
|
||||
license = licenses.gpl2;
|
||||
description = "The open-source Java Development Kit";
|
||||
maintainers = with maintainers; [ edwtjo ];
|
||||
platforms = [ "i686-linux" "x86_64-linux" "aarch64-linux" "armv7l-linux" "armv6l-linux" ];
|
||||
mainProgram = "java";
|
||||
};
|
||||
meta = import ./meta.nix lib;
|
||||
|
||||
passthru = {
|
||||
architecture = "";
|
||||
|
@ -69,10 +69,6 @@ let
|
||||
home = jdk;
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
license = licenses.gpl2;
|
||||
platforms = platforms.darwin;
|
||||
};
|
||||
|
||||
meta = import ./meta.nix lib;
|
||||
};
|
||||
in jdk
|
||||
|
@ -73,10 +73,6 @@ let
|
||||
home = jdk;
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
license = licenses.gpl2;
|
||||
platforms = platforms.darwin;
|
||||
};
|
||||
|
||||
meta = import ./meta.nix lib;
|
||||
};
|
||||
in jdk
|
||||
|
@ -69,10 +69,6 @@ let
|
||||
home = jdk;
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
license = licenses.gpl2;
|
||||
platforms = platforms.darwin;
|
||||
};
|
||||
|
||||
meta = import ./meta.nix lib;
|
||||
};
|
||||
in jdk
|
||||
|
4
pkgs/development/compilers/openjdk/darwin/meta.nix
Normal file
4
pkgs/development/compilers/openjdk/darwin/meta.nix
Normal file
@ -0,0 +1,4 @@
|
||||
lib: (removeAttrs (import ../meta.nix lib) [ "maintainers" ]) // {
|
||||
platforms = lib.platforms.darwin;
|
||||
homepage = "https://www.azul.com/";
|
||||
}
|
8
pkgs/development/compilers/openjdk/meta.nix
Normal file
8
pkgs/development/compilers/openjdk/meta.nix
Normal file
@ -0,0 +1,8 @@
|
||||
lib: with lib; {
|
||||
homepage = "https://openjdk.java.net/";
|
||||
license = licenses.gpl2Only;
|
||||
description = "The open-source Java Development Kit";
|
||||
maintainers = with maintainers; [ edwtjo asbachb ];
|
||||
platforms = [ "i686-linux" "x86_64-linux" "aarch64-linux" "armv7l-linux" "armv6l-linux" ];
|
||||
mainProgram = "java";
|
||||
}
|
Loading…
Reference in New Issue
Block a user