mirror of
https://github.com/LnL7/nix-darwin.git
synced 2025-03-28 10:47:19 +00:00
darwin-rebuild: use --no-link
for flake builds
This commit is contained in:
parent
6349b99bc2
commit
da843c0dde
1 changed files with 9 additions and 3 deletions
|
@ -142,7 +142,11 @@ if [ -n "$flake" ]; then
|
|||
fi
|
||||
|
||||
if [ "$action" != build ] && [ -z "$flake" ]; then
|
||||
extraBuildFlags+=("--no-out-link")
|
||||
if [ -n "$flake" ]; then
|
||||
extraBuildFlags+=("--no-link")
|
||||
else
|
||||
extraBuildFlags+=("--no-out-link")
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$action" = edit ]; then
|
||||
|
@ -159,8 +163,10 @@ if [ "$action" = switch ] || [ "$action" = build ] || [ "$action" = check ]; the
|
|||
if [ -z "$flake" ]; then
|
||||
systemConfig="$(nix-build '<darwin>' "${extraBuildFlags[@]}" -A system)"
|
||||
else
|
||||
nix "${flakeFlags[@]}" build "$flake#$flakeAttr.system" "${extraBuildFlags[@]}" "${extraLockFlags[@]}"
|
||||
systemConfig=$(readlink -f result)
|
||||
systemConfig=$(nix "${flakeFlags[@]}" build --json \
|
||||
"${extraBuildFlags[@]}" "${extraLockFlags[@]}" \
|
||||
-- "$flake#$flakeAttr.system" \
|
||||
| jq -r '.[0].outputs.out')
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue