Makefile: fail if nix-instantiate fails
This commit is contained in:
parent
bf1b6482ce
commit
6c5921c9fc
7
Makefile
7
Makefile
|
@ -35,7 +35,7 @@ ifeq ($(filter),json)
|
||||||
else
|
else
|
||||||
filter() { cat; }
|
filter() { cat; }
|
||||||
endif
|
endif
|
||||||
nix-instantiate \
|
result=$$(nix-instantiate \
|
||||||
$${extraArgs-} \
|
$${extraArgs-} \
|
||||||
--eval \
|
--eval \
|
||||||
-A "$$get" \
|
-A "$$get" \
|
||||||
|
@ -45,8 +45,9 @@ endif
|
||||||
--argstr current-host-name "$$HOSTNAME" \
|
--argstr current-host-name "$$HOSTNAME" \
|
||||||
--argstr current-user-name "$$LOGNAME" \
|
--argstr current-user-name "$$LOGNAME" \
|
||||||
$${system+--argstr system "$$system"} \
|
$${system+--argstr system "$$system"} \
|
||||||
$${target+--argstr target "$$target"} \
|
$${target+--argstr target "$$target"})
|
||||||
| filter
|
echo "$$result" | filter
|
||||||
|
|
||||||
else
|
else
|
||||||
$(error unbound variable: system[s])
|
$(error unbound variable: system[s])
|
||||||
endif
|
endif
|
||||||
|
|
Loading…
Reference in a new issue