1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2024-12-14 18:21:41 +03:00
mobile-nixos/modules/cross-workarounds.nix
Samuel Dionne-Riel e0ca6d43d6 cross-workarounds: Disable udisks for cross-builds
From https://hydra.nixos.org/eval/1581751

1580f35dfb accidentally introduced udisks
in the build.

A local test build of the default "dummy" system disk image wasn't done,
thus the failure not found.
2020-04-23 00:01:33 -04:00

25 lines
1020 B
Nix

{ 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;
# udisks fails due to gobject-introspection being not cross-compilation friendly.
services.udisks2.enable = false;
}