diff options
author | tv <tv@krebsco.de> | 2017-06-27 23:28:41 +0200 |
---|---|---|
committer | tv <tv@krebsco.de> | 2017-06-27 23:28:41 +0200 |
commit | 62638ad7f17a4ed536a1842e36130c264d1e2bc2 (patch) | |
tree | e42897bc6e098113835074a05e377212c44a88e0 /Makefile | |
parent | 954996f78fbd65f89d2e768d09e2bcc41c080d17 (diff) |
Makefile: call build with whatsupnix
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 18 |
1 files changed, 12 insertions, 6 deletions
@@ -51,13 +51,23 @@ $(if $(target_user),,$(error unbound variable: target_user)) $(if $(target_port),,$(error unbound variable: target_port)) $(if $(target_path),,$(error unbound variable: target_path)) +whatsupnix = \ + if type whatsupnix >/dev/null 2>&1; then \ + whatsupnix $(1); \ + else \ + cat; \ + fi + build = \ nix-build \ + -Q \ --no-out-link \ --show-trace \ -I nixos-config=$(nixos-config) \ -I stockholm=$(stockholm) \ - -E "with import <stockholm>; $(1)" + -E "with import <stockholm>; $(1)" \ + $(2) \ + |& $(call whatsupnix) evaluate = \ nix-instantiate \ @@ -84,11 +94,7 @@ deploy: $(ssh) $(target_user)@$(target_host) -p $(target_port) \ env STOCKHOLM_VERSION="$$STOCKHOLM_VERSION" \ nixos-rebuild -Q $(rebuild-command) --show-trace -I $(target_path) \ - |& if type whatsupnix 2>/dev/null; then \ - whatsupnix $(target_user)@$(target_host):$(target_port); \ - else \ - cat; \ - fi + |& $(call whatsupnix,$(target_user)@$(target_host):$(target_port)) # usage: make populate system=foo populate: populate-target = \ |