mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-16 09:54:52 +00:00
buildMavenPackage: add overrideMavenAttrs function
This commit is contained in:
parent
fcdc4b9767
commit
9492bc8f7a
@ -6,7 +6,6 @@
|
||||
makeWrapper,
|
||||
stdenvNoCC,
|
||||
}:
|
||||
|
||||
stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
pname = "maven";
|
||||
version = "3.9.9";
|
||||
@ -34,14 +33,31 @@ stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
buildMaven = callPackage ./build-maven.nix {
|
||||
maven = finalAttrs.finalPackage;
|
||||
passthru =
|
||||
let
|
||||
makeOverridableMavenPackage =
|
||||
mavenRecipe: mavenArgs:
|
||||
let
|
||||
drv = mavenRecipe mavenArgs;
|
||||
overrideWith =
|
||||
newArgs: mavenArgs // (if lib.isFunction newArgs then newArgs mavenArgs else newArgs);
|
||||
in
|
||||
drv
|
||||
// {
|
||||
overrideMavenAttrs = newArgs: makeOverridableMavenPackage mavenRecipe (overrideWith newArgs);
|
||||
};
|
||||
in
|
||||
{
|
||||
buildMaven = callPackage ./build-maven.nix {
|
||||
maven = finalAttrs.finalPackage;
|
||||
};
|
||||
|
||||
buildMavenPackage = makeOverridableMavenPackage (
|
||||
callPackage ./build-maven-package.nix {
|
||||
maven = finalAttrs.finalPackage;
|
||||
}
|
||||
);
|
||||
};
|
||||
buildMavenPackage = callPackage ./build-maven-package.nix {
|
||||
maven = finalAttrs.finalPackage;
|
||||
};
|
||||
};
|
||||
|
||||
meta = {
|
||||
homepage = "https://maven.apache.org/";
|
||||
|
Loading…
Reference in New Issue
Block a user