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
|
||||
];
|
||||
|
||||
JAVA_HOME = mvnJdk;
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
lib,
|
||||
callPackage,
|
||||
fetchurl,
|
||||
jdk,
|
||||
jdk_headless,
|
||||
makeWrapper,
|
||||
stdenvNoCC,
|
||||
}:
|
||||
@ -27,9 +27,9 @@ stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
cp -r apache-maven-${finalAttrs.version}/* $out/maven
|
||||
|
||||
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 \
|
||||
--set-default JAVA_HOME "${jdk}"
|
||||
--set-default JAVA_HOME "${jdk_headless}"
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
@ -55,6 +55,6 @@ stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
license = lib.licenses.asl20;
|
||||
mainProgram = "mvn";
|
||||
maintainers = with lib.maintainers; [ ];
|
||||
inherit (jdk.meta) platforms;
|
||||
inherit (jdk_headless.meta) platforms;
|
||||
};
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user