git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #125498 from Atemu/jetbrains-mainProgram
commit71a97e076d116729ab763896088bb0c721e94e4d authorSandro <sandro.jaeckel@gmail.com> dateThu 17 Jun 2021, 01:45 (5 years ago) parent4f64628ec9b2e2
13 files changed+32−73
pkgs/applications/editors/jetbrains/common.nix+10−8 pkgs/development/compilers/jetbrains-jdk/default.nix+1−2 pkgs/development/compilers/openjdk/11.nix+1−8 pkgs/development/compilers/openjdk/12.nix+1−8 pkgs/development/compilers/openjdk/13.nix+1−8 pkgs/development/compilers/openjdk/14.nix+1−8 pkgs/development/compilers/openjdk/15.nix+1−8 pkgs/development/compilers/openjdk/16.nix+1−8 pkgs/development/compilers/openjdk/darwin/11.nix+1−5 pkgs/development/compilers/openjdk/darwin/8.nix+1−5 pkgs/development/compilers/openjdk/darwin/default.nix+1−5 pkgs/development/compilers/openjdk/darwin/meta.nix+4 pkgs/development/compilers/openjdk/meta.nix+8
pkgs/applications/editors/jetbrains/common.nix+10−8
@@ -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
pkgs/development/compilers/jetbrains-jdk/default.nix+1−2
@@ -24,9 +24,8 @@ openjdk11.overrideAttrs (oldAttrs: rec {
2424 your own risk.
2525 '';
2626 homepage = "https://bintray.com/jetbrains/intellij-jdk/";
27− license = licenses.gpl2;
27+ inherit (openjdk11.meta) license platforms mainProgram;
2828 maintainers = with maintainers; [ edwtjo petabyteboy ];
29− platforms = [ "i686-linux" "x86_64-linux" "aarch64-linux" "armv7l-linux" "armv6l-linux" ];
3029 };
3130 passthru = oldAttrs.passthru // {
3231 home = "${jetbrains.jdk}/lib/openjdk";
pkgs/development/compilers/openjdk/11.nix+1−8
@@ -136,14 +136,7 @@ let
136136
137137 disallowedReferences = [ openjdk11-bootstrap ];
138138
139− meta = with lib; {
140− homepage = "http://openjdk.java.net/";
141− license = licenses.gpl2;
142− description = "The open-source Java Development Kit";
143− maintainers = with maintainers; [ edwtjo asbachb ];
144− platforms = [ "i686-linux" "x86_64-linux" "aarch64-linux" "armv7l-linux" "armv6l-linux" ];
145− mainProgram = "java";
146− };
139+ meta = import ./meta.nix lib;
147140
148141 passthru = {
149142 architecture = "";
pkgs/development/compilers/openjdk/12.nix+1−8
@@ -145,14 +145,7 @@ let
145145
146146 disallowedReferences = [ openjdk11 ];
147147
148− meta = with lib; {
149− homepage = "http://openjdk.java.net/";
150− license = licenses.gpl2;
151− description = "The open-source Java Development Kit";
152− maintainers = with maintainers; [ edwtjo ];
153− platforms = [ "i686-linux" "x86_64-linux" "aarch64-linux" "armv7l-linux" "armv6l-linux" ];
154− mainProgram = "java";
155− };
148+ meta = import ./meta.nix lib;
156149
157150 passthru = {
158151 architecture = "";
pkgs/development/compilers/openjdk/13.nix+1−8
@@ -145,14 +145,7 @@ let
145145
146146 disallowedReferences = [ openjdk13-bootstrap ];
147147
148− meta = with lib; {
149− homepage = "http://openjdk.java.net/";
150− license = licenses.gpl2;
151− description = "The open-source Java Development Kit";
152− maintainers = with maintainers; [ edwtjo ];
153− platforms = [ "i686-linux" "x86_64-linux" "aarch64-linux" "armv7l-linux" "armv6l-linux" ];
154− mainProgram = "java";
155− };
148+ meta = import ./meta.nix lib;
156149
157150 passthru = {
158151 architecture = "";
pkgs/development/compilers/openjdk/14.nix+1−8
@@ -141,14 +141,7 @@ let
141141
142142 disallowedReferences = [ openjdk14-bootstrap ];
143143
144− meta = with lib; {
145− homepage = "https://openjdk.java.net/";
146− license = licenses.gpl2;
147− description = "The open-source Java Development Kit";
148− maintainers = with maintainers; [ edwtjo ];
149− platforms = [ "i686-linux" "x86_64-linux" "aarch64-linux" "armv7l-linux" "armv6l-linux" ];
150− mainProgram = "java";
151− };
144+ meta = import ./meta.nix lib;
152145
153146 passthru = {
154147 architecture = "";
pkgs/development/compilers/openjdk/15.nix+1−8
@@ -141,14 +141,7 @@ let
141141
142142 disallowedReferences = [ openjdk15-bootstrap ];
143143
144− meta = with lib; {
145− homepage = "https://openjdk.java.net/";
146− license = licenses.gpl2;
147− description = "The open-source Java Development Kit";
148− maintainers = with maintainers; [ edwtjo ];
149− platforms = [ "i686-linux" "x86_64-linux" "aarch64-linux" "armv7l-linux" "armv6l-linux" ];
150− mainProgram = "java";
151− };
144+ meta = import ./meta.nix lib;
152145
153146 passthru = {
154147 architecture = "";
pkgs/development/compilers/openjdk/16.nix+1−8
@@ -147,14 +147,7 @@ let
147147
148148 disallowedReferences = [ openjdk16-bootstrap ];
149149
150− meta = with lib; {
151− homepage = "https://openjdk.java.net/";
152− license = licenses.gpl2;
153− description = "The open-source Java Development Kit";
154− maintainers = with maintainers; [ edwtjo ];
155− platforms = [ "i686-linux" "x86_64-linux" "aarch64-linux" "armv7l-linux" "armv6l-linux" ];
156− mainProgram = "java";
157− };
150+ meta = import ./meta.nix lib;
158151
159152 passthru = {
160153 architecture = "";
pkgs/development/compilers/openjdk/darwin/11.nix+1−5
@@ -69,10 +69,6 @@ let
6969 home = jdk;
7070 };
7171
72− meta = with lib; {
73− license = licenses.gpl2;
74− platforms = platforms.darwin;
75− };
76−
72+ meta = import ./meta.nix lib;
7773 };
7874in jdk
pkgs/development/compilers/openjdk/darwin/8.nix+1−5
@@ -73,10 +73,6 @@ let
7373 home = jdk;
7474 };
7575
76− meta = with lib; {
77− license = licenses.gpl2;
78− platforms = platforms.darwin;
79− };
80−
76+ meta = import ./meta.nix lib;
8177 };
8278in jdk
pkgs/development/compilers/openjdk/darwin/default.nix+1−5
@@ -69,10 +69,6 @@ let
6969 home = jdk;
7070 };
7171
72− meta = with lib; {
73− license = licenses.gpl2;
74− platforms = platforms.darwin;
75− };
76−
72+ meta = import ./meta.nix lib;
7773 };
7874in jdk
pkgs/development/compilers/openjdk/darwin/meta.nixnew file+4
@@ -0,0 +1,4 @@
1+lib: (removeAttrs (import ../meta.nix lib) [ "maintainers" ]) // {
2+ platforms = lib.platforms.darwin;
3+ homepage = "https://www.azul.com/";
4+}
pkgs/development/compilers/openjdk/meta.nixnew file+8
@@ -0,0 +1,8 @@
1+lib: with lib; {
2+ homepage = "https://openjdk.java.net/";
3+ license = licenses.gpl2Only;
4+ description = "The open-source Java Development Kit";
5+ maintainers = with maintainers; [ edwtjo asbachb ];
6+ platforms = [ "i686-linux" "x86_64-linux" "aarch64-linux" "armv7l-linux" "armv6l-linux" ];
7+ mainProgram = "java";
8+}