Skip to content

Commit

Permalink
build.sh: Simplify the script
Browse files Browse the repository at this point in the history
Let's assume that NIX_PATH is already setup correctly (the channel
nixos-19.09 might not exist anyway).
Note: The cross-compilation of the full image currently depends on [0].

[0]: NixOS/nixpkgs#88222
  • Loading branch information
primeos committed Jun 25, 2020
1 parent 683a6f6 commit 3caaae1
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
#!/usr/bin/env bash

set -e
set -u
PS4=" $ "
set -eux

# Ugh, I would have liked to do it through a simpler `nix-build`, but as this
# needs to set `NIX_PATH` for use of `<nixpkgs/*>` imports, this is the better
# way to go.

set -x
exec env -i NIXPKGS_ALLOW_UNFREE=1 NIX_PATH="nixpkgs=channel:nixos-19.09" nix-build \
system.nix -A config.system.build.sdImage "$@"
export NIXPKGS_ALLOW_UNFREE=1
nix-build system.nix -A config.system.build.sdImage "$@"

0 comments on commit 3caaae1

Please sign in to comment.