···3132 dontConfigure = true;
3334- postPatch = ''
0035 # The rpm/deb task definitions require a Gradle plugin which we don't
36 # have and so the build fails. We'll simply remove them here because
37 # they are not needed anyways.
···41 for file in $(find installers -name "build.gradle"); do
42 substituteInPlace $file --replace-warn "workingDir '/usr/bin'" "workingDir '.'"
43 done
44- '';
45-4647- buildPhase =
48- let
49- # The Linux installer is placed at linux/universal/tar whereas the MacOS
50- # one is at mac/tar.
51- task =
52- if stdenv.isDarwin then
53- ":installers:mac:tar:packageBuildResults"
54- else ":installers:linux:universal:tar:packageBuildResults";
55- extra_config = builtins.concatStringsSep " " extraConfig;
56- in
57- ''
58- runHook preBuild
5960- # Corretto's actual built is triggered via `gradle`.
61- gradle -Pcorretto.extra_config="${extra_config}" --console=plain --no-daemon ${task}
6263- # Prepare for the installPhase so that it looks like if a normal
64- # OpenJDK had been built.
65- dir=build/jdkImageName/images
66- mkdir -p $dir
67- file=$(find ./installers -name 'amazon-corretto-${version}*.tar.gz')
68- tar -xzf $file -C $dir
69- mv $dir/amazon-corretto-* $dir/jdk
7071- runHook postBuild
72- '';
00000007374 installPhase = oldAttrs.installPhase + ''
75 # The installPhase will place everything in $out/lib/openjdk and
···3132 dontConfigure = true;
3334+ postPatch = let
35+ extra_config = builtins.concatStringsSep " " extraConfig;
36+ in ''
37 # The rpm/deb task definitions require a Gradle plugin which we don't
38 # have and so the build fails. We'll simply remove them here because
39 # they are not needed anyways.
···43 for file in $(find installers -name "build.gradle"); do
44 substituteInPlace $file --replace-warn "workingDir '/usr/bin'" "workingDir '.'"
45 done
004647+ gradleFlagsArray+=(-Pcorretto.extra_config="${extra_config}")
48+ '';
00000000004950+ # since we dontConfigure, we must run this manually
51+ preBuild = "gradleConfigureHook";
5253+ # The Linux installer is placed at linux/universal/tar whereas the MacOS
54+ # one is at mac/tar.
55+ gradleBuildTask =
56+ if stdenv.isDarwin then
57+ ":installers:mac:tar:build"
58+ else ":installers:linux:universal:tar:packageBuildResults";
05960+ postBuild = ''
61+ # Prepare for the installPhase so that it looks like if a normal
62+ # OpenJDK had been built.
63+ dir=build/jdkImageName/images
64+ mkdir -p $dir
65+ file=$(find ./installers -name 'amazon-corretto-${version}*.tar.gz')
66+ tar -xzf $file -C $dir
67+ mv $dir/amazon-corretto-* $dir/jdk
68+ '' + oldAttrs.postBuild or "";
6970 installPhase = oldAttrs.installPhase + ''
71 # The installPhase will place everything in $out/lib/openjdk and