Merge pull request #292323 from Baltoli/maven-sources
maven: allow dependency sources to be stored in fixed-output derivation
This commit is contained in:
commit
90b1967eec
@ -13,6 +13,7 @@
|
|||||||
, mvnFetchExtraArgs ? { }
|
, mvnFetchExtraArgs ? { }
|
||||||
, mvnDepsParameters ? ""
|
, mvnDepsParameters ? ""
|
||||||
, manualMvnArtifacts ? [ ]
|
, manualMvnArtifacts ? [ ]
|
||||||
|
, manualMvnSources ? [ ]
|
||||||
, mvnParameters ? ""
|
, mvnParameters ? ""
|
||||||
, ...
|
, ...
|
||||||
} @args:
|
} @args:
|
||||||
@ -39,6 +40,14 @@ let
|
|||||||
echo "downloading manual $artifactId"
|
echo "downloading manual $artifactId"
|
||||||
mvn dependency:get -Dartifact="$artifactId" -Dmaven.repo.local=$out/.m2
|
mvn dependency:get -Dartifact="$artifactId" -Dmaven.repo.local=$out/.m2
|
||||||
done
|
done
|
||||||
|
|
||||||
|
for artifactId in ${builtins.toString manualMvnSources}
|
||||||
|
do
|
||||||
|
group=$(echo $artifactId | cut -d':' -f1)
|
||||||
|
artifact=$(echo $artifactId | cut -d':' -f2)
|
||||||
|
echo "downloading manual sources $artifactId"
|
||||||
|
mvn dependency:sources -DincludeGroupIds="$group" -DincludeArtifactIds="$artifact" -Dmaven.repo.local=$out/.m2
|
||||||
|
done
|
||||||
'' + lib.optionalString (!buildOffline) ''
|
'' + lib.optionalString (!buildOffline) ''
|
||||||
mvn package -Dmaven.repo.local=$out/.m2 ${mvnParameters}
|
mvn package -Dmaven.repo.local=$out/.m2 ${mvnParameters}
|
||||||
'' + ''
|
'' + ''
|
||||||
|
Loading…
Reference in New Issue
Block a user