1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2024-12-15 02:43:24 +03:00

Merge pull request #98 from samueldr-wip/feature/cross-rootfs

Add workarounds to enable minimal rootfs cross-compilation.
This commit is contained in:
Samuel Dionne-Riel 2020-03-13 22:51:29 -04:00 committed by GitHub
commit ad86988e01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,21 @@
{ lib, config, ... }:
# This module adds system-level workarounds when cross-compiling.
# These workarounds are only expected to be implemented for the *basic* build.
# That is `nix-build ./default.nix`, without additional configuration.
let
isCross =
config.nixpkgs.crossSystem != null &&
config.nixpkgs.localSystem.system != null &&
config.nixpkgs.crossSystem.system != config.nixpkgs.localSystem.system;
in
lib.mkIf isCross
{
# building '/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-fc-cache.drv'...
# [...]-fontconfig-2.10.2-aarch64-unknown-linux-gnu-bin/bin/fc-cache: cannot execute binary file: Exec format error
fonts.fontconfig.enable = false;
# building '/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-mesa-19.3.3-aarch64-unknown-linux-gnu.drv'...
# meson.build:1537:2: ERROR: Dependency "wayland-scanner" not found, tried pkgconfig
security.polkit.enable = false;
}

View File

@ -8,6 +8,7 @@
./_nixos-disintegration
./adb.nix
./boot-initrd.nix
./cross-workarounds.nix
./hardware-generic.nix
./hardware-qualcomm.nix
./hardware-ram.nix