diff options
author | Vincent Ambo <tazjin@google.com> | 2019-11-05T12·57+0000 |
---|---|---|
committer | Vincent Ambo <github@tazj.in> | 2019-11-09T15·35+0000 |
commit | 3c2de4c037b52d20476a9c47d53a0e456229ae55 (patch) | |
tree | 3f2e444f21aed55d0b9144d50067320a9af0a59c /tools/nixery/build-image/build-image.nix | |
parent | 7afbc912ceff01044b291388d1e0f567ac24bdef (diff) |
refactor(builder): Parameterise CPU architecture to use for images
Adds the CPU architecture to the image configuration. This will make it possible to let users toggle architecture via meta-packages. Relates to #13
Diffstat (limited to 'tools/nixery/build-image/build-image.nix')
-rw-r--r-- | tools/nixery/build-image/build-image.nix | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/nixery/build-image/build-image.nix b/tools/nixery/build-image/build-image.nix index d4df707a8a3a..eb14d52424bc 100644 --- a/tools/nixery/build-image/build-image.nix +++ b/tools/nixery/build-image/build-image.nix @@ -25,6 +25,7 @@ # Description of the package set to be used (will be loaded by load-pkgs.nix) srcType ? "nixpkgs", srcArgs ? "nixos-19.03", + system ? "x86_64-linux", importArgs ? { }, # Path to load-pkgs.nix loadPkgs ? ./load-pkgs.nix, @@ -46,7 +47,12 @@ let inherit (pkgs) lib runCommand writeText; - pkgs = import loadPkgs { inherit srcType srcArgs importArgs; }; + pkgs = import loadPkgs { + inherit srcType srcArgs; + importArgs = importArgs // { + inherit system; + }; + }; # deepFetch traverses the top-level Nix package set to retrieve an item via a # path specified in string form. |