add hydra jobs
This commit is contained in:
parent
c90059f532
commit
fbe4fe643a
2 changed files with 27 additions and 23 deletions
49
flake.nix
49
flake.nix
|
@ -19,7 +19,7 @@
|
|||
allowUnfree = true;
|
||||
};
|
||||
};
|
||||
in {
|
||||
in rec {
|
||||
formatter = pkgs.alejandra;
|
||||
devShells.default = let
|
||||
androidSdk = pkgs.androidenv.androidPkgs_9_0.androidsdk;
|
||||
|
@ -40,7 +40,7 @@
|
|||
pname = "invtracker-deps";
|
||||
version = self.lastModifiedDate;
|
||||
src = self;
|
||||
nativeBuildInputs = with pkgs; [ gradle openjdk_headless perl ];
|
||||
nativeBuildInputs = with pkgs; [gradle openjdk_headless perl];
|
||||
buildPhase = ''
|
||||
export GRADLE_USER_HOME=$(mktemp -d)
|
||||
# Fetch the maven deps
|
||||
|
@ -50,27 +50,32 @@
|
|||
find $GRADLE_USER_HOME/caches/modules-2 -type f -regex '.*\.\(jar\|pom\)$' \
|
||||
| perl -pe 's#(.*/([^/]+)/([^/]+)/([^/]+)/[0-9a-f]{30,40}/([^/\s]+))$# ($x = $2) =~ tr|\.|/|; "install -Dm444 $1 \$out/maven/$x/$3/$4/$5" #e' \
|
||||
| sh
|
||||
'';
|
||||
outputHashAlgo = "sha256";
|
||||
outputHashMode = "recursive";
|
||||
outputHash = "sha256-OXNB19WPC5MyLEoDAtnVM9XykY7e0mKGRH5Aw8C/lMo=";
|
||||
};
|
||||
invtracker-server = pkgs.stdenv.mkDerivation {
|
||||
pname = "invtracker-server";
|
||||
version = self.lastModifiedDate;
|
||||
src = self;
|
||||
nativeBuildInputs = with pkgs; [ gradle openjdk_headless ];
|
||||
buildPhase = ''
|
||||
sed -i 's#gradlePluginPortal..#maven { url "${invtracker-deps}/maven" }#' settings.gradle
|
||||
sed -i 's#google..#maven { url "${invtracker-deps}/maven" }#' settings.gradle
|
||||
'';
|
||||
outputHashAlgo = "sha256";
|
||||
outputHashMode = "recursive";
|
||||
outputHash = "sha256-OXNB19WPC5MyLEoDAtnVM9XykY7e0mKGRH5Aw8C/lMo=";
|
||||
};
|
||||
invtracker-server = pkgs.stdenv.mkDerivation {
|
||||
pname = "invtracker-server";
|
||||
version = self.lastModifiedDate;
|
||||
src = self;
|
||||
nativeBuildInputs = with pkgs; [gradle openjdk_headless];
|
||||
buildPhase = ''
|
||||
sed -i 's#gradlePluginPortal..#maven { url "${invtracker-deps}/maven" }#' settings.gradle
|
||||
sed -i 's#google..#maven { url "${invtracker-deps}/maven" }#' settings.gradle
|
||||
|
||||
export GRADLE_USER_HOME=$(mktemp -d)
|
||||
gradle --offline --no-daemon --info -Dorg.gradle.java.home=${pkgs.openjdk_headless} server:installDist
|
||||
'';
|
||||
installPhase = ''
|
||||
cp -rv server/build/install/server $out/
|
||||
'';
|
||||
};
|
||||
export GRADLE_USER_HOME=$(mktemp -d)
|
||||
gradle --offline --no-daemon --info -Dorg.gradle.java.home=${pkgs.openjdk_headless} server:installDist
|
||||
'';
|
||||
installPhase = ''
|
||||
cp -rv server/build/install/server $out/
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
hydraJobs =
|
||||
if system == "x86_64-linux"
|
||||
then devShells // packages
|
||||
else {};
|
||||
});
|
||||
}
|
||||
|
|
1
result
1
result
|
@ -1 +0,0 @@
|
|||
/nix/store/llwxk8hih9hrw235472f14d2ds4m4qyh-invtracker-server-20220813100940
|
Loading…
Reference in a new issue