diff options
author | Yuri Nesterov <yuriy.nesterov@unikie.com> | 2022-09-27 15:33:18 +0300 |
---|---|---|
committer | Alyssa Ross <alyssa.ross@unikie.com> | 2022-09-27 13:36:28 +0000 |
commit | 1886a354da6a5553381d604dda41c24deb0fba0f (patch) | |
tree | cd259ee05d8d2879cbef397b842f04e9cb5732a7 | |
parent | e89e6c0b5b8b18a687aff3405c42c4f631b5207f (diff) | |
download | spectrum-1886a354da6a5553381d604dda41c24deb0fba0f.tar spectrum-1886a354da6a5553381d604dda41c24deb0fba0f.tar.gz spectrum-1886a354da6a5553381d604dda41c24deb0fba0f.tar.bz2 spectrum-1886a354da6a5553381d604dda41c24deb0fba0f.tar.lz spectrum-1886a354da6a5553381d604dda41c24deb0fba0f.tar.xz spectrum-1886a354da6a5553381d604dda41c24deb0fba0f.tar.zst spectrum-1886a354da6a5553381d604dda41c24deb0fba0f.zip |
img/live: use callPackage function instead of "with pkgs;"
When cross compiling Spectrum OS for aarch64 it tries to run aarch64 binaries on x64 host. To fix this issue it is possible to add pkgsBuildHost prefix to all native build inputs. However, a better option would probably be to use callPackage function. With that change it is able to automatically select correct packages. Signed-off-by: Yuri Nesterov <yuriy.nesterov@unikie.com> Message-Id: <20220927123318.2531867-1-yuriy.nesterov@unikie.com> Signed-off-by: Alyssa Ross <alyssa.ross@unikie.com>
-rw-r--r-- | img/live/default.nix | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/img/live/default.nix b/img/live/default.nix index 5461384..1fa8da3 100644 --- a/img/live/default.nix +++ b/img/live/default.nix @@ -1,7 +1,11 @@ # SPDX-License-Identifier: MIT # SPDX-FileCopyrightText: 2021-2022 Alyssa Ross <hi@alyssa.is> +# SPDX-FileCopyrightText: 2022 Unikie -{ config ? import ../../nix/eval-config.nix {} }: +{ config ? import ../../nix/eval-config.nix {} }: config.pkgs.callPackage ( + +{ stdenvNoCC, cryptsetup, dosfstools, jq, mtools, util-linux, stdenv +, systemd }: let inherit (config) pkgs; @@ -15,8 +19,6 @@ let initramfs = import ../../host/initramfs { inherit config rootfs; }; in -with pkgs; - stdenvNoCC.mkDerivation { name = "spectrum-live.img"; @@ -48,3 +50,4 @@ stdenvNoCC.mkDerivation { passthru = { inherit rootfs; }; } +) {} |