mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 15:33:13 +00:00
maven: use headless jdk to avoid GUI dependencies
This fixes build with environment.noXlibs enabled.
This commit is contained in:
parent
a674dd9f11
commit
ea0bc32245
@ -87,6 +87,8 @@ stdenv.mkDerivation (builtins.removeAttrs args [ "mvnFetchExtraArgs" ] // {
|
|||||||
maven
|
maven
|
||||||
];
|
];
|
||||||
|
|
||||||
|
JAVA_HOME = mvnJdk;
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
runHook preBuild
|
runHook preBuild
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
lib,
|
lib,
|
||||||
callPackage,
|
callPackage,
|
||||||
fetchurl,
|
fetchurl,
|
||||||
jdk,
|
jdk_headless,
|
||||||
makeWrapper,
|
makeWrapper,
|
||||||
stdenvNoCC,
|
stdenvNoCC,
|
||||||
}:
|
}:
|
||||||
@ -27,9 +27,9 @@ stdenvNoCC.mkDerivation (finalAttrs: {
|
|||||||
cp -r apache-maven-${finalAttrs.version}/* $out/maven
|
cp -r apache-maven-${finalAttrs.version}/* $out/maven
|
||||||
|
|
||||||
makeWrapper $out/maven/bin/mvn $out/bin/mvn \
|
makeWrapper $out/maven/bin/mvn $out/bin/mvn \
|
||||||
--set-default JAVA_HOME "${jdk}"
|
--set-default JAVA_HOME "${jdk_headless}"
|
||||||
makeWrapper $out/maven/bin/mvnDebug $out/bin/mvnDebug \
|
makeWrapper $out/maven/bin/mvnDebug $out/bin/mvnDebug \
|
||||||
--set-default JAVA_HOME "${jdk}"
|
--set-default JAVA_HOME "${jdk_headless}"
|
||||||
|
|
||||||
runHook postInstall
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
@ -55,6 +55,6 @@ stdenvNoCC.mkDerivation (finalAttrs: {
|
|||||||
license = lib.licenses.asl20;
|
license = lib.licenses.asl20;
|
||||||
mainProgram = "mvn";
|
mainProgram = "mvn";
|
||||||
maintainers = with lib.maintainers; [ ];
|
maintainers = with lib.maintainers; [ ];
|
||||||
inherit (jdk.meta) platforms;
|
inherit (jdk_headless.meta) platforms;
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user