mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-29 08:14:19 +00:00
buildMavenPackage: add overrideMavenAttrs function
This commit is contained in:
parent
fcdc4b9767
commit
9492bc8f7a
@ -6,7 +6,6 @@
|
|||||||
makeWrapper,
|
makeWrapper,
|
||||||
stdenvNoCC,
|
stdenvNoCC,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenvNoCC.mkDerivation (finalAttrs: {
|
stdenvNoCC.mkDerivation (finalAttrs: {
|
||||||
pname = "maven";
|
pname = "maven";
|
||||||
version = "3.9.9";
|
version = "3.9.9";
|
||||||
@ -34,13 +33,30 @@ stdenvNoCC.mkDerivation (finalAttrs: {
|
|||||||
runHook postInstall
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
passthru = {
|
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 {
|
buildMaven = callPackage ./build-maven.nix {
|
||||||
maven = finalAttrs.finalPackage;
|
maven = finalAttrs.finalPackage;
|
||||||
};
|
};
|
||||||
buildMavenPackage = callPackage ./build-maven-package.nix {
|
|
||||||
|
buildMavenPackage = makeOverridableMavenPackage (
|
||||||
|
callPackage ./build-maven-package.nix {
|
||||||
maven = finalAttrs.finalPackage;
|
maven = finalAttrs.finalPackage;
|
||||||
};
|
}
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
Loading…
Reference in New Issue
Block a user