aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2019-06-04 15:03:35 -0300
committerEuAndreh <eu@euandre.org>2019-06-04 15:09:18 -0300
commit92872f8983b2a8f8be26d64362642c22981578da (patch)
treeb36696f03336968a1e7fc1982015cc3975b010c4
parentAdd utils.nix and remove common derivations from default.nix (diff)
downloadtoph-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.nix23
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;
};
}