cross packages: get more things to build and further reduce the emulated closure

This commit is contained in:
Colin 2023-02-08 22:30:27 +00:00
parent aad572a058
commit e70e8e144b

View File

@ -1,6 +1,36 @@
# cross compiling
# - for edge-casey things (e.g. `mesonEmulatorHook`, `depsBuildBuild`), see in nixpkgs:
# `git show da9a9a440415b236f22f57ba67a24ab3fb53f595`
#
# build a particular package as evaluated here with:
# - toplevel: `nix build '.#host-pkgs.moby-cross.xdg-utils'`
# - scoped: `nix build '.#host-pkgs.moby-cross.gnome.mutter'`
# - python: `nix build '.#host-pkgs.moby-cross.python310Packages.pandas'`
# - perl: `nix build '.#host-pkgs.moby-cross.perl536Packages.ModuleBuild'`
# - qt: `nix build '.#host-pkgs.moby-cross.libsForQt5.qtbase'`
# most of these can be built in a nixpkgs source root like:
# - `nix build '.#pkgsCross.aarch64-multiplatform.xdg-utils'`
#
# tracking issues, PRs:
# - libuv tests fail: <https://github.com/NixOS/nixpkgs/issues/190807>
# - last checked: 2023-02-07
# - opened: 2022-09-11
# - perl Module Build broken: <https://github.com/NixOS/nixpkgs/issues/66741>
# - last checked: 2023-02-07
# - opened: 2019-08
# - perl536Packages.Testutf8 fails to cross: <https://github.com/NixOS/nixpkgs/issues/198548>
# - last checked: 2023-02-07
# - opened: 2022-10
# - python310Packages.psycopg2: <https://github.com/NixOS/nixpkgs/issues/210265>
# - last checked: 2023-02-06
# - i have a potential fix:
# """
# i was able to just add `postgresql` to the `buildInputs` (so that it's in both `buildInputs` and `nativeBuildInputs`):
# it fixed the build for `pkgsCross.aarch64-multiplatform.python310Packages.psycopg2` but not for `armv7l-hf-multiplatform` that this issue description calls out.
#
# also i haven't deployed it yet to make sure this doesn't cause anything funky at runtime though.
# """
{ config, lib, pkgs, ... }:
@ -62,8 +92,8 @@ in
evince
flakpak
fuzzel
fwupd-efi
fwupd
fwupd-efi # efi/meson.build:162:0: ERROR: Program or command 'gcc' not found or not executable
fwupd # "Run-time dependency libgcab-1.0 found: NO (tried pkgconfig and cmake)"
gcr_4 # meson ERROR: Program 'gpg2 gpg' not found or not executable
gmime
# gnome-keyring
@ -75,45 +105,90 @@ in
gst_all_1 # gst_all_1.gst-editing-services
gupnp
gupnp_1_6
# gvfs # meson.build:312:2: ERROR: Assert failed: http required but libxml-2.0 not found
gvfs # meson.build:312:2: ERROR: Assert failed: http required but libxml-2.0 not found
flatpak
hdf5 # configure: error: cannot run test program while cross compiling
http2
ibus
kitty
iio-sensor-proxy
libHX
libgweather
libHX
libjcat # data/tests/meson.build:10:0: ERROR: Program 'gnutls-certtool certtool' not found or not executable
librest
librest_1_0
libsForQt5 # qtbase
libuv
libsForQt5 # qtbase # make: g++: No such file or directory
# libuv
mod_dnssd
ncftp
networkmanager-fortisslvpn # /nix/store/0wk6nr1mryvylf5g5frckjam7g7p9gpi-bash-5.2-p15/bin/bash: line 2: gdbus-codegen: command not found
networkmanager-iodine # configure.ac:58: error: possibly undefined macro: AM_GLIB_GNU_GETTEXT
networkmanager-l2tp # /nix/store/0wk6nr1mryvylf5g5frckjam7g7p9gpi-bash-5.2-p15/bin/bash: line 2: gdbus-codegen: command not found
networkmanager-openconnect # /nix/store/0wk6nr1mryvylf5g5frckjam7g7p9gpi-bash-5.2-p15/bin/bash: line 1: properties/gresource.xml: Permission denied
networkmanager-openvpn # /nix/store/0wk6nr1mryvylf5g5frckjam7g7p9gpi-bash-5.2-p15/bin/bash: line 1: properties/gresource.xml: Permission denied
networkmanager-sstp # /nix/store/0wk6nr1mryvylf5g5frckjam7g7p9gpi-bash-5.2-p15/bin/bash: line 2: gdbus-codegen: command not found
networkmanager-vpnc # /nix/store/0wk6nr1mryvylf5g5frckjam7g7p9gpi-bash-5.2-p15/bin/bash: line 1: properties/gresource.xml: Permission denied
obex_data_server
openfortivpn
ostree
pam_mount
perl # perl5.36.0-Test-utf8
perlInterpreters # perl5.36.0-Module-Build perl5.36.0-Test-utf8 (see tracking issues ^)
phoc # Program wayland-scanner found: NO
# pipewire
psqlodbc
# pulseaudio # python3.10-defcon
# psqlodbc
pulseaudio # FAILED: meson-internal__test
# qgnomeplatform
# qtbase
qt6 # psqlodbc
re2 # FAILED: CMakeFiles/test.util
rmlint
sequoia
# splatmoji
squeekboard
squeekboard # meson.build:1:0: ERROR: 'rust' compiler binary not defined in cross or native file
sysprof
tpm2-abrmd # configure: error: *** gdbus-codegen is required to build tpm2-abrmd; No package 'gio-unix-2.0' found
tracker-miners # it just can't run tests
# twitter-color-emoji # python3.10-defcon
twitter-color-emoji # /nix/store/0wk6nr1mryvylf5g5frckjam7g7p9gpi-bash-5.2-p15/bin/bash: line 1: pkg-config: command not found
unar # meson.build:52:2: ERROR: Program 'gpg2 gpg' not found or not executable
visidata # python3.10-psycopg2 python3.10-pandas python3.10-h5py
vpnc
webp-pixbuf-loader
xdg-utils # perl5.36.0-File-BaseDir
# webkitgtk_4_1 # requires nativeBuildInputs = perl.pkgs.FileCopyRecursive => perl5.36.0-Test-utf8
xdg-desktop-portal-gtk # No package 'xdg-desktop-portal' found
xdg-desktop-portal-gnome # data/meson.build:33:5: ERROR: Program 'msgfmt' not found or not executable
# xdg-utils # perl5.36.0-File-BaseDir / perl5.36.0-Module-Build
;
# fwupd = prev.fwupd.overrideAttrs (orig: {
# # solves (meson) "Run-time dependency libgcab-1.0 found: NO (tried pkgconfig and cmake)", and others.
# # some of these are kinda sus. maybe upstream fwupd buildscript is iffy
# buildInputs = orig.buildInputs ++ [ next.gcab next.gi-docgen next.gnutls next.pkg-config ];
# });
libuv = prev.libuv.overrideAttrs (orig: {
# 2 tests fail:
# - not ok 261 - tcp_bind6_error_addrinuse
# - not ok 267 - tcp_bind_error_addrinuse_listen
doCheck = false;
});
# gvfs = prev.gvfs.overrideAttrs (orig: {
# # meson.build:312:2: ERROR: Assert failed: http required but libxml-2.0 not found
# # nativeBuildInputs = orig.nativeBuildInputs ++ [ prev.libxml2 prev.mesonEmulatorHook ];
# # TODO: gvfs 1.50.2 -> 1.50.3 upgrade is upstreamed, and fixed cross compilation
# version = "1.50.3";
# src = next.fetchurl {
# url = "mirror://gnome/sources/gvfs/1.50/gvfs-1.50.3.tar.xz";
# sha256 = "aJcRnpe7FgKdJ3jhpaVKamWSYx+LLzoqHepO8rAYA/0=";
# };
# patches = [
# # Hardcode the ssh path again.
# # https://gitlab.gnome.org/GNOME/gvfs/-/issues/465
# (next.fetchpatch2 {
# url = "https://gitlab.gnome.org/GNOME/gvfs/-/commit/8327383e262e1e7f32750a8a2d3dd708195b0f53.patch";
# hash = "sha256-ReD7qkezGeiJHyo9jTqEQNBjECqGhV9nSD+dYYGZWJ8=";
# revert = true;
# })
# ];
# });
pipewire = prev.pipewire.overrideAttrs (orig: {
# fix `spa/plugins/bluez5/meson.build:41:0: ERROR: Program 'gdbus-codegen' not found or not executable`
nativeBuildInputs = orig.nativeBuildInputs ++ [ prev.glib ];
@ -153,22 +228,14 @@ in
nativeBuildInputs = orig.nativeBuildInputs ++ orig.propagatedBuildInputs;
});
psycopg2 = py-prev.psycopg2.overridePythonAttrs (orig: {
# TODO: upstream
# - see: <https://github.com/NixOS/nixpkgs/issues/210265>
# """
# i was able to just add `postgresql` to the `buildInputs` (so that it's in both `buildInputs` and `nativeBuildInputs`):
# it fixed the build for `pkgsCross.aarch64-multiplatform.python310Packages.psycopg2` but not for `armv7l-hf-multiplatform` that this issue description calls out.
#
# also i haven't deployed it yet to make sure this doesn't cause anything funky at runtime though.
# """
# TODO: upstream (see tracking issue)
#
# psycopg2 *links* against libpg, so we need the host postgres available at build time!
# present-day nixpkgs only includes it in nativeBuildInputs
buildInputs = orig.buildInputs ++ [ next.postgresql ];
});
s3transfer = py-prev.s3transfer.overridePythonAttrs (orig: {
# TODO: this doesn't actually stop the unit tests from running!
# some (or all?) tests fail if the test runner isn't on the same platform as the host (?)
# tests explicitly expect host CPU == build CPU
# Bail out! ERROR:../plugins/core.c:221:qemu_plugin_vcpu_init_hook: assertion failed: (success)
# Bail out! ERROR:../accel/tcg/cpu-exec.c:954:cpu_exec: assertion failed: (cpu == current_cpu)
disabledTestPaths = orig.disabledTestPaths ++ [
@ -185,12 +252,15 @@ in
gnome = prev.gnome.overrideScope' (self: super: {
inherit (emulated.gnome)
evolution-data-server # 'nix log /nix/store/ghlsq1jl5js5jiy24b4p1k67k4sgrnv7-libuv-1.44.2.drv'
gnome-color-manager
gnome-control-center # subprojects/gvc/meson.build:30:0: ERROR: Program 'glib-mkenums mkenums' not found or not executable
gnome-keyring
# gnome-remote-desktop
# TODO: remove gnome-remote-desktop (wanted by gnome-control-center)
gnome-remote-desktop # Program gdbus-codegen found: NO
gnome-settings-daemon # subprojects/gvc/meson.build:30:0: ERROR: Program 'glib-mkenums mkenums' not found or not executable
gnome-user-share
mutter
mutter # meson.build:237:2: ERROR: Dependency "gbm" not found, tried pkgconfig (it's provided by mesa)
;
});