[PATCH] 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> --- img/live/default.nix | 9 ++++++--- 1 file 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; }; } +) {} -- 2.34.1
This patch has been committed as 1886a354da6a5553381d604dda41c24deb0fba0f, which can be viewed online at https://spectrum-os.org/git/spectrum/commit/?id=1886a354da6a5553381d604dda41.... This is an automated message. Send comments/questions/requests to: Alyssa Ross <hi@alyssa.is>
participants (2)
-
Alyssa Ross -
Yuri Nesterov