From eb06a435aba269e35837f583693878a9f3941449 Mon Sep 17 00:00:00 2001 From: Andreas Rammhold Date: Wed, 13 May 2020 20:30:10 +0200 Subject: [PATCH] Add devShell for faster feedback This adds a `devShell` which unlike `runHydra` doesn't start hydra automatically and doesn't receive hydra as build input. It is better suited for interactive development cycles: ``` $ nix-shell -A devShell $ ./bootstrap $ configurePhase $ make $ # hack hack hack $ foreman start # test test test $ # hack hack hack ``` --- flake.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/flake.nix b/flake.nix index f8e316f8..3135de4d 100644 --- a/flake.nix +++ b/flake.nix @@ -294,6 +294,15 @@ }; runHydra = pkgs.callPackage ./run-hydra.nix {}; + devShell = pkgs.hydra.overrideAttrs (old: { + buildInputs = old.buildInputs ++ [ pkgs.foreman pkgs.netcat ]; + shellHook = old.shellHook + '' + export HYDRA_HOME="src/" + mkdir -p .hydra-data + export HYDRA_DATA="$(pwd)/.hydra-data" + export HYDRA_DBI='dbi:Pg:dbname=hydra;host=localhost;' + ''; + }); nixosModules.hydraTest = { imports = [ self.nixosModules.hydra ];