summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2016-06-05 00:25:47 +0200
committertv <tv@krebsco.de>2016-06-05 00:25:47 +0200
commit0f7e6ee7f959c8be82d57e43a597ae374250186b (patch)
treedfb88edf62569abaf550414fffc844e4ba1c1b14 /Makefile
parenta0a2606f8d3469baa2b05cdb17c88ce031484e14 (diff)
make build.pkgs.${name}
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 12 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index a74e3a877..6e09559b6 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,$@)