From fbe4fe643a33d24c2616429b8e7571f939622d76 Mon Sep 17 00:00:00 2001 From: Morten Delenk Date: Sat, 13 Aug 2022 17:44:23 +0100 Subject: [PATCH] add hydra jobs --- flake.nix | 49 +++++++++++++++++++++++++++---------------------- result | 1 - 2 files changed, 27 insertions(+), 23 deletions(-) delete mode 120000 result diff --git a/flake.nix b/flake.nix index e8806da..aa4db7e 100644 --- a/flake.nix +++ b/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 {}; }); } diff --git a/result b/result deleted file mode 120000 index b9e28b3..0000000 --- a/result +++ /dev/null @@ -1 +0,0 @@ -/nix/store/llwxk8hih9hrw235472f14d2ds4m4qyh-invtracker-server-20220813100940 \ No newline at end of file