Address PR comments:

- scripts -> foreman
- drop runHydra
- drop devShell
- move postgresql to buildInputs
This commit is contained in:
Tobias Pflug 2020-05-15 13:48:21 +02:00
parent fc0eb02ffe
commit 31262f14fb
8 changed files with 11 additions and 33 deletions

View file

@ -1,4 +1,4 @@
hydra-server: ./scripts/start-hydra.sh
hydra-queue-runner: ./scripts/start-queue-runner.sh
hydra-evaluator: ./scripts/start-evaluator.sh
postgres: ./scripts/start-postgres.sh
hydra-server: ./foreman/start-hydra.sh
hydra-queue-runner: ./foreman/start-queue-runner.sh
hydra-evaluator: ./foreman/start-evaluator.sh
postgres: ./foreman/start-postgres.sh

View file

@ -105,13 +105,14 @@
gitAndTools.topGit mercurial darcs subversion bazaar openssl bzip2 libxslt
perlDeps perl final.nix
boost
postgresql95
(if lib.versionAtLeast lib.version "20.03pre"
then nlohmann_json
else nlohmann_json.override { multipleHeaders = true; })
];
checkInputs = [
postgresql95
foreman
];
hydraPath = lib.makeBinPath (
@ -124,6 +125,10 @@
shellHook = ''
PATH=$(pwd)/src/hydra-evaluator:$(pwd)/src/script:$(pwd)/src/hydra-eval-jobs:$(pwd)/src/hydra-queue-runner:$PATH
PERL5LIB=$(pwd)/src/lib:$PERL5LIB
export HYDRA_HOME="src/"
mkdir -p .hydra-data
export HYDRA_DATA="$(pwd)/.hydra-data"
export HYDRA_DBI='dbi:Pg:dbname=hydra;host=localhost;port=64444'
'';
preConfigure = "autoreconf -vfi";
@ -293,17 +298,6 @@
nixpkgs.overlays = [ self.overlay nix.overlay ];
};
runHydra = pkgs.callPackage ./run-hydra.nix {};
devShell = pkgs.hydra.overrideAttrs (old: {
buildInputs = old.buildInputs ++ [ pkgs.foreman ];
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;port=64444'
'';
});
nixosModules.hydraTest = {
imports = [ self.nixosModules.hydra ];

View file

@ -1,16 +0,0 @@
{ foreman, mkShell, hydra, postgresql95 }:
{ doCheck ? true }:
mkShell {
buildInputs = [
foreman (hydra.overrideAttrs (_: { inherit doCheck; })) postgresql95
];
shellHook = ''
export HYDRA_HOME="src/"
mkdir -p .hydra-data
export HYDRA_DATA="$(pwd)/.hydra-data"
export HYDRA_DBI='dbi:Pg:dbname=hydra;host=localhost;port=64444'
exec foreman start
'';
}

View file

@ -3,4 +3,4 @@
(import (fetchTarball https://github.com/edolstra/flake-compat/archive/master.tar.gz) {
src = builtins.fetchGit ./.;
}).defaultNix.devShell
}).shellNix