summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2016-06-06 21:27:50 +0200
committermakefu <github@syntax-fehler.de>2016-06-06 21:27:50 +0200
commitb34b3f4763990049a21b7cfceb4b087b0ba88284 (patch)
tree151b5f1aecbf1001e7e2c3c6d9a79e6780a816a5 /Makefile
parent7bf16ae48c44bd1459dc45b95bb7afe83db627e1 (diff)
parent06a7bdf7964695f198357b6985bf2594b3484e13 (diff)
Merge remote-tracking branch 'prism/master'
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 12 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index a74e3a8..6e09559 100644
--- a/Makefile
+++ b/Makefile
@@ -48,6 +48,14 @@ $(if $(target_user),,$(error unbound variable: target_user))
$(if $(target_port),,$(error unbound variable: target_port))
$(if $(target_path),,$(error unbound variable: target_path))
+build = \
+ nix-build \
+ --no-out-link \
+ --show-trace \
+ -I nixos-config=$(nixos-config) \
+ -I stockholm=$(stockholm) \
+ -E "let build = import <stockholm>; in $(1)"
+
evaluate = \
nix-instantiate \
--eval \
@@ -74,6 +82,10 @@ deploy:
env STOCKHOLM_VERSION="$$STOCKHOLM_VERSION" \
nixos-rebuild switch --show-trace -I $(target_path)
+# usage: make build.pkgs.get
+build build.:;@$(call build,$${expr-eval})
+build.%:;@$(call build,$@)
+
# usage: make LOGNAME=shared system=wolf eval.config.krebs.build.host.name
eval eval.:;@$(call evaluate,$${expr-eval})
eval.%:;@$(call evaluate,$@)