Merge pull request #238718 from wegank/forge-mtg-mavenfod
forge-mtg: convert to mavenfod
This commit is contained in:
commit
32a0b799a1
|
@ -20,9 +20,9 @@
|
||||||
stdenv.mkDerivation (rec {
|
stdenv.mkDerivation (rec {
|
||||||
fetchedMavenDeps = stdenv.mkDerivation ({
|
fetchedMavenDeps = stdenv.mkDerivation ({
|
||||||
name = "${pname}-${version}-maven-deps";
|
name = "${pname}-${version}-maven-deps";
|
||||||
inherit src;
|
inherit src patches;
|
||||||
|
|
||||||
buildInputs = [
|
nativeBuildInputs = [
|
||||||
maven
|
maven
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -32,10 +32,10 @@ stdenv.mkDerivation (rec {
|
||||||
|
|
||||||
# keep only *.{pom,jar,sha1,nbm} and delete all ephemeral files with lastModified timestamps inside
|
# keep only *.{pom,jar,sha1,nbm} and delete all ephemeral files with lastModified timestamps inside
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
find $out -type f \
|
find $out -type f \( \
|
||||||
-name \*.lastUpdated -or \
|
-name \*.lastUpdated \
|
||||||
-name resolver-status.properties -or \
|
-o -name resolver-status.properties \
|
||||||
-name _remote.repositories \
|
-o -name _remote.repositories \) \
|
||||||
-delete
|
-delete
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
{ coreutils
|
{ coreutils
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, gnused
|
, gnused
|
||||||
|
, javaPackages
|
||||||
, lib
|
, lib
|
||||||
, maven
|
, maven
|
||||||
, makeWrapper
|
, makeWrapper
|
||||||
|
@ -21,46 +22,15 @@ let
|
||||||
# launch4j downloads and runs a native binary during the package phase.
|
# launch4j downloads and runs a native binary during the package phase.
|
||||||
patches = [ ./no-launch4j.patch ];
|
patches = [ ./no-launch4j.patch ];
|
||||||
|
|
||||||
mavenRepository = stdenv.mkDerivation {
|
in javaPackages.mavenfod {
|
||||||
pname = "forge-mtg-maven-repository";
|
|
||||||
inherit version src patches;
|
|
||||||
|
|
||||||
nativeBuildInputs = [ maven ];
|
|
||||||
|
|
||||||
buildPhase = ''
|
|
||||||
runHook preBuild
|
|
||||||
# Tests need a running Xorg.
|
|
||||||
mvn package -Dmaven.repo.local=$out -DskipTests
|
|
||||||
runHook postBuild
|
|
||||||
'';
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
runHook preInstall
|
|
||||||
find $out -type f \( \
|
|
||||||
-name \*.lastUpdated \
|
|
||||||
-o -name resolver-status.properties \
|
|
||||||
-o -name _remote.repositories \) \
|
|
||||||
-delete
|
|
||||||
runHook postInstall
|
|
||||||
'';
|
|
||||||
|
|
||||||
outputHashAlgo = "sha256";
|
|
||||||
outputHashMode = "recursive";
|
|
||||||
outputHash = "sha256-aSNqAWbLebmiYnByyw5myc7eivzpP2STStz6qUUMw90=";
|
|
||||||
};
|
|
||||||
|
|
||||||
in stdenv.mkDerivation {
|
|
||||||
pname = "forge-mtg";
|
pname = "forge-mtg";
|
||||||
inherit version src patches;
|
inherit version src patches;
|
||||||
|
|
||||||
nativeBuildInputs = [ maven makeWrapper ];
|
# Tests need a running Xorg.
|
||||||
|
mvnParameters = "-DskipTests";
|
||||||
|
mvnHash = "sha256-Bq02zyOZjah5jtFBEvE+Xif6aAAwPiuP5sUL42V8dUs=";
|
||||||
|
|
||||||
buildPhase = ''
|
nativeBuildInputs = [ maven makeWrapper ];
|
||||||
runHook preBuild
|
|
||||||
# Tests need a running Xorg.
|
|
||||||
mvn --offline -Dmaven.repo.local=${mavenRepository} -DskipTests package;
|
|
||||||
runHook postBuild
|
|
||||||
'';
|
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
runHook preInstall
|
runHook preInstall
|
||||||
|
|
Loading…
Reference in a new issue