diff options
author | EuAndreh <eu@euandre.org> | 2019-06-04 15:03:35 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2019-06-04 15:09:18 -0300 |
commit | 92872f8983b2a8f8be26d64362642c22981578da (patch) | |
tree | b36696f03336968a1e7fc1982015cc3975b010c4 | |
parent | Add utils.nix and remove common derivations from default.nix (diff) | |
download | toph-92872f8983b2a8f8be26d64362642c22981578da.tar.gz toph-92872f8983b2a8f8be26d64362642c22981578da.tar.xz |
Build shell buildInputs in test derivation
This way we make sure the =shell= derivation always builds, instead of seeing
these kinds of failure during CI runs when it's trying to deploy.
-rw-r--r-- | default.nix | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/default.nix b/default.nix index 4ea1ec0..e412399 100644 --- a/default.nix +++ b/default.nix @@ -30,6 +30,20 @@ in rec { touch $out ''; }); + shellEnvironment = utils.baseTask.overrideAttrs (baseAttrs: { + name = "${baseAttrs.name}-shell-inputs"; + buildInputs = with pkgs; [ + gitMinimal + git-crypt + gettext + terraform-providers.digitalocean + terraform + ]; + buildPhase = '' + echo "Can build!" + echo noop > $out + ''; + }); }; test = utils.test [ (utils.shellcheck null) @@ -37,16 +51,11 @@ in rec { utils.formatNix subtasks.formatTerraform subtasks.dockerComposeLint + subtasks.shellEnvironment ]; # Used in .build.yml to run Bash scripts shell = pkgs.mkShell rec { name = "vps-shell"; - buildInputs = with pkgs; [ - gitMinimal - git-crypt - gettext - terraform-providers.digitalocean - terraform - ]; + buildInputs = subtasks.shellEnvironment.buildInputs; }; } |