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
  <C-c>
$ # hack hack hack
```
This commit is contained in:
Andreas Rammhold 2020-05-13 20:30:10 +02:00 committed by Tobias Pflug
parent d1237c315d
commit eb06a435ab

View file

@ -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 ];