rundeck-cli: replace `jdk` with `jre11_minimal_headless` (#422077)

authored by Pol Dellaiera and committed by GitHub e3cf06d6 79e56adb

+45 -32
+11 -7
pkgs/by-name/ru/rundeck-cli/package.nix
··· 2 lib, 3 stdenv, 4 fetchurl, 5 - makeWrapper, 6 - jdk11, 7 - unzip, 8 versionCheckHook, 9 nix-update-script, 10 }: 11 - 12 stdenv.mkDerivation (finalAttrs: { 13 pname = "rundeck-cli"; 14 version = "2.0.9"; ··· 18 hash = "sha256-c6QAgwyRCtoOlS7DEmjyK3BwHV122bilL6H+Hzrv2dQ="; 19 }; 20 21 - nativeBuildInputs = [ makeWrapper ]; 22 - buildInputs = [ jdk11 ]; 23 24 dontUnpack = true; 25 ··· 30 cp $src $out/share/rundeck-cli/rundeck-cli.jar 31 32 mkdir -p $out/bin 33 - makeWrapper ${lib.getExe jdk11} $out/bin/rd \ 34 --add-flags "-jar $out/share/rundeck-cli/rundeck-cli.jar" 35 36 runHook postInstall
··· 2 lib, 3 stdenv, 4 fetchurl, 5 + makeBinaryWrapper, 6 + jre11_minimal, 7 + jdk11_headless, 8 versionCheckHook, 9 nix-update-script, 10 }: 11 + let 12 + jre11_minimal_headless = jre11_minimal.override { 13 + jdk = jdk11_headless; 14 + }; 15 + in 16 stdenv.mkDerivation (finalAttrs: { 17 pname = "rundeck-cli"; 18 version = "2.0.9"; ··· 22 hash = "sha256-c6QAgwyRCtoOlS7DEmjyK3BwHV122bilL6H+Hzrv2dQ="; 23 }; 24 25 + nativeBuildInputs = [ makeBinaryWrapper ]; 26 + buildInputs = [ jre11_minimal_headless ]; 27 28 dontUnpack = true; 29 ··· 34 cp $src $out/share/rundeck-cli/rundeck-cli.jar 35 36 mkdir -p $out/bin 37 + makeWrapper ${lib.getExe jre11_minimal_headless} $out/bin/rd \ 38 --add-flags "-jar $out/share/rundeck-cli/rundeck-cli.jar" 39 40 runHook postInstall
+30 -25
pkgs/development/compilers/openjdk/jre.nix
··· 7 modules ? [ "java.base" ], 8 }: 9 10 - let 11 - jre = stdenv.mkDerivation { 12 - pname = "${jdk.pname}-minimal-jre"; 13 - version = jdk.version; 14 15 - nativeBuildInputs = [ jdkOnBuild ]; 16 - buildInputs = [ jdk ]; 17 - strictDeps = true; 18 19 - dontUnpack = true; 20 21 - # Strip more heavily than the default '-S', since if you're 22 - # using this derivation you probably care about this. 23 - stripDebugFlags = [ "--strip-unneeded" ]; 24 25 - buildPhase = '' 26 - runHook preBuild 27 28 - jlink --module-path ${jdk}/lib/openjdk/jmods --add-modules ${lib.concatStringsSep "," modules} --output $out 29 30 - runHook postBuild 31 - ''; 32 33 - dontInstall = true; 34 35 - passthru = { 36 - home = "${jre}"; 37 - tests = { 38 - jre_minimal-hello = callPackage ./tests/test_jre_minimal.nix { }; 39 - jre_minimal-hello-logging = callPackage ./tests/test_jre_minimal_with_logging.nix { }; 40 - }; 41 }; 42 }; 43 - in 44 - jre
··· 7 modules ? [ "java.base" ], 8 }: 9 10 + stdenv.mkDerivation (finalAttrs: { 11 + pname = "${jdk.pname}-minimal-jre"; 12 + version = jdk.version; 13 14 + nativeBuildInputs = [ jdkOnBuild ]; 15 + buildInputs = [ jdk ]; 16 + strictDeps = true; 17 18 + dontUnpack = true; 19 20 + # Strip more heavily than the default '-S', since if you're 21 + # using this derivation you probably care about this. 22 + stripDebugFlags = [ "--strip-unneeded" ]; 23 24 + buildPhase = '' 25 + runHook preBuild 26 27 + jlink --module-path ${jdk}/lib/openjdk/jmods --add-modules ${lib.concatStringsSep "," modules} --output $out 28 29 + runHook postBuild 30 + ''; 31 32 + dontInstall = true; 33 34 + passthru = { 35 + home = "${finalAttrs.finalPackage}"; 36 + tests = { 37 + jre_minimal-hello = callPackage ./tests/test_jre_minimal.nix { }; 38 + jre_minimal-hello-logging = callPackage ./tests/test_jre_minimal_with_logging.nix { }; 39 }; 40 }; 41 + 42 + meta = jdk.meta // { 43 + description = "Minimal JRE for OpenJDK ${jdk.version}"; 44 + longDescription = '' 45 + This is a minimal JRE built from OpenJDK, containing only the specified modules. 46 + It is suitable for running Java applications that do not require the full JDK. 47 + ''; 48 + }; 49 + })
+4
pkgs/top-level/all-packages.nix
··· 5668 jre = jdk; 5669 jre_headless = jdk_headless; 5670 5671 jre17_minimal = callPackage ../development/compilers/openjdk/jre.nix { 5672 jdk = jdk17; 5673 jdkOnBuild = buildPackages.jdk17;
··· 5668 jre = jdk; 5669 jre_headless = jdk_headless; 5670 5671 + jre11_minimal = callPackage ../development/compilers/openjdk/jre.nix { 5672 + jdk = jdk11; 5673 + jdkOnBuild = buildPackages.jdk11; 5674 + }; 5675 jre17_minimal = callPackage ../development/compilers/openjdk/jre.nix { 5676 jdk = jdk17; 5677 jdkOnBuild = buildPackages.jdk17;