From 8b2a7d5fb4680d9ac5beca3acb44952d956a97ea Mon Sep 17 00:00:00 2001 From: Colin Date: Tue, 31 Jan 2023 05:17:34 +0000 Subject: [PATCH 01/67] mesa: downgrade from 22.3.4 -> 22.3.2 to address a memory leak --- nixpatches/2023-01-30-mesa-cma-leak.patch | 22 ++++++++++++++++++++++ nixpatches/flake.lock | 7 +++---- nixpatches/list.nix | 5 +++++ 3 files changed, 30 insertions(+), 4 deletions(-) create mode 100644 nixpatches/2023-01-30-mesa-cma-leak.patch diff --git a/nixpatches/2023-01-30-mesa-cma-leak.patch b/nixpatches/2023-01-30-mesa-cma-leak.patch new file mode 100644 index 000000000..f970cecff --- /dev/null +++ b/nixpatches/2023-01-30-mesa-cma-leak.patch @@ -0,0 +1,22 @@ +diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix +index 56fa74e5c0c..3573bb0af49 100644 +--- a/pkgs/development/libraries/mesa/default.nix ++++ b/pkgs/development/libraries/mesa/default.nix +@@ -88,7 +88,7 @@ + let + # Release calendar: https://www.mesa3d.org/release-calendar.html + # Release frequency: https://www.mesa3d.org/releasing.html#schedule +- version = "22.3.4"; ++ version = "22.3.2"; + branch = lib.versions.major version; + + withLibdrm = lib.meta.availableOn stdenv.hostPlatform libdrm; +@@ -120,7 +120,7 @@ self = stdenv.mkDerivation { + "ftp://ftp.freedesktop.org/pub/mesa/${version}/mesa-${version}.tar.xz" + "ftp://ftp.freedesktop.org/pub/mesa/older-versions/${branch}.x/${version}/mesa-${version}.tar.xz" + ]; +- sha256 = "37a1ddaf03f41919ee3c89c97cff41e87de96e00e9d3247959cc8279d8294593"; ++ sha256 = "c15df758a8795f53e57f2a228eb4593c22b16dffd9b38f83901f76cd9533140b"; + }; + + # TODO: diff --git a/nixpatches/flake.lock b/nixpatches/flake.lock index 1a7a033ee..5ba036bcf 100644 --- a/nixpatches/flake.lock +++ b/nixpatches/flake.lock @@ -2,16 +2,15 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1673163619, - "narHash": "sha256-B33PFBL64ZgTWgMnhFL3jgheAN/DjHPsZ1Ih3z0VE5I=", + "lastModified": 1675123384, + "narHash": "sha256-RpU+kboEWlIYwbRMGIPBIcztH63CvmqWN1B8GpJogd4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "8c54d842d9544361aac5f5b212ba04e4089e8efe", + "rev": "e0fa1ece2f3929726c9b98c539ad14b63ae8e4fd", "type": "github" }, "original": { "id": "nixpkgs", - "ref": "nixos-22.11", "type": "indirect" } }, diff --git a/nixpatches/list.nix b/nixpatches/list.nix index 37e0e338d..cc944a646 100644 --- a/nixpatches/list.nix +++ b/nixpatches/list.nix @@ -23,6 +23,11 @@ ./2022-12-19-i2p-aarch64.patch + # fix for CMA memory leak in mesa: + # only necessary on aarch64. + # it's a revert of nixpkgs commit dcf630c172df2a9ecaa47c77f868211e61ae8e52 + ./2023-01-30-mesa-cma-leak.patch + # # kaiteki: init at 2022-09-03 # vendorHash changes too frequently (might not be reproducible). # using local package defn until stabilized From bffe39b6b59369ecce0cd81ecc1f50742d663e8e Mon Sep 17 00:00:00 2001 From: Colin Date: Wed, 1 Feb 2023 05:22:58 +0000 Subject: [PATCH 02/67] gjs, libadwaita, libsecret: skip flakey check phase --- overlays/pins.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/overlays/pins.nix b/overlays/pins.nix index 413a0ac77..fc9c2b78a 100644 --- a/overlays/pins.nix +++ b/overlays/pins.nix @@ -9,4 +9,15 @@ # so just forward the unstable packages. inherit (next.stable or prev) ; + + # 2023/01/30: one test times out. probably flakey test that only got built because i patched mesa. + gjs = prev.gjs.overrideAttrs (_upstream: { + doCheck = false; + }); + libadwaita = prev.libadwaita.overrideAttrs (_upstream: { + doCheck = false; + }); + libsecret = prev.libsecret.overrideAttrs (_upstream: { + doCheck = false; + }); }) From 5715795d1f299cb96c2b64ca9d63f3d3755579ce Mon Sep 17 00:00:00 2001 From: Colin Date: Sat, 4 Feb 2023 11:39:16 +0000 Subject: [PATCH 03/67] WIP: moby-cross: is cross-by-default instead of opt-in --- flake.nix | 3 +++ hosts/by-name/moby/default.nix | 5 ++++- hosts/common/programs.nix | 4 ++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index 6b58066eb..70237789f 100644 --- a/flake.nix +++ b/flake.nix @@ -78,6 +78,9 @@ self.overlays.passthru self.overlays.pins ]; + # nixpkgs.crossSystem = target; + nixpkgs.hostPlatform = target; + nixpkgs.buildPlatform = local; } ]; }); diff --git a/hosts/by-name/moby/default.nix b/hosts/by-name/moby/default.nix index 9d454f482..293fb6270 100644 --- a/hosts/by-name/moby/default.nix +++ b/hosts/by-name/moby/default.nix @@ -10,6 +10,9 @@ sane.services.wg-home.enable = true; sane.services.wg-home.ip = config.sane.hosts.by-name."moby".wg-home.ip; + # TODO: re-enable once base is cross-compiled + sane.programs.phoshApps.enableSuggested = false; + # cross-compiled documentation is *slow*. # no obvious way to natively compile docs (2022/09/29). # entrypoint is nixos/modules/misc/documentation.nix @@ -43,7 +46,7 @@ sane.nixcache.enable = true; sane.persist.enable = true; - sane.gui.phosh.enable = true; + # sane.gui.phosh.enable = true; boot.loader.efi.canTouchEfiVariables = false; # /boot space is at a premium. default was 20. diff --git a/hosts/common/programs.nix b/hosts/common/programs.nix index 22abe9df8..9f5d94253 100644 --- a/hosts/common/programs.nix +++ b/hosts/common/programs.nix @@ -76,11 +76,11 @@ let consolePkgs = { inherit (pkgs) - cdrtools + # cdrtools # TODO: fix for cross compilation dmidecode efivar flashrom - fwupd + # fwupd # TODO: fix for cross compilation ghostscript # TODO: imagemagick wrapper should add gs to PATH gnupg gocryptfs From 749111491560f3b1f49284f99235aec4e14a3332 Mon Sep 17 00:00:00 2001 From: Colin Date: Sun, 5 Feb 2023 19:36:42 +0000 Subject: [PATCH 04/67] moby: get working cross compilation for the base image (i.e. no GUI) --- hosts/common/cross.nix | 65 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 57 insertions(+), 8 deletions(-) diff --git a/hosts/common/cross.nix b/hosts/common/cross.nix index a6b076bc4..66cf47ea4 100644 --- a/hosts/common/cross.nix +++ b/hosts/common/cross.nix @@ -1,22 +1,71 @@ { config, ... }: let - mkCrossFrom = localSystem: pkgs: import pkgs.path { - inherit localSystem; - crossSystem = pkgs.stdenv.hostPlatform.system; - inherit (config.nixpkgs) config overlays; - }; + # these are the overlays which we *also* pass through to the cross and emulated package sets. + # TODO: refactor to not specify same overlay in multiple places (here and flake.nix). + overlays = [ + (import ./../../overlays/pkgs.nix) + (import ./../../overlays/pins.nix) + ]; + mkCrossFrom = localSystem: pkgs: + import pkgs.path { + inherit localSystem; # localSystem is equivalent to buildPlatform + crossSystem = pkgs.stdenv.hostPlatform.system; + inherit (config.nixpkgs) config; + inherit overlays; + }; + mkEmulated = pkgs: + import pkgs.path { + localSystem = pkgs.stdenv.hostPlatform.system; + inherit (config.nixpkgs) config; + inherit overlays; + }; in { # the configuration of which specific package set `pkgs.cross` refers to happens elsewhere; # here we just define them all. nixpkgs.overlays = [ - (next: prev: { + (next: prev: rec { # non-emulated packages build *from* local *for* target. # for large packages like the linux kernel which are expensive to build under emulation, # the config can explicitly pull such packages from `pkgs.cross` to do more efficient cross-compilation. - crossFrom."x86_64-linux" = mkCrossFrom "x86_64-linux" next; - crossFrom."aarch64-linux" = mkCrossFrom "aarch64-linux" next; + crossFrom."x86_64-linux" = mkCrossFrom "x86_64-linux" prev; + crossFrom."aarch64-linux" = mkCrossFrom "aarch64-linux" prev; + + emulated = mkEmulated prev; + }) + (next: prev: { + # packages which don't cross compile + inherit (prev.emulated) + duplicity # python3.10-s3transfer + fuzzel + fwupd-efi + fwupd + # gnustep-base # (used by unar) + gocryptfs # gocryptfs-2.3-go-modules + # grpc + hdf5 + http2 + kitty + iio-sensor-proxy + libHX + pam_mount + pipewire + ncftp + rmlint + sequoia + # splatmoji + twitter-color-emoji # python3.10-defcon + unar # python3.10-psycopg2 + visidata # python3.10-psycopg2 + xdg-utils # perl5.36.0-File-BaseDir + ; + # pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [ + # (py-next: py-prev: { + # defcon = py-prev.defcon.override { inherit prev.emulated.stdenv; }; + # # psycopg2 = py-prev.psycopg2.override { inherit prev.emulated.stdenv; }; + # }) + # ]; }) ]; } From 6cbeccf51f563f3f7047d38178868619856ab1ac Mon Sep 17 00:00:00 2001 From: Colin Date: Mon, 6 Feb 2023 22:41:32 +0000 Subject: [PATCH 05/67] WIP: moby: partially working cross compilation for phosh w/o apps (webkitgtk build OOMs) --- hosts/by-name/moby/default.nix | 4 +- hosts/common/cross.nix | 182 ++++++++++++++++++++++++--------- 2 files changed, 138 insertions(+), 48 deletions(-) diff --git a/hosts/by-name/moby/default.nix b/hosts/by-name/moby/default.nix index 293fb6270..7baf4a652 100644 --- a/hosts/by-name/moby/default.nix +++ b/hosts/by-name/moby/default.nix @@ -11,7 +11,7 @@ sane.services.wg-home.ip = config.sane.hosts.by-name."moby".wg-home.ip; # TODO: re-enable once base is cross-compiled - sane.programs.phoshApps.enableSuggested = false; + sane.programs.guiApps.enableSuggested = false; # cross-compiled documentation is *slow*. # no obvious way to natively compile docs (2022/09/29). @@ -46,7 +46,7 @@ sane.nixcache.enable = true; sane.persist.enable = true; - # sane.gui.phosh.enable = true; + sane.gui.phosh.enable = true; boot.loader.efi.canTouchEfiVariables = false; # /boot space is at a premium. default was 20. diff --git a/hosts/common/cross.nix b/hosts/common/cross.nix index 66cf47ea4..e21e746be 100644 --- a/hosts/common/cross.nix +++ b/hosts/common/cross.nix @@ -1,4 +1,4 @@ -{ config, ... }: +{ config, lib, pkgs, ... }: let # these are the overlays which we *also* pass through to the cross and emulated package sets. @@ -22,50 +22,140 @@ let }; in { - # the configuration of which specific package set `pkgs.cross` refers to happens elsewhere; - # here we just define them all. - nixpkgs.overlays = [ - (next: prev: rec { - # non-emulated packages build *from* local *for* target. - # for large packages like the linux kernel which are expensive to build under emulation, - # the config can explicitly pull such packages from `pkgs.cross` to do more efficient cross-compilation. - crossFrom."x86_64-linux" = mkCrossFrom "x86_64-linux" prev; - crossFrom."aarch64-linux" = mkCrossFrom "aarch64-linux" prev; + # options = { + # perlPackageOverrides = lib.mkOption { + # }; + # }; - emulated = mkEmulated prev; - }) - (next: prev: { - # packages which don't cross compile - inherit (prev.emulated) - duplicity # python3.10-s3transfer - fuzzel - fwupd-efi - fwupd - # gnustep-base # (used by unar) - gocryptfs # gocryptfs-2.3-go-modules - # grpc - hdf5 - http2 - kitty - iio-sensor-proxy - libHX - pam_mount - pipewire - ncftp - rmlint - sequoia - # splatmoji - twitter-color-emoji # python3.10-defcon - unar # python3.10-psycopg2 - visidata # python3.10-psycopg2 - xdg-utils # perl5.36.0-File-BaseDir - ; - # pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [ - # (py-next: py-prev: { - # defcon = py-prev.defcon.override { inherit prev.emulated.stdenv; }; - # # psycopg2 = py-prev.psycopg2.override { inherit prev.emulated.stdenv; }; - # }) - # ]; - }) - ]; + config = { + # the configuration of which specific package set `pkgs.cross` refers to happens elsewhere; + # here we just define them all. + nixpkgs.overlays = [ + (next: prev: rec { + # non-emulated packages build *from* local *for* target. + # for large packages like the linux kernel which are expensive to build under emulation, + # the config can explicitly pull such packages from `pkgs.cross` to do more efficient cross-compilation. + crossFrom."x86_64-linux" = mkCrossFrom "x86_64-linux" prev; + crossFrom."aarch64-linux" = mkCrossFrom "aarch64-linux" prev; + + emulated = mkEmulated prev; + }) + (next: prev: + let + emulated = prev.emulated; + in { + # packages which don't cross compile + inherit (emulated) + # adwaita-qt # psqlodbc + apacheHttpd # TODO: not properly patched + appstream + blueman + brltty + cantarell-fonts # python3.10-skia-pathops + colord + duplicity # python3.10-s3transfer + evince + flakpak + fuzzel + fwupd-efi + fwupd + gcr + gmime + # gnome-keyring + # gnome-remote-desktop + gnome-tour + # gnustep-base # (used by unar) + gocryptfs # gocryptfs-2.3-go-modules + # grpc + gst_all_1 # gst_all_1.gst-editing-services + gupnp + gupnp_1_6 + gvfs + flatpak + hdf5 + http2 + ibus + kitty + iio-sensor-proxy + libHX + libgweather + librest + librest_1_0 + libsForQt5 # qtbase + mod_dnssd + ncftp + obex_data_server + openfortivpn + ostree + pam_mount + perl # perl5.36.0-Test-utf8 + pipewire + psqlodbc + pulseaudio # python3.10-defcon + # qgnomeplatform + # qtbase + qt6 # psqlodbc + rmlint + sequoia + # splatmoji + squeekboard + sysprof + tracker-miners # it just can't run tests + twitter-color-emoji # python3.10-defcon + unar # python3.10-psycopg2 + visidata # python3.10-psycopg2 + vpnc + webp-pixbuf-loader + xdg-utils # perl5.36.0-File-BaseDir + ; + # pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [ + # (py-next: py-prev: { + # defcon = py-prev.defcon.override { inherit prev.emulated.stdenv; }; + # # psycopg2 = py-prev.psycopg2.override { inherit prev.emulated.stdenv; }; + # }) + # ]; + + gnome = prev.gnome.overrideScope' (self: super: { + inherit (emulated.gnome) + gnome-color-manager + gnome-keyring + gnome-remote-desktop # TODO: figure out what's asking for this and remove it + gnome-user-share + mutter + ; + }); + + # gst_all_1.gst-editing-services = emulated.gst_all_1.gst-editing-services; + + # gst_all_1 = prev.gst_all_1.overrideScope' (self: super: { + # inherit (emulated.gst_all_1) + # gst-editing-services + # ; + # }); + + # libsForQt5 = prev.libsForQt5.overrideScope' (self: super: { + # inherit (emulated.libsForQt5) + # qtbase + # ; + # }); + + # apacheHttpdPackagesFor = apacheHttpd: self: + # let + # prevHttpdPkgs = lib.fix (emulated.apacheHttpdPackagesFor apacheHttpd); + # in + # (prev.apacheHttpdPackagesFor apacheHttpd self) // { + # # inherit (prevHttpdPkgs) mod_dnssd; + # mod_dnssd = prevHttpdPkgs.mod_dnssd.override { + # inherit (self) apacheHttpd; + # }; + # }; + }) + ]; + + # perlPackageOverrides = _perl: { + # inherit (pkgs.emulated.perl.pkgs) + # Testutf8 + # ; + # }; + }; } From fdec1817c47004d5db2405609690749bc4d28613 Mon Sep 17 00:00:00 2001 From: Colin Date: Tue, 7 Feb 2023 03:23:18 +0000 Subject: [PATCH 06/67] tune emulated package set (e.g. only emulate one of gvfs' deps; not the WHOLE thing --- hosts/common/cross.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hosts/common/cross.nix b/hosts/common/cross.nix index e21e746be..b640f00c5 100644 --- a/hosts/common/cross.nix +++ b/hosts/common/cross.nix @@ -47,11 +47,12 @@ in # packages which don't cross compile inherit (emulated) # adwaita-qt # psqlodbc - apacheHttpd # TODO: not properly patched + apacheHttpd # TODO: not properly patched (we only need mod_dnssd?) appstream blueman brltty cantarell-fonts # python3.10-skia-pathops + cdrtools colord duplicity # python3.10-s3transfer evince @@ -70,7 +71,7 @@ in gst_all_1 # gst_all_1.gst-editing-services gupnp gupnp_1_6 - gvfs + # gvfs flatpak hdf5 http2 @@ -82,6 +83,7 @@ in librest librest_1_0 libsForQt5 # qtbase + libuv mod_dnssd ncftp obex_data_server @@ -110,7 +112,7 @@ in ; # pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [ # (py-next: py-prev: { - # defcon = py-prev.defcon.override { inherit prev.emulated.stdenv; }; + # defcon = py-prev.defcon.override { inherit (prev.emulated) stdenv; }; # # psycopg2 = py-prev.psycopg2.override { inherit prev.emulated.stdenv; }; # }) # ]; From 892931173240ca1750e77a0c7de5602bd4b201bf Mon Sep 17 00:00:00 2001 From: Colin Date: Tue, 7 Feb 2023 03:24:10 +0000 Subject: [PATCH 07/67] programs: re-enable cdrtools, fwupd --- hosts/common/programs.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hosts/common/programs.nix b/hosts/common/programs.nix index 9f5d94253..6b0a481c6 100644 --- a/hosts/common/programs.nix +++ b/hosts/common/programs.nix @@ -74,13 +74,15 @@ let ; }; + # TODO: split these into smaller groups. + # - transcoders (ffmpeg, imagemagick) only wanted on desko/lappy ("powerutils"?) consolePkgs = { inherit (pkgs) - # cdrtools # TODO: fix for cross compilation + cdrtools dmidecode efivar flashrom - # fwupd # TODO: fix for cross compilation + fwupd ghostscript # TODO: imagemagick wrapper should add gs to PATH gnupg gocryptfs From ce60270821336976f6e37db98d44a80251c530b7 Mon Sep 17 00:00:00 2001 From: Colin Date: Tue, 7 Feb 2023 03:24:46 +0000 Subject: [PATCH 08/67] phosh: enable fewer gnome services/packages --- hosts/modules/gui/phosh.nix | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/hosts/modules/gui/phosh.nix b/hosts/modules/gui/phosh.nix index b5a10c1c0..0dffdf0d6 100644 --- a/hosts/modules/gui/phosh.nix +++ b/hosts/modules/gui/phosh.nix @@ -63,6 +63,26 @@ in }; }; + # phosh enables `services.gnome.{core-os-services, core-shell}` + # and this in turn enables some default apps we don't really care about. + # see + environment.gnome.excludePackages = with pkgs; [ + # gnome.gnome-menus # unused outside gnome classic, but probably harmless + gnome-tour + ]; + services.dleyna-renderer.enable = false; + services.dleyna-server.enable = false; + services.gnome.gnome-browser-connector.enable = false; + services.gnome.gnome-initial-setup.enable = false; + services.gnome.gnome-online-accounts.enable = false; + services.gnome.gnome-remote-desktop.enable = false; + services.gnome.gnome-user-share.enable = false; + services.gnome.rygel.enable = false; + + # gnome doesn't use mkDefault for these -- unclear why not + services.gnome.evolution-data-server.enable = mkForce false; + services.gnome.gnome-online-miners.enable = mkForce false; + # XXX: phosh enables networkmanager by default; can probably disable these lines networking.useDHCP = false; networking.networkmanager.enable = true; From 4a886b9e9bd9ffce8d64392dd91602532ec1e005 Mon Sep 17 00:00:00 2001 From: Colin Date: Tue, 7 Feb 2023 09:44:58 +0000 Subject: [PATCH 09/67] phosh: disable gvfs service --- hosts/modules/gui/phosh.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hosts/modules/gui/phosh.nix b/hosts/modules/gui/phosh.nix index 0dffdf0d6..9494a9b5c 100644 --- a/hosts/modules/gui/phosh.nix +++ b/hosts/modules/gui/phosh.nix @@ -82,6 +82,8 @@ in # gnome doesn't use mkDefault for these -- unclear why not services.gnome.evolution-data-server.enable = mkForce false; services.gnome.gnome-online-miners.enable = mkForce false; + # TODO: re-enable this once we can cross-compile gvfs + services.gvfs.enable = mkForce false; # XXX: phosh enables networkmanager by default; can probably disable these lines networking.useDHCP = false; From aad572a058134a3dd2525ced4229a25061b0d8b9 Mon Sep 17 00:00:00 2001 From: Colin Date: Tue, 7 Feb 2023 09:46:13 +0000 Subject: [PATCH 10/67] cross packages: reduce the emulated package set --- hosts/common/cross.nix | 103 ++++++++++++++++++++++++++++++++++------- 1 file changed, 85 insertions(+), 18 deletions(-) diff --git a/hosts/common/cross.nix b/hosts/common/cross.nix index b640f00c5..9d62dc9fe 100644 --- a/hosts/common/cross.nix +++ b/hosts/common/cross.nix @@ -1,3 +1,7 @@ +# cross compiling +# - for edge-casey things (e.g. `mesonEmulatorHook`, `depsBuildBuild`), see in nixpkgs: +# `git show da9a9a440415b236f22f57ba67a24ab3fb53f595` + { config, lib, pkgs, ... }: let @@ -54,26 +58,26 @@ in cantarell-fonts # python3.10-skia-pathops cdrtools colord - duplicity # python3.10-s3transfer + # duplicity # python3.10-s3transfer evince flakpak fuzzel fwupd-efi fwupd - gcr + gcr_4 # meson ERROR: Program 'gpg2 gpg' not found or not executable gmime # gnome-keyring # gnome-remote-desktop - gnome-tour - # gnustep-base # (used by unar) + # gnome-tour + gnustep # (gnustep.base is used by unar; can't override individual members) gocryptfs # gocryptfs-2.3-go-modules # grpc gst_all_1 # gst_all_1.gst-editing-services gupnp gupnp_1_6 - # gvfs + # gvfs # meson.build:312:2: ERROR: Assert failed: http required but libxml-2.0 not found flatpak - hdf5 + hdf5 # configure: error: cannot run test program while cross compiling http2 ibus kitty @@ -91,9 +95,9 @@ in ostree pam_mount perl # perl5.36.0-Test-utf8 - pipewire + # pipewire psqlodbc - pulseaudio # python3.10-defcon + # pulseaudio # python3.10-defcon # qgnomeplatform # qtbase qt6 # psqlodbc @@ -103,25 +107,88 @@ in squeekboard sysprof tracker-miners # it just can't run tests - twitter-color-emoji # python3.10-defcon - unar # python3.10-psycopg2 - visidata # python3.10-psycopg2 + # twitter-color-emoji # python3.10-defcon + 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 ; - # pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [ - # (py-next: py-prev: { - # defcon = py-prev.defcon.override { inherit (prev.emulated) stdenv; }; - # # psycopg2 = py-prev.psycopg2.override { inherit prev.emulated.stdenv; }; - # }) - # ]; + 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 ]; + }); + pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [ + (py-next: py-prev: { + defcon = py-prev.defcon.overridePythonAttrs (orig: { + # TODO: diagnose and upstream + nativeBuildInputs = orig.nativeBuildInputs ++ orig.nativeCheckInputs; + }); + executing = py-prev.executing.overridePythonAttrs (orig: { + # TODO: confirm & upstream + # test has an assertion that < 1s of CPU time elapsed => flakey + disabledTestPaths = orig.disabledTestPaths or [] ++ [ + # "tests/test_main.py::TestStuff::test_many_source_for_filename_calls" + "tests/test_main.py" + ]; + }); + # h5py = py-prev.h5py.overridePythonAttrs (orig: { + # # XXX: can't upstream until its dependency, hdf5, is fixed. that looks TRICKY. + # # - the `setup_configure.py` in h5py tries to dlopen (and call into) the hdf5 lib to query the version and detect features like MPI + # # - it could be patched with ~10 LoC in the HDF5LibWrapper class. + # # + # # expose numpy and hdf5 as available at build time + # nativeBuildInputs = orig.nativeBuildInputs ++ orig.propagatedBuildInputs ++ orig.buildInputs; + # buildInputs = []; + # # HDF5_DIR = "${hdf5}"; + # }); + mutatormath = py-prev.mutatormath.overridePythonAttrs (orig: { + # TODO: diagnose and upstream + nativeBuildInputs = orig.nativeBuildInputs or [] ++ orig.nativeCheckInputs; + }); + pandas = py-prev.pandas.overridePythonAttrs (orig: { + # TODO: upstream + # XXX: we only actually need numpy when building in ~/nixpkgs repo: not sure why we need all the propagatedBuildInputs here. + # nativeBuildInputs = orig.nativeBuildInputs ++ [ py-next.numpy ]; + nativeBuildInputs = orig.nativeBuildInputs ++ orig.propagatedBuildInputs; + }); + psycopg2 = py-prev.psycopg2.overridePythonAttrs (orig: { + # TODO: upstream + # - see: + # """ + # 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. + # """ + # + # 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 (?) + # 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 ++ [ + # "tests/functional/test_processpool.py::TestProcessPoolDownloader::test_cleans_up_tempfile_on_failure" + "tests/functional/test_processpool.py" + # "tests/unit/test_compat.py::TestBaseManager::test_can_provide_signal_handler_initializers_to_start" + "tests/unit/test_compat.py" + ]; + }); + # skia-pathops + # it tries to call `cc` during the build, but can't find it. + }) + ]; gnome = prev.gnome.overrideScope' (self: super: { inherit (emulated.gnome) gnome-color-manager gnome-keyring - gnome-remote-desktop # TODO: figure out what's asking for this and remove it + # gnome-remote-desktop + gnome-settings-daemon # subprojects/gvc/meson.build:30:0: ERROR: Program 'glib-mkenums mkenums' not found or not executable gnome-user-share mutter ; From e70e8e144b97acf7aae0d87b1ca4cfeab4aa19e4 Mon Sep 17 00:00:00 2001 From: Colin Date: Wed, 8 Feb 2023 22:30:27 +0000 Subject: [PATCH 11/67] cross packages: get more things to build and further reduce the emulated closure --- hosts/common/cross.nix | 118 ++++++++++++++++++++++++++++++++--------- 1 file changed, 94 insertions(+), 24 deletions(-) diff --git a/hosts/common/cross.nix b/hosts/common/cross.nix index 9d62dc9fe..470219536 100644 --- a/hosts/common/cross.nix +++ b/hosts/common/cross.nix @@ -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: +# - last checked: 2023-02-07 +# - opened: 2022-09-11 +# - perl Module Build broken: +# - last checked: 2023-02-07 +# - opened: 2019-08 +# - perl536Packages.Testutf8 fails to cross: +# - last checked: 2023-02-07 +# - opened: 2022-10 +# - python310Packages.psycopg2: +# - 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: - # """ - # 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) ; }); From 99c4fedbdcd42aa5013dda32edcb214ea7aef050 Mon Sep 17 00:00:00 2001 From: Colin Date: Thu, 9 Feb 2023 01:05:25 +0000 Subject: [PATCH 12/67] cross packages: get more things to build and further reduce the emulated closure --- hosts/common/cross.nix | 200 +++++++++++++++++++++++++++-------------- 1 file changed, 134 insertions(+), 66 deletions(-) diff --git a/hosts/common/cross.nix b/hosts/common/cross.nix index 470219536..f7cc8abc6 100644 --- a/hosts/common/cross.nix +++ b/hosts/common/cross.nix @@ -82,41 +82,35 @@ in inherit (emulated) # adwaita-qt # psqlodbc apacheHttpd # TODO: not properly patched (we only need mod_dnssd?) - appstream - blueman - brltty + appstream # meson.build:139:0: ERROR: Program 'gperf' not found or not executable cantarell-fonts # python3.10-skia-pathops - cdrtools - colord + colord # (meson) ERROR: An exe_wrapper is needed but was not found. Please define one in cross file and check the command and/or add it to PATH. # duplicity # python3.10-s3transfer - evince - flakpak - fuzzel + evince # "Run-time dependency gi-docgen found: NO (tried pkgconfig and cmake)" 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 # gnome-remote-desktop # gnome-tour - gnustep # (gnustep.base is used by unar; can't override individual members) + gnustep # gnustep.base: "configure: error: Your compiler does not appear to implement the -fconstant-string-class option needed for support of strings." gocryptfs # gocryptfs-2.3-go-modules # grpc gst_all_1 # gst_all_1.gst-editing-services - gupnp - gupnp_1_6 + # gupnp_1_6 # subprojects/gi-docgen/meson.build:10:0: ERROR: python3 not found gvfs # meson.build:312:2: ERROR: Assert failed: http required but libxml-2.0 not found - flatpak + # flatpak hdf5 # configure: error: cannot run test program while cross compiling - http2 - ibus + # http2 + ibus # configure.ac:152: error: possibly undefined macro: AM_PATH_GLIB_2_0 kitty iio-sensor-proxy libgweather libHX libjcat # data/tests/meson.build:10:0: ERROR: Program 'gnutls-certtool certtool' not found or not executable - librest - librest_1_0 + # TODO: librest*: disable doc building with --disable-gtk-doc + librest # You must have gtk-doc >= 1.13 installed to build documentation + librest_1_0 # (meson) Run-time dependency gi-docgen found: NO (tried pkgconfig and cmake) libsForQt5 # qtbase # make: g++: No such file or directory # libuv mod_dnssd @@ -149,7 +143,10 @@ in 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 # /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 + # unar has multiple failures: + # - "configure: error: Your compiler does not appear to implement the -fconstant-string-class option needed for support of strings. Please check for a more recent version or consider using --enable-nxconstantstring" + # - "/nix/store/0wk6nr1mryvylf5g5frckjam7g7p9gpi-bash-5.2-p15/bin/bash: line 1: ar: command not found" + unar visidata # python3.10-psycopg2 python3.10-pandas python3.10-h5py vpnc webp-pixbuf-loader @@ -159,17 +156,92 @@ in # xdg-utils # perl5.36.0-File-BaseDir / perl5.36.0-Module-Build ; + # apacheHttpdPackagesFor = apacheHttpd: self: + # let + # prevHttpdPkgs = lib.fix (emulated.apacheHttpdPackagesFor apacheHttpd); + # in + # (prev.apacheHttpdPackagesFor apacheHttpd self) // { + # # inherit (prevHttpdPkgs) mod_dnssd; + # mod_dnssd = prevHttpdPkgs.mod_dnssd.override { + # inherit (self) apacheHttpd; + # }; + # }; + # appstream = prev.appstream.override { + # # doesn't fix: "ld: error adding symbols: file in wrong format" + # inherit (emulated) stdenv; + # }; + + blueman = prev.blueman.overrideAttrs(orig: { + # configure: error: ifconfig or ip not found, install net-tools or iproute2 + nativeBuildInputs = orig.nativeBuildInputs ++ [ next.iproute2 ]; + }); + brltty = prev.brltty.override { + # configure: error: no acceptable C compiler found in $PATH + inherit (emulated) stdenv; + }; + cdrtools = prev.cdrtools.override { + # "configure: error: installation or configuration problem: C compiler cc not found." + inherit (emulated) stdenv; + }; + # colord = prev.colord.override { + # # doesn't fix: "ld: error adding symbols: file in wrong format" + # inherit (emulated) stdenv; + # }; + + # evince = prev.evince.override { + # # doesn't fix: "ld: error adding symbols: file in wrong format" + # inherit (emulated) stdenv; + # }; + fuzzel = prev.fuzzel.override { + # meson.build:100:0: ERROR: Dependency lookup for wayland-scanner with method 'pkgconfig' failed: Pkg-config binary for machine 0 not found. Giving up. + inherit (emulated) stdenv; + }; + # fwupd-efi = prev.fwupd-efi.override { + # # efi/meson.build:33:2: ERROR: Problem encountered: gnu-efi support requested, but headers were not found + # inherit (emulated) stdenv; + # }; # 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; + + gmime = prev.gmime.overrideAttrs (orig: { + # "checking preferred charset formats for system iconv... cannot run test program while cross compiling" + configureFlags = orig.configureFlags ++ [ "ac_cv_have_iconv_detect_h=no" ]; }); + gupnp_1_6 = prev.gupnp_1_6.overrideAttrs (orig: { + # "subprojects/gi-docgen/meson.build:10:0: ERROR: python3 not found" + # this patch is copied from the default gupnp. + # TODO: upstream + outputs = [ "out" "dev" ] + ++ lib.optionals (prev.stdenv.buildPlatform == prev.stdenv.hostPlatform) [ "devdoc" ]; + mesonFlags = [ + "-Dgtk_doc=${lib.boolToString (prev.stdenv.buildPlatform == prev.stdenv.hostPlatform)}" + "-Dintrospection=${lib.boolToString (prev.stdenv.buildPlatform == prev.stdenv.hostPlatform)}" + ]; + }); + + 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 + # 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 # meson.build:237:2: ERROR: Dependency "gbm" not found, tried pkgconfig (it's provided by mesa) + ; + }); + + # gst_all_1.gst-editing-services = emulated.gst_all_1.gst-editing-services; + # gst_all_1 = prev.gst_all_1.overrideScope' (self: super: { + # inherit (emulated.gst_all_1) + # gst-editing-services + # ; + # }); # 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 ]; @@ -189,10 +261,44 @@ in # }) # ]; # }); + + # ibus = prev.ibus.override { + # # "_giscanner.cpython-310-x86_64-linux-gnu.so: cannot open shared object file: No such file or directory" + # inherit (emulated) stdenv; + # }; + + # librest = prev.librest.overrideAttrs (orig: { + # # You must have gtk-doc >= 1.13 installed to build documentation (TODO: add '--disable-gtk-doc') + # inherit (emulated) stdenv; + # }); + # librest_1_0 = prev.librest_1_0.overrideAttrs (orig: { + # # Run-time dependency gi-docgen found: NO (tried pkgconfig and cmake) + # inherit (emulated) stdenv; + # }); + # libsForQt5 = prev.libsForQt5.overrideScope' (self: super: { + # inherit (emulated.libsForQt5) + # qtbase + # ; + # }); + + 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; + }); + + # perlPackageOverrides = _perl: { + # inherit (pkgs.emulated.perl.pkgs) + # Testutf8 + # ; + # }; + 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 ]; }); + pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [ (py-next: py-prev: { defcon = py-prev.defcon.overridePythonAttrs (orig: { @@ -250,51 +356,13 @@ 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 - # 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 # meson.build:237:2: ERROR: Dependency "gbm" not found, tried pkgconfig (it's provided by mesa) - ; - }); - - # gst_all_1.gst-editing-services = emulated.gst_all_1.gst-editing-services; - - # gst_all_1 = prev.gst_all_1.overrideScope' (self: super: { - # inherit (emulated.gst_all_1) - # gst-editing-services - # ; + # unar = (prev.unar.override { + # # "meson.build:52:2: ERROR: Program 'gpg2 gpg' not found or not executable" + # inherit (emulated) stdenv; + # }).overrideAttrs (orig: { + # nativeBuildInputs = orig.nativeBuildInputs ++ [ next.coreutils-full ]; # }); - - # libsForQt5 = prev.libsForQt5.overrideScope' (self: super: { - # inherit (emulated.libsForQt5) - # qtbase - # ; - # }); - - # apacheHttpdPackagesFor = apacheHttpd: self: - # let - # prevHttpdPkgs = lib.fix (emulated.apacheHttpdPackagesFor apacheHttpd); - # in - # (prev.apacheHttpdPackagesFor apacheHttpd self) // { - # # inherit (prevHttpdPkgs) mod_dnssd; - # mod_dnssd = prevHttpdPkgs.mod_dnssd.override { - # inherit (self) apacheHttpd; - # }; - # }; }) ]; - - # perlPackageOverrides = _perl: { - # inherit (pkgs.emulated.perl.pkgs) - # Testutf8 - # ; - # }; }; } From 635a4b958bcdb44d3b5992df574074285cb26e1e Mon Sep 17 00:00:00 2001 From: Colin Date: Thu, 9 Feb 2023 06:13:23 +0000 Subject: [PATCH 13/67] working moby cross compilation --- hosts/common/cross.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/hosts/common/cross.nix b/hosts/common/cross.nix index f7cc8abc6..05e01f854 100644 --- a/hosts/common/cross.nix +++ b/hosts/common/cross.nix @@ -87,6 +87,7 @@ in colord # (meson) ERROR: An exe_wrapper is needed but was not found. Please define one in cross file and check the command and/or add it to PATH. # duplicity # python3.10-s3transfer evince # "Run-time dependency gi-docgen found: NO (tried pkgconfig and cmake)" + flatpak # No package 'libxml-2.0' found 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 @@ -128,6 +129,7 @@ in pam_mount perlInterpreters # perl5.36.0-Module-Build perl5.36.0-Test-utf8 (see tracking issues ^) phoc # Program wayland-scanner found: NO + phosh # libadwaita-1 not found # pipewire # psqlodbc pulseaudio # FAILED: meson-internal__test @@ -192,6 +194,10 @@ in # # doesn't fix: "ld: error adding symbols: file in wrong format" # inherit (emulated) stdenv; # }; + # flatpak = prev.flatpak.override { + # # doesn't fix: "ld: error adding symbols: file in wrong format" + # inherit (emulated) stdenv; + # }; fuzzel = prev.fuzzel.override { # meson.build:100:0: ERROR: Dependency lookup for wayland-scanner with method 'pkgconfig' failed: Pkg-config binary for machine 0 not found. Giving up. inherit (emulated) stdenv; @@ -230,6 +236,8 @@ in gnome-keyring # TODO: remove gnome-remote-desktop (wanted by gnome-control-center) gnome-remote-desktop # Program gdbus-codegen found: NO + gnome-shell # "meson.build:128:0: ERROR: Program 'gjs' not found or not executable" + gnome-session # gdbus-codegen not found or executable gnome-settings-daemon # subprojects/gvc/meson.build:30:0: ERROR: Program 'glib-mkenums mkenums' not found or not executable gnome-user-share mutter # meson.build:237:2: ERROR: Dependency "gbm" not found, tried pkgconfig (it's provided by mesa) From 5777e1a6e46c6ed0f15eb6c86856eba94a9d1eab Mon Sep 17 00:00:00 2001 From: Colin Date: Thu, 9 Feb 2023 07:58:32 +0000 Subject: [PATCH 14/67] cross packages: cross compile more gnome packages --- hosts/common/cross.nix | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/hosts/common/cross.nix b/hosts/common/cross.nix index 05e01f854..6da10889e 100644 --- a/hosts/common/cross.nix +++ b/hosts/common/cross.nix @@ -231,17 +231,23 @@ 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-color-manager # src/meson.build:3:0: ERROR: Program 'glib-compile-resources' not found or not executable gnome-control-center # subprojects/gvc/meson.build:30:0: ERROR: Program 'glib-mkenums mkenums' not found or not executable - gnome-keyring - # TODO: remove gnome-remote-desktop (wanted by gnome-control-center) - gnome-remote-desktop # Program gdbus-codegen found: NO + gnome-keyring # configure.ac:374: error: possibly undefined macro: AM_PATH_LIBGCRYPT gnome-shell # "meson.build:128:0: ERROR: Program 'gjs' not found or not executable" - gnome-session # gdbus-codegen not found or executable gnome-settings-daemon # subprojects/gvc/meson.build:30:0: ERROR: Program 'glib-mkenums mkenums' not found or not executable - gnome-user-share + gnome-user-share # meson.build:111:6: ERROR: Program 'glib-compile-schemas' not found or not executable mutter # meson.build:237:2: ERROR: Dependency "gbm" not found, tried pkgconfig (it's provided by mesa) ; + gnome-remote-desktop = emulated.gnome.gnome-remote-desktop.overrideAttrs(orig: { + # TODO: remove gnome-remote-desktop (wanted by gnome-control-center) + # "Program gdbus-codegen found: NO" + nativeBuildInputs = orig.nativeBuildInputs ++ [ next.glib ]; + }); + gnome-session = emulated.gnome.gnome-session.overrideAttrs(orig: { + # "gdbus-codegen not found or executable" + nativeBuildInputs = orig.nativeBuildInputs ++ [ next.glib ]; + }); }); # gst_all_1.gst-editing-services = emulated.gst_all_1.gst-editing-services; From e6a6d35adfa06bf374738aebf10268940eaa5e93 Mon Sep 17 00:00:00 2001 From: Colin Date: Thu, 9 Feb 2023 19:40:16 +0000 Subject: [PATCH 15/67] phosh-mobile-settings: cross compile --- hosts/common/cross.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/hosts/common/cross.nix b/hosts/common/cross.nix index 6da10889e..d6c1f4f14 100644 --- a/hosts/common/cross.nix +++ b/hosts/common/cross.nix @@ -130,6 +130,7 @@ in perlInterpreters # perl5.36.0-Module-Build perl5.36.0-Test-utf8 (see tracking issues ^) phoc # Program wayland-scanner found: NO phosh # libadwaita-1 not found + phosh-mobile-settings # meson.build:26:0: ERROR: Dependency "phosh-plugins" not found, tried pkgconfig # pipewire # psqlodbc pulseaudio # FAILED: meson-internal__test From 14922a40b2ce303e7562948f99d82efe9210091f Mon Sep 17 00:00:00 2001 From: Colin Date: Fri, 10 Feb 2023 00:45:44 +0000 Subject: [PATCH 16/67] gpodder: fix `makeWrapper` to be a nativeBuildInput --- pkgs/gpodder-configured/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/gpodder-configured/default.nix b/pkgs/gpodder-configured/default.nix index 83d29eec1..a90a63cf5 100644 --- a/pkgs/gpodder-configured/default.nix +++ b/pkgs/gpodder-configured/default.nix @@ -13,7 +13,7 @@ in (symlinkJoin { name = "gpodder-configured"; paths = [ gpodder remove-extra ]; - buildInputs = [ makeWrapper ]; + nativeBuildInputs = [ makeWrapper ]; # gpodder keeps all its feeds in a sqlite3 database. # we can configure the feeds externally by wrapping gpodder and just instructing it to import From 86293377d7f190bf241ad5c18496a00998e47309 Mon Sep 17 00:00:00 2001 From: Colin Date: Fri, 10 Feb 2023 00:46:04 +0000 Subject: [PATCH 17/67] cross packages: cross compile more stuff --- hosts/common/cross.nix | 265 ++++++++++++++++++++++++++++++++--------- 1 file changed, 208 insertions(+), 57 deletions(-) diff --git a/hosts/common/cross.nix b/hosts/common/cross.nix index d6c1f4f14..18c3fe8b0 100644 --- a/hosts/common/cross.nix +++ b/hosts/common/cross.nix @@ -65,7 +65,7 @@ in # the configuration of which specific package set `pkgs.cross` refers to happens elsewhere; # here we just define them all. nixpkgs.overlays = [ - (next: prev: rec { + (next: prev: { # non-emulated packages build *from* local *for* target. # for large packages like the linux kernel which are expensive to build under emulation, # the config can explicitly pull such packages from `pkgs.cross` to do more efficient cross-compilation. @@ -81,81 +81,68 @@ in # packages which don't cross compile inherit (emulated) # adwaita-qt # psqlodbc - apacheHttpd # TODO: not properly patched (we only need mod_dnssd?) + apacheHttpd_2_4 # `configure: error: Size of "void *" is less than size of "long"` appstream # meson.build:139:0: ERROR: Program 'gperf' not found or not executable cantarell-fonts # python3.10-skia-pathops colord # (meson) ERROR: An exe_wrapper is needed but was not found. Please define one in cross file and check the command and/or add it to PATH. + dante # "configure: error: error: getaddrinfo() error value count too low" # duplicity # python3.10-s3transfer - evince # "Run-time dependency gi-docgen found: NO (tried pkgconfig and cmake)" + emacs # "configure: error: cannot run test program while cross compiling" flatpak # No package 'libxml-2.0' found 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 + gmime3 # "checking preferred charset formats for system iconv... cannot run test program while cross compiling" # gnome-keyring # gnome-remote-desktop # gnome-tour gnustep # gnustep.base: "configure: error: Your compiler does not appear to implement the -fconstant-string-class option needed for support of strings." gocryptfs # gocryptfs-2.3-go-modules # grpc - gst_all_1 # gst_all_1.gst-editing-services + gst_all_1 # (gst_all_1.gst-editing-services) `Run-time dependency gst-validate-1.0 found: NO (tried pkgconfig and cmake)` # gupnp_1_6 # subprojects/gi-docgen/meson.build:10:0: ERROR: python3 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 # configure.ac:152: error: possibly undefined macro: AM_PATH_GLIB_2_0 - kitty - iio-sensor-proxy - libgweather - libHX + kitty # "FileNotFoundError: [Errno 2] No such file or directory: 'pkg-config'" + iio-sensor-proxy # "./autogen.sh: line 26: gtkdocize: not found" + libgccjit # "../../gcc-9.5.0/gcc/jit/jit-result.c:52:3: error: 'dlclose' was not declared in this scope" + libgweather # "Run-time dependency vapigen found: NO (tried pkgconfig)" libjcat # data/tests/meson.build:10:0: ERROR: Program 'gnutls-certtool certtool' not found or not executable - # TODO: librest*: disable doc building with --disable-gtk-doc - librest # You must have gtk-doc >= 1.13 installed to build documentation - librest_1_0 # (meson) Run-time dependency gi-docgen found: NO (tried pkgconfig and cmake) 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 + mod_dnssd # "configure: error: *** Sorry, could not find apxs ***" 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 + notmuch # "Error: The dependencies of notmuch could not be satisfied" (xapian, gmime, glib, talloc) + obex_data_server # "/nix/store/0wk6nr1mryvylf5g5frckjam7g7p9gpi-bash-5.2-p15/bin/bash: line 2: --prefix=ods_manager: command not found" + openfortivpn # "checking for /proc/net/route... configure: error: cannot check for file existence when cross compiling" + ostree # "configure: error: Need GPGME_PTHREAD version 1.1.8 or later" perlInterpreters # perl5.36.0-Module-Build perl5.36.0-Test-utf8 (see tracking issues ^) phoc # Program wayland-scanner found: NO phosh # libadwaita-1 not found phosh-mobile-settings # meson.build:26:0: ERROR: Dependency "phosh-plugins" not found, tried pkgconfig - # pipewire - # psqlodbc - pulseaudio # FAILED: meson-internal__test + psqlodbc # "configure: error: odbc_config not found (required for unixODBC build)" # qgnomeplatform # qtbase - qt6 # psqlodbc + qt6 # error in psqlodbc, not fixed by emulating only psqlodbc above for some reason + rapidfuzz-cpp # error: could not find git for clone of catch2-populate re2 # FAILED: CMakeFiles/test.util - rmlint - sequoia + rmlint # "Checking whether the C compiler works... no" + sequoia # "/nix/store/q8hg17w47f9xr014g36rdc2gi8fv02qc-clang-aarch64-unknown-linux-gnu-12.0.1-lib/lib/libclang.so.12: cannot open shared object file: No such file or directory"', /build/sequoia-0.27.0-vendor.tar.gz/bindgen/src/lib.rs:1975:31" # splatmoji 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 + tracker-miners # "meson.build:183:0: ERROR: Can not run test applications in this cross environment." twitter-color-emoji # /nix/store/0wk6nr1mryvylf5g5frckjam7g7p9gpi-bash-5.2-p15/bin/bash: line 1: pkg-config: command not found # unar has multiple failures: # - "configure: error: Your compiler does not appear to implement the -fconstant-string-class option needed for support of strings. Please check for a more recent version or consider using --enable-nxconstantstring" # - "/nix/store/0wk6nr1mryvylf5g5frckjam7g7p9gpi-bash-5.2-p15/bin/bash: line 1: ar: command not found" unar visidata # python3.10-psycopg2 python3.10-pandas python3.10-h5py - vpnc - webp-pixbuf-loader + # vpnc # "/nix/store/0wk6nr1mryvylf5g5frckjam7g7p9gpi-bash-5.2-p15/bin/bash: line 1: perl: command not found" + webp-pixbuf-loader # install phase: "Builder called die: Cannot wrap '/nix/store/kpp8qhzdjqgvw73llka5gpnsj0l4jlg8-gdk-pixbuf-aarch64-unknown-linux-gnu-2.42.10/bin/gdk-pixbuf-thumbnailer' because it is not an executable file" # 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-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 ; @@ -173,8 +160,13 @@ in # # doesn't fix: "ld: error adding symbols: file in wrong format" # inherit (emulated) stdenv; # }; + # appstream = prev.appstream.overrideAttrs (orig: { + # # fixes "Program 'gperf' not found or not executable" + # # does not fix "ERROR: An exe_wrapper is needed but was not found. Please define one in cross file and check the command and/or add it to PATH." + # nativeBuildInputs = orig.nativeBuildInputs ++ [ next.gperf ]; + # }); - blueman = prev.blueman.overrideAttrs(orig: { + blueman = prev.blueman.overrideAttrs (orig: { # configure: error: ifconfig or ip not found, install net-tools or iproute2 nativeBuildInputs = orig.nativeBuildInputs ++ [ next.iproute2 ]; }); @@ -217,6 +209,11 @@ in # "checking preferred charset formats for system iconv... cannot run test program while cross compiling" configureFlags = orig.configureFlags ++ [ "ac_cv_have_iconv_detect_h=no" ]; }); + # gmime3 = prev.gmime3.overrideAttrs (orig: { + # # "checking preferred charset formats for system iconv... cannot run test program while cross compiling" + # # unsolved: "ImportError: /nix/store/c190src4bjkfp7bdgc5sadnmvgzv7kxb-gobject-introspection-aarch64-unknown-linux-gnu-1.74.0/lib/gobject-introspection/giscanner/_giscanner.cpython-310-x86_64-linux-gnu.so: cannot open shared object file: No such file or directory" + # configureFlags = orig.configureFlags ++ [ "ac_cv_have_iconv_detect_h=no" ]; + # }); gupnp_1_6 = prev.gupnp_1_6.overrideAttrs (orig: { # "subprojects/gi-docgen/meson.build:10:0: ERROR: python3 not found" # this patch is copied from the default gupnp. @@ -231,24 +228,83 @@ 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 # src/meson.build:3:0: ERROR: Program 'glib-compile-resources' not found or not executable - gnome-control-center # subprojects/gvc/meson.build:30:0: ERROR: Program 'glib-mkenums mkenums' not found or not executable + evolution-data-server # "The 'perl' not found, not installing csv2vcard" gnome-keyring # configure.ac:374: error: possibly undefined macro: AM_PATH_LIBGCRYPT gnome-shell # "meson.build:128:0: ERROR: Program 'gjs' not found or not executable" gnome-settings-daemon # subprojects/gvc/meson.build:30:0: ERROR: Program 'glib-mkenums mkenums' not found or not executable - gnome-user-share # meson.build:111:6: ERROR: Program 'glib-compile-schemas' not found or not executable mutter # meson.build:237:2: ERROR: Dependency "gbm" not found, tried pkgconfig (it's provided by mesa) ; - gnome-remote-desktop = emulated.gnome.gnome-remote-desktop.overrideAttrs(orig: { + evince = super.evince.overrideAttrs (orig: { + # fixes (meson) "Run-time dependency gi-docgen found: NO (tried pkgconfig and cmake)" + # inspired by gupnp + outputs = [ "out" "dev" ] + ++ lib.optionals (prev.stdenv.buildPlatform == prev.stdenv.hostPlatform) [ "devdoc" ]; + mesonFlags = orig.mesonFlags ++ [ + "-Dgtk_doc=${lib.boolToString (prev.stdenv.buildPlatform == prev.stdenv.hostPlatform)}" + ]; + }); + # evolution-data-server = super.evolution-data-server.override { + # inherit (next) stdenv; + # }; + # evolution-data-server = super.evolution-data-server.overrideAttrs (orig: { + # # fixes "The 'perl' not found, not installing csv2vcard" + # # doesn't fix "CMake Error: try_run() invoked in cross-compiling mode, please set the following cache variables appropriately" + # nativeBuildInputs = orig.nativeBuildInputs ++ [ next.perl ]; + # }); + gnome-color-manager = super.gnome-color-manager.overrideAttrs (orig: { + # fixes: "src/meson.build:3:0: ERROR: Program 'glib-compile-resources' not found or not executable" + nativeBuildInputs = orig.nativeBuildInputs ++ [ next.glib ]; + }); + gnome-control-center = super.gnome-control-center.overrideAttrs (orig: { + # fixes "subprojects/gvc/meson.build:30:0: ERROR: Program 'glib-mkenums mkenums' not found or not executable" + nativeBuildInputs = orig.nativeBuildInputs ++ [ next.glib ]; + }); + # gnome-control-center = super.gnome-control-center.override { + # inherit (next) stdenv; + # }; + gnome-remote-desktop = super.gnome-remote-desktop.overrideAttrs (orig: { # TODO: remove gnome-remote-desktop (wanted by gnome-control-center) - # "Program gdbus-codegen found: NO" + # fixes: "Program gdbus-codegen found: NO" nativeBuildInputs = orig.nativeBuildInputs ++ [ next.glib ]; }); - gnome-session = emulated.gnome.gnome-session.overrideAttrs(orig: { - # "gdbus-codegen not found or executable" + # gnome-shell = super.gnome-shell.overrideAttrs (orig: { + # # fixes "meson.build:128:0: ERROR: Program 'gjs' not found or not executable" + # # does not fix "_giscanner.cpython-310-x86_64-linux-gnu.so: cannot open shared object file: No such file or directory" (python import failure) + # nativeBuildInputs = orig.nativeBuildInputs ++ [ next.gjs next.gobject-introspection ]; + # # try to reduce gobject-introspection/shew dependencies + # mesonFlags = [ + # "-Dextensions_app=false" + # "-Dextensions_tool=false" + # "-Dman=false" + # ]; + # # fixes "gvc| Build-time dependency gobject-introspection-1.0 found: NO" + # # inspired by gupnp_1_6 + # # outputs = [ "out" "dev" ] + # # ++ lib.optionals (prev.stdenv.buildPlatform == prev.stdenv.hostPlatform) [ "devdoc" ]; + # # mesonFlags = [ + # # "-Dgtk_doc=${lib.boolToString (prev.stdenv.buildPlatform == prev.stdenv.hostPlatform)}" + # # ]; + # }); + # gnome-shell = super.gnome-shell.override { + # inherit (next) stdenv; + # }; + # gnome-settings-daemon = super.gnome-settings-daemon.overrideAttrs (orig: { + # # fixes "subprojects/gvc/meson.build:30:0: ERROR: Program 'glib-mkenums mkenums' not found or not executable" + # # new error: "plugins/power/meson.build:22:0: ERROR: Dependency lookup for glib-2.0 with method 'pkgconfig' failed: Pkg-config binary for machine 0 not found. Giving up." + # nativeBuildInputs = orig.nativeBuildInputs ++ [ next.glib ]; + # }); + gnome-session = super.gnome-session.overrideAttrs (orig: { + # fixes: "gdbus-codegen not found or executable" nativeBuildInputs = orig.nativeBuildInputs ++ [ next.glib ]; }); + gnome-user-share = super.gnome-user-share.overrideAttrs (orig: { + # fixes: meson.build:111:6: ERROR: Program 'glib-compile-schemas' not found or not executable + nativeBuildInputs = orig.nativeBuildInputs ++ [ next.glib ]; + }); + # mutter = super.mutter.override { + # # DOES NOT FIX: "meson.build:237:2: ERROR: Dependency "gbm" not found, tried pkgconfig (it's provided by mesa)" + # inherit (next) stdenv; + # }; }); # gst_all_1.gst-editing-services = emulated.gst_all_1.gst-editing-services; @@ -282,14 +338,25 @@ in # inherit (emulated) stdenv; # }; - # librest = prev.librest.overrideAttrs (orig: { - # # You must have gtk-doc >= 1.13 installed to build documentation (TODO: add '--disable-gtk-doc') - # inherit (emulated) stdenv; - # }); - # librest_1_0 = prev.librest_1_0.overrideAttrs (orig: { - # # Run-time dependency gi-docgen found: NO (tried pkgconfig and cmake) - # inherit (emulated) stdenv; - # }); + libHX = prev.libHX.overrideAttrs (orig: { + # "Can't exec "libtoolize": No such file or directory at /nix/store/r4fvx9hazsm0rdm7s393zd5v665dsh1c-autoconf-2.71/share/autoconf/Autom4te/FileUtils.pm line 294." + nativeBuildInputs = orig.nativeBuildInputs ++ [ next.libtool ]; + }); + + librest = prev.librest.overrideAttrs (orig: { + # fixes "You must have gtk-doc >= 1.13 installed to build documentation" + # by removing the "--enable-gtk-doc" flag + configureFlags = [ "--with-ca-certificates=/etc/ssl/certs/ca-certificates.crt" ]; + }); + librest_1_0 = prev.librest_1_0.overrideAttrs (orig: { + # fixes (meson) "Run-time dependency gi-docgen found: NO (tried pkgconfig and cmake)" + # inspired by gupnp + outputs = [ "out" "dev" ] + ++ lib.optionals (prev.stdenv.buildPlatform == prev.stdenv.hostPlatform) [ "devdoc" ]; + mesonFlags = orig.mesonFlags ++ [ + "-Dgtk_doc=${lib.boolToString (prev.stdenv.buildPlatform == prev.stdenv.hostPlatform)}" + ]; + }); # libsForQt5 = prev.libsForQt5.overrideScope' (self: super: { # inherit (emulated.libsForQt5) # qtbase @@ -303,6 +370,52 @@ in doCheck = false; }); + ncftp = prev.ncftp.override { + # fixes: "ar: No such file or directory" + inherit (emulated) stdenv; + }; + networkmanager-fortisslvpn = prev.networkmanager-fortisslvpn.overrideAttrs (orig: { + # fixes "gdbus-codegen: command not found" + nativeBuildInputs = orig.nativeBuildInputs ++ [ prev.glib ]; + }); + # networkmanager-iodine = prev.networkmanager-iodine.overrideAttrs (orig: { + # # fails to fix "configure.ac:58: error: possibly undefined macro: AM_GLIB_GNU_GETTEXT" + # nativeBuildInputs = orig.nativeBuildInputs ++ [ prev.gettext ]; + # }); + networkmanager-l2tp = prev.networkmanager-l2tp.overrideAttrs (orig: { + # fixes "gdbus-codegen: command not found" + # fixes "gtk4-builder-tool: command not found" + nativeBuildInputs = orig.nativeBuildInputs ++ [ prev.glib prev.gtk4 ]; + }); + networkmanager-openconnect = prev.networkmanager-openconnect.overrideAttrs (orig: { + # fixes "properties/gresource.xml: Permission denied" + # - by providing glib-compile-resources + nativeBuildInputs = orig.nativeBuildInputs ++ [ prev.glib ]; + }); + networkmanager-openvpn = prev.networkmanager-openvpn.overrideAttrs (orig: { + # fixes "properties/gresource.xml: Permission denied" + # - by providing glib-compile-resources + nativeBuildInputs = orig.nativeBuildInputs ++ [ prev.glib ]; + }); + networkmanager-sstp = prev.networkmanager-sstp.overrideAttrs (orig: { + # fixes "gdbus-codegen: command not found" + nativeBuildInputs = orig.nativeBuildInputs ++ [ prev.glib ]; + }); + networkmanager-vpnc = prev.networkmanager-vpnc.overrideAttrs (orig: { + # fixes "properties/gresource.xml: Permission denied" + # - by providing glib-compile-resources + nativeBuildInputs = orig.nativeBuildInputs ++ [ prev.glib ]; + }); + nheko = prev.nheko.overrideAttrs (orig: { + # fixes "fatal error: lmdb++.h: No such file or directory + buildInputs = orig.buildInputs ++ [ next.lmdbxx ]; + }); + + pam_mount = prev.pam_mount.overrideAttrs (orig: { + # fixes: "perl: command not found" + nativeBuildInputs = orig.nativeBuildInputs ++ [ next.perl ]; + }); + # perlPackageOverrides = _perl: { # inherit (pkgs.emulated.perl.pkgs) # Testutf8 @@ -370,13 +483,51 @@ in # it tries to call `cc` during the build, but can't find it. }) ]; + # squeekboard = prev.squeekboard.overrideAttrs (orig: { + # # fixes: "meson.build:1:0: ERROR: 'rust' compiler binary not defined in cross or native file" + # # new error: "meson.build:1:0: ERROR: Rust compiler rustc --target aarch64-unknown-linux-gnu -C linker=aarch64-unknown-linux-gnu-gcc can not compile programs." + # mesonFlags = + # let + # # ERROR: 'rust' compiler binary not defined in cross or native file + # crossFile = next.writeText "cross-file.conf" '' + # [binaries] + # rust = [ 'rustc', '--target', '${next.rust.toRustTargetSpec next.stdenv.hostPlatform}' ] + # ''; + # in + # orig.mesonFlags or [] ++ lib.optionals (next.stdenv.hostPlatform != next.stdenv.buildPlatform) [ "--cross-file=${crossFile}" ]; + # }); + strp = prev.srtp.overrideAttrs (orig: { + # roc_driver test times out after 30s + doCheck = false; + }); + sysprof = prev.sysprof.overrideAttrs (orig: { + # fixes: "src/meson.build:12:2: ERROR: Program 'gdbus-codegen' not found or not executable" + nativeBuildInputs = orig.nativeBuildInputs ++ [ next.glib ]; + }); + tpm2-abrmd = prev.tpm2-abrmd.overrideAttrs (orig: { + # fixes "configure: error: *** gdbus-codegen is required to build tpm2-abrmd; No package 'gio-unix-2.0' found" + nativeBuildInputs = orig.nativeBuildInputs ++ [ next.glib ]; + }); # unar = (prev.unar.override { - # # "meson.build:52:2: ERROR: Program 'gpg2 gpg' not found or not executable" + # # fixes "ar: command not found" + # # new error: "gcc: error: unrecognized command line option '-fobjc-runtime=gnustep-2.0'" # inherit (emulated) stdenv; - # }).overrideAttrs (orig: { - # nativeBuildInputs = orig.nativeBuildInputs ++ [ next.coreutils-full ]; # }); + + vpnc = prev.vpnc.overrideAttrs (orig: { + # fixes "perl: command not found" + nativeBuildInputs = orig.nativeBuildInputs ++ [ next.perl ]; + }); + xdg-desktop-portal-gtk = prev.xdg-desktop-portal-gtk.overrideAttrs (orig: { + # fixes "No package 'xdg-desktop-portal' found" + buildInputs = orig.buildInputs ++ [ next.xdg-desktop-portal ]; + }); + xdg-desktop-portal-gnome = prev.xdg-desktop-portal-gnome.overrideAttrs (orig: { + # fixes: "data/meson.build:33:5: ERROR: Program 'msgfmt' not found or not executable" + # fixes: "src/meson.build:25:0: ERROR: Program 'gdbus-codegen' not found or not executable" + nativeBuildInputs = orig.nativeBuildInputs ++ [ next.gettext next.glib ]; + }); }) ]; }; From 50812e5678b1e64389b977b53f9bfe5494489c1d Mon Sep 17 00:00:00 2001 From: Colin Date: Fri, 10 Feb 2023 00:46:27 +0000 Subject: [PATCH 18/67] moby: ship some of the base apps --- hosts/by-name/moby/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hosts/by-name/moby/default.nix b/hosts/by-name/moby/default.nix index 7baf4a652..93eb82047 100644 --- a/hosts/by-name/moby/default.nix +++ b/hosts/by-name/moby/default.nix @@ -12,6 +12,11 @@ # TODO: re-enable once base is cross-compiled sane.programs.guiApps.enableSuggested = false; + # compile a subset of the larger mobile package set, until we're ready for it. + sane.programs.gpodder-configured.enableFor.user.colin = true; + sane.programs.nheko.enableFor.user.colin = true; + sane.programs.sublime-music-mobile.enableFor.user.colin = true; + sane.programs.vlc.enableFor.user.colin = true; # cross-compiled documentation is *slow*. # no obvious way to natively compile docs (2022/09/29). From d776c4618a61dba8cd4591eb24e06562428df685 Mon Sep 17 00:00:00 2001 From: Colin Date: Fri, 10 Feb 2023 00:47:10 +0000 Subject: [PATCH 19/67] programs: split the guiApps category into slightly smaller bits --- hosts/by-name/desko/default.nix | 2 + hosts/by-name/lappy/default.nix | 2 + hosts/common/programs.nix | 92 ++++++++++++++++++--------------- 3 files changed, 54 insertions(+), 42 deletions(-) diff --git a/hosts/by-name/desko/default.nix b/hosts/by-name/desko/default.nix index eb9cb23b3..d8bf738ac 100644 --- a/hosts/by-name/desko/default.nix +++ b/hosts/by-name/desko/default.nix @@ -15,6 +15,8 @@ sane.gui.sway.enable = true; sane.programs.iphoneUtils.enableFor.user.colin = true; + sane.programs.guiApps.suggestedPrograms = [ "desktopGuiApps" ]; + boot.loader.efi.canTouchEfiVariables = false; sane.image.extraBootFiles = [ pkgs.bootpart-uefi-x86_64 ]; diff --git a/hosts/by-name/lappy/default.nix b/hosts/by-name/lappy/default.nix index c0e71e8af..9d618455c 100644 --- a/hosts/by-name/lappy/default.nix +++ b/hosts/by-name/lappy/default.nix @@ -15,6 +15,8 @@ boot.loader.efi.canTouchEfiVariables = false; sane.image.extraBootFiles = [ pkgs.bootpart-uefi-x86_64 ]; + sane.programs.guiApps.suggestedPrograms = [ "desktopGuiApps" ]; + sops.secrets.colin-passwd = { sopsFile = ../../../secrets/lappy.yaml; neededForUsers = true; diff --git a/hosts/common/programs.nix b/hosts/common/programs.nix index 6b0a481c6..e8dcf9257 100644 --- a/hosts/common/programs.nix +++ b/hosts/common/programs.nix @@ -4,11 +4,23 @@ let inherit (builtins) attrNames concatLists; inherit (lib) mapAttrs mapAttrsToList mkDefault mkMerge optional; + flattenedPkgs = pkgs // (with pkgs; { + # XXX can't `inherit` a nested attr, so we move them to the toplevel + "cacert.unbundled" = pkgs.cacert.unbundled; + "gnome.cheese" = gnome.cheese; + "gnome.dconf-editor" = gnome.dconf-editor; + "gnome.file-roller" = gnome.file-roller; + "gnome.gnome-disk-utility" = gnome.gnome-disk-utility; + "gnome.gnome-maps" = gnome.gnome-maps; + "gnome.nautilus" = gnome.nautilus; + "gnome.gnome-system-monitor" = gnome.gnome-system-monitor; + "gnome.gnome-terminal" = gnome.gnome-terminal; + "gnome.gnome-weather" = gnome.gnome-weather; + "libsForQt5.plasmatube" = libsForQt5.plasmatube; + }); + sysadminPkgs = { - inherit (pkgs // { - # XXX can't `inherit` a nested attr, so we move them to the toplevel - "cacert.unbundled" = pkgs.cacert.unbundled; - }) + inherit (flattenedPkgs) btrfs-progs "cacert.unbundled" # some services require unbundled /etc/ssl/certs cryptsetup @@ -117,40 +129,22 @@ let # tageditor # music tagging unar wireguard-tools + xdg-utils # for xdg-open # youtube-dl yt-dlp ; }; guiPkgs = { - inherit (pkgs // (with pkgs; { - # XXX can't `inherit` a nested attr, so we move them to the toplevel - # TODO: could use some "flatten attrs" helper instead - "gnome.cheese" = gnome.cheese; - "gnome.dconf-editor" = gnome.dconf-editor; - "gnome.file-roller" = gnome.file-roller; - "gnome.gnome-disk-utility" = gnome.gnome-disk-utility; - "gnome.gnome-maps" = gnome.gnome-maps; - "gnome.nautilus" = gnome.nautilus; - "gnome.gnome-system-monitor" = gnome.gnome-system-monitor; - "gnome.gnome-terminal" = gnome.gnome-terminal; - "gnome.gnome-weather" = gnome.gnome-weather; - "libsForQt5.plasmatube" = libsForQt5.plasmatube; - })) - audacity + inherit (flattenedPkgs) celluloid # mpv frontend - chromium clinfo - dino - electrum - element-desktop emote evince # works on phosh # { pkg = fluffychat-moby; dir = [ ".local/share/chat.fluffy.fluffychat" ]; } # TODO: ship normal fluffychat on non-moby? - foliate # e-book reader - font-manager + # foliate # e-book reader # XXX by default fractal stores its state in ~/.local/share/. # after logging in, manually change ~/.local/share/keyrings/... to point it to some predictable subdir. @@ -158,14 +152,11 @@ let # { pkg = fractal-latest; private = [ ".local/share/fractal" ]; } # { pkg = fractal-next; private = [ ".local/share/fractal" ]; } - gajim # XMPP client - gimp # broken on phosh - "gnome.cheese" + # "gnome.cheese" "gnome.dconf-editor" gnome-feeds # RSS reader (with claimed mobile support) "gnome.file-roller" - "gnome.gnome-disk-utility" - "gnome.gnome-maps" # works on phosh + # "gnome.gnome-maps" # works on phosh "gnome.nautilus" # gnome-podcasts "gnome.gnome-system-monitor" @@ -173,21 +164,15 @@ let "gnome.gnome-weather" gpodder-configured gthumb - inkscape - kdenlive - kid3 # audio tagging - krita - libreoffice-fresh # XXX colin: maybe don't want this on mobile - lollypop + # lollypop mpv networkmanagerapplet - newsflash + # newsflash nheko - obsidian pavucontrol # picard # music tagging playerctl - "libsForQt5.plasmatube" # Youtube player + # "libsForQt5.plasmatube" # Youtube player soundconverter # sublime music persists any downloaded albums here. # it doesn't obey a conventional ~/Music/{Artist}/{Album}/{Track} notation, so no symlinking @@ -195,15 +180,33 @@ let # possible to pass config as a CLI arg (sublime-music -c config.json) # { pkg = sublime-music; dir = [ ".local/share/sublime-music" ]; } sublime-music-mobile - tdesktop # broken on phosh - tokodon + # tdesktop # broken on phosh + # tokodon vlc # pleroma client (Electron). input is broken on phosh. TODO(2023/02/02): fix electron19 input (insecure) # whalebird - xdg-utils # for xdg-open xterm # broken on phosh ; }; + desktopGuiPkgs = { + inherit (flattenedPkgs) + audacity + chromium + dino + electrum + element-desktop + font-manager + gajim # XMPP client + gimp # broken on phosh + "gnome.gnome-disk-utility" + inkscape + kdenlive + kid3 # audio tagging + krita + libreoffice-fresh # XXX colin: maybe don't want this on mobile + obsidian + ; + }; x86GuiPkgs = { inherit (pkgs) discord @@ -236,6 +239,7 @@ in config = { sane.programs = mkMerge [ (declarePkgs consolePkgs) + (declarePkgs desktopGuiPkgs) (declarePkgs guiPkgs) (declarePkgs iphonePkgs) (declarePkgs sysadminPkgs) @@ -248,6 +252,10 @@ in package = null; suggestedPrograms = attrNames consolePkgs; }; + desktopGuiApps = { + package = null; + suggestedPrograms = attrNames desktopGuiPkgs; + }; guiApps = { package = null; suggestedPrograms = (attrNames guiPkgs) From f78a02700f18152f0e11354492df8803fe206037 Mon Sep 17 00:00:00 2001 From: Colin Date: Sat, 11 Feb 2023 00:50:46 +0000 Subject: [PATCH 20/67] cross packages: full moby build can cross compile (except konsole is untested) --- hosts/common/cross.nix | 438 ++++++++++++++++++++++++++++++++++------- 1 file changed, 365 insertions(+), 73 deletions(-) diff --git a/hosts/common/cross.nix b/hosts/common/cross.nix index 18c3fe8b0..b3059c6e9 100644 --- a/hosts/common/cross.nix +++ b/hosts/common/cross.nix @@ -1,13 +1,18 @@ # cross compiling -# - for edge-casey things (e.g. `mesonEmulatorHook`, `depsBuildBuild`), see in nixpkgs: -# `git show da9a9a440415b236f22f57ba67a24ab3fb53f595` + +# - for edge-casey things, see in nixpkgs: +# - `git show da9a9a440415b236f22f57ba67a24ab3fb53f595` +# - e.g. `mesonEmulatorHook`, `depsBuildBuild`, `python3.pythonForBuild` +# - +# - e.g. `makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];` # # 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'` +# - qt: `nix build '.#host-pkgs.moby-cross.qt5.qtbase'` +# - qt: `nix build '.#host-pkgs.moby-cross.libsForQt5.phonon'` # most of these can be built in a nixpkgs source root like: # - `nix build '.#pkgsCross.aarch64-multiplatform.xdg-utils'` # @@ -83,69 +88,65 @@ in # adwaita-qt # psqlodbc apacheHttpd_2_4 # `configure: error: Size of "void *" is less than size of "long"` appstream # meson.build:139:0: ERROR: Program 'gperf' not found or not executable - cantarell-fonts # python3.10-skia-pathops colord # (meson) ERROR: An exe_wrapper is needed but was not found. Please define one in cross file and check the command and/or add it to PATH. - dante # "configure: error: error: getaddrinfo() error value count too low" # duplicity # python3.10-s3transfer - emacs # "configure: error: cannot run test program while cross compiling" flatpak # No package 'libxml-2.0' found 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 gmime3 # "checking preferred charset formats for system iconv... cannot run test program while cross compiling" - # gnome-keyring - # gnome-remote-desktop # gnome-tour + # XXX: gnustep members aren't individually overridable, because the "scope" uses `rec` such that members don't see overrides gnustep # gnustep.base: "configure: error: Your compiler does not appear to implement the -fconstant-string-class option needed for support of strings." - gocryptfs # gocryptfs-2.3-go-modules # grpc - gst_all_1 # (gst_all_1.gst-editing-services) `Run-time dependency gst-validate-1.0 found: NO (tried pkgconfig and cmake)` - # gupnp_1_6 # subprojects/gi-docgen/meson.build:10:0: ERROR: python3 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 + # hdf5 # configure: error: cannot run test program while cross compiling # http2 ibus # configure.ac:152: error: possibly undefined macro: AM_PATH_GLIB_2_0 kitty # "FileNotFoundError: [Errno 2] No such file or directory: 'pkg-config'" - iio-sensor-proxy # "./autogen.sh: line 26: gtkdocize: not found" + libchamplain # "failed to produce output path for output 'devdoc'" libgccjit # "../../gcc-9.5.0/gcc/jit/jit-result.c:52:3: error: 'dlclose' was not declared in this scope" libgweather # "Run-time dependency vapigen found: NO (tried pkgconfig)" libjcat # data/tests/meson.build:10:0: ERROR: Program 'gnutls-certtool certtool' not found or not executable - libsForQt5 # qtbase # make: g++: No such file or directory - mod_dnssd # "configure: error: *** Sorry, could not find apxs ***" - networkmanager-iodine # configure.ac:58: error: possibly undefined macro: AM_GLIB_GNU_GETTEXT + # libsForQt5 # qtbase # make: g++: No such file or directory + libtiger # "src/tiger_internal.h:24:10: fatal error: pango/pango.h: No such file or directory" notmuch # "Error: The dependencies of notmuch could not be satisfied" (xapian, gmime, glib, talloc) - obex_data_server # "/nix/store/0wk6nr1mryvylf5g5frckjam7g7p9gpi-bash-5.2-p15/bin/bash: line 2: --prefix=ods_manager: command not found" - openfortivpn # "checking for /proc/net/route... configure: error: cannot check for file existence when cross compiling" - ostree # "configure: error: Need GPGME_PTHREAD version 1.1.8 or later" perlInterpreters # perl5.36.0-Module-Build perl5.36.0-Test-utf8 (see tracking issues ^) - phoc # Program wayland-scanner found: NO phosh # libadwaita-1 not found - phosh-mobile-settings # meson.build:26:0: ERROR: Dependency "phosh-plugins" not found, tried pkgconfig - psqlodbc # "configure: error: odbc_config not found (required for unixODBC build)" # qgnomeplatform # qtbase - qt6 # error in psqlodbc, not fixed by emulating only psqlodbc above for some reason - rapidfuzz-cpp # error: could not find git for clone of catch2-populate - re2 # FAILED: CMakeFiles/test.util - rmlint # "Checking whether the C compiler works... no" + qt5 # qt5.qtx11extras fails, but we can't selectively emulate it + qt6 # "You need to set QT_HOST_PATH to cross compile Qt." sequoia # "/nix/store/q8hg17w47f9xr014g36rdc2gi8fv02qc-clang-aarch64-unknown-linux-gnu-12.0.1-lib/lib/libclang.so.12: cannot open shared object file: No such file or directory"', /build/sequoia-0.27.0-vendor.tar.gz/bindgen/src/lib.rs:1975:31" # splatmoji squeekboard # meson.build:1:0: ERROR: 'rust' compiler binary not defined in cross or native file - tracker-miners # "meson.build:183:0: ERROR: Can not run test applications in this cross environment." twitter-color-emoji # /nix/store/0wk6nr1mryvylf5g5frckjam7g7p9gpi-bash-5.2-p15/bin/bash: line 1: pkg-config: command not found # unar has multiple failures: # - "configure: error: Your compiler does not appear to implement the -fconstant-string-class option needed for support of strings. Please check for a more recent version or consider using --enable-nxconstantstring" # - "/nix/store/0wk6nr1mryvylf5g5frckjam7g7p9gpi-bash-5.2-p15/bin/bash: line 1: ar: command not found" unar visidata # python3.10-psycopg2 python3.10-pandas python3.10-h5py - # vpnc # "/nix/store/0wk6nr1mryvylf5g5frckjam7g7p9gpi-bash-5.2-p15/bin/bash: line 1: perl: command not found" webp-pixbuf-loader # install phase: "Builder called die: Cannot wrap '/nix/store/kpp8qhzdjqgvw73llka5gpnsj0l4jlg8-gdk-pixbuf-aarch64-unknown-linux-gnu-2.42.10/bin/gdk-pixbuf-thumbnailer' because it is not an executable file" # webkitgtk_4_1 # requires nativeBuildInputs = perl.pkgs.FileCopyRecursive => perl5.36.0-Test-utf8 - # 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 ; + # apacheHttpd_2_4 = prev.apacheHttpd_2_4.override { + # # fixes original error + # # new failure mode: "/nix/store/czvaa9y9ch56z53c0b0f5bsjlgh14ra6-apr-aarch64-unknown-linux-gnu-1.7.0-dev/share/build/libtool: line 1890: aarch64-unknown-linux-gnu-ar: command not found" + # inherit (emulated) stdenv; + # }; + + # mod_dnssd = prev.mod_dnssd.override { + # inherit (emulated) stdenv; + # }; + apacheHttpdPackagesFor = apacheHttpd: self: + let + prevHttpdPkgs = prev.apacheHttpdPackagesFor apacheHttpd self; + in prevHttpdPkgs // { + # fixes "configure: error: *** Sorry, could not find apxs ***" + mod_dnssd = prevHttpdPkgs.mod_dnssd.override { + inherit (emulated) stdenv; + }; + }; # apacheHttpdPackagesFor = apacheHttpd: self: # let # prevHttpdPkgs = lib.fix (emulated.apacheHttpdPackagesFor apacheHttpd); @@ -174,66 +175,99 @@ in # configure: error: no acceptable C compiler found in $PATH inherit (emulated) stdenv; }; + browserpass = prev.browserpass.override { + # fixes "qemu-aarch64: Could not open '/lib/ld-linux-aarch64.so.1': No such file or directory" + inherit (emulated) buildGoModule; # buildGoModule holds the stdenv + }; + cantarell-fonts = prev.cantarell-fonts.override { + # fixes error where python3.10-skia-pathops dependency isn't available for the build platform + inherit (emulated) stdenv; + }; cdrtools = prev.cdrtools.override { # "configure: error: installation or configuration problem: C compiler cc not found." inherit (emulated) stdenv; }; + # colord = prev.colord.override { # # doesn't fix: "ld: error adding symbols: file in wrong format" # inherit (emulated) stdenv; # }; - # evince = prev.evince.override { - # # doesn't fix: "ld: error adding symbols: file in wrong format" - # inherit (emulated) stdenv; - # }; + dante = prev.dante.override { + # fixes: "configure: error: error: getaddrinfo() error value count too low" + inherit (emulated) stdenv; + }; + + emacs = prev.emacs.override { + # fixes "configure: error: cannot run test program while cross compiling" + inherit (emulated) stdenv; + }; + # flatpak = prev.flatpak.override { # # doesn't fix: "ld: error adding symbols: file in wrong format" # inherit (emulated) stdenv; # }; + fuzzel = prev.fuzzel.override { # meson.build:100:0: ERROR: Dependency lookup for wayland-scanner with method 'pkgconfig' failed: Pkg-config binary for machine 0 not found. Giving up. inherit (emulated) stdenv; }; + # fwupd-efi = prev.fwupd-efi.override { # # efi/meson.build:33:2: ERROR: Problem encountered: gnu-efi support requested, but headers were not found # inherit (emulated) stdenv; # }; - # 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 ]; - # }); + fwupd = prev.fwupd.overrideAttrs (orig: { + # solves (meson) "Run-time dependency libgcab-1.0 found: NO (tried pkgconfig and cmake)", and others. + buildInputs = orig.buildInputs ++ [ next.gcab next.gnutls ]; + mesonFlags = (lib.remove "-Ddocs=enabled" orig.mesonFlags) ++ [ "-Ddocs=disabled" ]; + outputs = lib.remove "devdoc" orig.outputs; + }); + # fwupd = prev.fwupd.override { + # # solves missing libgcab-1.0; + # # new error: "meson.build:449:4: ERROR: Command "/nix/store/n7xrj3pnrgcr8igx7lfhz8197y67bk7k-python3-aarch64-unknown-linux-gnu-3.10.9-env/bin/python3 po/test-deps" failed with status 1." + # inherit (emulated) stdenv; + # }; + gcr_4 = prev.gcr_4.overrideAttrs (orig: { + # fixes (meson): "ERROR: Program 'gpg2 gpg' not found or not executable" + nativeBuildInputs = orig.nativeBuildInputs ++ [ next.gnupg next.openssh ]; + }); + gthumb = prev.gthumb.overrideAttrs (orig: { + # fixes (meson) "Program 'glib-mkenums mkenums' not found or not executable" + nativeBuildInputs = orig.nativeBuildInputs ++ [ next.glib ]; + }); gmime = prev.gmime.overrideAttrs (orig: { # "checking preferred charset formats for system iconv... cannot run test program while cross compiling" configureFlags = orig.configureFlags ++ [ "ac_cv_have_iconv_detect_h=no" ]; }); + # gmime3 = prev.gmime3.overrideAttrs (orig: { # # "checking preferred charset formats for system iconv... cannot run test program while cross compiling" # # unsolved: "ImportError: /nix/store/c190src4bjkfp7bdgc5sadnmvgzv7kxb-gobject-introspection-aarch64-unknown-linux-gnu-1.74.0/lib/gobject-introspection/giscanner/_giscanner.cpython-310-x86_64-linux-gnu.so: cannot open shared object file: No such file or directory" # configureFlags = orig.configureFlags ++ [ "ac_cv_have_iconv_detect_h=no" ]; # }); - gupnp_1_6 = prev.gupnp_1_6.overrideAttrs (orig: { - # "subprojects/gi-docgen/meson.build:10:0: ERROR: python3 not found" - # this patch is copied from the default gupnp. - # TODO: upstream - outputs = [ "out" "dev" ] - ++ lib.optionals (prev.stdenv.buildPlatform == prev.stdenv.hostPlatform) [ "devdoc" ]; - mesonFlags = [ - "-Dgtk_doc=${lib.boolToString (prev.stdenv.buildPlatform == prev.stdenv.hostPlatform)}" - "-Dintrospection=${lib.boolToString (prev.stdenv.buildPlatform == prev.stdenv.hostPlatform)}" - ]; - }); + # gmime3 = prev.gmime3.override { + # # doesn't fix + # inherit (emulated) stdenv; + # }; gnome = prev.gnome.overrideScope' (self: super: { inherit (emulated.gnome) + dconf-editor # "error: Package `dconf' not found in specified Vala API directories or GObject-Introspection GIR directories" evolution-data-server # "The 'perl' not found, not installing csv2vcard" - gnome-keyring # configure.ac:374: error: possibly undefined macro: AM_PATH_LIBGCRYPT gnome-shell # "meson.build:128:0: ERROR: Program 'gjs' not found or not executable" gnome-settings-daemon # subprojects/gvc/meson.build:30:0: ERROR: Program 'glib-mkenums mkenums' not found or not executable mutter # meson.build:237:2: ERROR: Dependency "gbm" not found, tried pkgconfig (it's provided by mesa) ; + # dconf-editor = super.dconf-editor.override { + # # fails to fix original error + # inherit (emulated) stdenv; + # }; + # dconf-editor = super.dconf-editor.overrideAttrs (orig: { + # # fails to fix original error + # nativeBuildInputs = orig.nativeBuildInputs ++ [ next.dconf ]; + # }); evince = super.evince.overrideAttrs (orig: { # fixes (meson) "Run-time dependency gi-docgen found: NO (tried pkgconfig and cmake)" # inspired by gupnp @@ -251,6 +285,10 @@ in # # doesn't fix "CMake Error: try_run() invoked in cross-compiling mode, please set the following cache variables appropriately" # nativeBuildInputs = orig.nativeBuildInputs ++ [ next.perl ]; # }); + file-roller = super.file-roller.override { + # fixes "src/meson.build:106:0: ERROR: Program 'glib-compile-resources' not found or not executable" + inherit (emulated) stdenv; + }; gnome-color-manager = super.gnome-color-manager.overrideAttrs (orig: { # fixes: "src/meson.build:3:0: ERROR: Program 'glib-compile-resources' not found or not executable" nativeBuildInputs = orig.nativeBuildInputs ++ [ next.glib ]; @@ -262,6 +300,14 @@ in # gnome-control-center = super.gnome-control-center.override { # inherit (next) stdenv; # }; + # gnome-keyring = super.gnome-keyring.override { + # # does not fix original error + # inherit (next) stdenv; + # }; + gnome-keyring = super.gnome-keyring.overrideAttrs (orig: { + # fixes "configure.ac:374: error: possibly undefined macro: AM_PATH_LIBGCRYPT" + nativeBuildInputs = orig.nativeBuildInputs ++ [ next.libgcrypt next.openssh next.glib ]; + }); gnome-remote-desktop = super.gnome-remote-desktop.overrideAttrs (orig: { # TODO: remove gnome-remote-desktop (wanted by gnome-control-center) # fixes: "Program gdbus-codegen found: NO" @@ -288,15 +334,32 @@ in # gnome-shell = super.gnome-shell.override { # inherit (next) stdenv; # }; + # gnome-shell = super.gnome-shell.overrideAttrs (orig: { + # # does not solve original error + # nativeBuildInputs = orig.nativeBuildInputs ++ [ next.mesonEmulatorHook ]; + # }); # gnome-settings-daemon = super.gnome-settings-daemon.overrideAttrs (orig: { # # fixes "subprojects/gvc/meson.build:30:0: ERROR: Program 'glib-mkenums mkenums' not found or not executable" # # new error: "plugins/power/meson.build:22:0: ERROR: Dependency lookup for glib-2.0 with method 'pkgconfig' failed: Pkg-config binary for machine 0 not found. Giving up." # nativeBuildInputs = orig.nativeBuildInputs ++ [ next.glib ]; # }); + # gnome-settings-daemon = super.gnome-settings-daemon.overrideAttrs (orig: { + # # does not fix original error + # nativeBuildInputs = orig.nativeBuildInputs ++ [ next.mesonEmulatorHook ]; + # }); gnome-session = super.gnome-session.overrideAttrs (orig: { # fixes: "gdbus-codegen not found or executable" nativeBuildInputs = orig.nativeBuildInputs ++ [ next.glib ]; }); + # gnome-terminal = super.gnome-terminal.override { + # # fixes: "meson.build:343:0: ERROR: Dependency "libpcre2-8" not found, tried pkgconfig" + # # new failure mode: "/nix/store/grqh2wygy9f9wp5bgvqn4im76v82zmcx-binutils-2.39/bin/ld: /nix/store/f7yr5z123d162p5457jh3wzkqm7x8yah-glib-2.74.3/lib/libglib-2.0.so: error adding symbols: file in wrong format" + # inherit (emulated) stdenv; + # }; + gnome-terminal = super.gnome-terminal.overrideAttrs (orig: { + # fixes "meson.build:343:0: ERROR: Dependency "libpcre2-8" not found, tried pkgconfig" + buildInputs = orig.buildInputs ++ [ next.pcre2 ]; + }); gnome-user-share = super.gnome-user-share.overrideAttrs (orig: { # fixes: meson.build:111:6: ERROR: Program 'glib-compile-schemas' not found or not executable nativeBuildInputs = orig.nativeBuildInputs ++ [ next.glib ]; @@ -305,14 +368,83 @@ in # # DOES NOT FIX: "meson.build:237:2: ERROR: Dependency "gbm" not found, tried pkgconfig (it's provided by mesa)" # inherit (next) stdenv; # }; + # mutter = super.mutter.overrideAttrs (orig: { + # # fixes "meson.build:237:2: ERROR: Dependency "gbm" not found, tried pkgconfig (it's provided by mesa)" + # # new error: "/nix/store/c190src4bjkfp7bdgc5sadnmvgzv7kxb-gobject-introspection-aarch64-unknown-linux-gnu-1.74.0/lib/gobject-introspection/giscanner/_giscanner.cpython-310-x86_64-linux-gnu.so: cannot open shared object file: No such file or directory" + # nativeBuildInputs = orig.nativeBuildInputs ++ [ next.gobject-introspection next.wayland-scanner ]; + # buildInputs = orig.buildInputs ++ [ next.mesa ]; + # # disable docs building + # mesonFlags = lib.remove "-Ddocs=true" orig.mesonFlags; + # }); + # mutter = super.mutter.overrideAttrs (orig: { + # # TODO: something seems to be propagating an *emulated* version of gobject-introspection into the build + # nativeBuildInputs = + # (lib.remove next.python3 + # (lib.remove next.mesa orig.nativeBuildInputs) + # ) + # ++ [ + # next.gobject-introspection + # next.mesonEmulatorHook + # next.python3.pythonForBuild + # next.wayland-scanner + # ]; + # buildInputs = (lib.remove next.gobject-introspection orig.buildInputs) + # ++ [ next.mesa ]; + # # disable docs building + # mesonFlags = lib.remove "-Ddocs=true" orig.mesonFlags; + # }); + # nautilus = super.nautilus.override { + # # fixes: "meson.build:123:0: ERROR: Dependency "libxml-2.0" not found, tried pkgconfig" + # # new failure mode: "/nix/store/grqh2wygy9f9wp5bgvqn4im76v82zmcx-binutils-2.39/bin/ld: /nix/store/f7yr5z123d162p5457jh3wzkqm7x8yah-glib-2.74.3/lib/libglib-2.0.so: error adding symbols: file in wrong format" + # inherit (emulated) stdenv; + # }; + nautilus = super.nautilus.overrideAttrs (orig: { + # fixes: "meson.build:123:0: ERROR: Dependency "libxml-2.0" not found, tried pkgconfig" + buildInputs = orig.buildInputs ++ [ next.libxml2 ]; + }); }); - # gst_all_1.gst-editing-services = emulated.gst_all_1.gst-editing-services; - # gst_all_1 = prev.gst_all_1.overrideScope' (self: super: { - # inherit (emulated.gst_all_1) - # gst-editing-services - # ; - # }); + gocryptfs = prev.gocryptfs.override { + # fixes "error: hash mismatch in fixed-output derivation" (vendorSha256) + inherit (emulated) buildGoModule; # equivalent to stdenv + }; + gupnp_1_6 = prev.gupnp_1_6.overrideAttrs (orig: { + # fixes "subprojects/gi-docgen/meson.build:10:0: ERROR: python3 not found" + # this patch is copied from the default gupnp. + # TODO: upstream + outputs = [ "out" "dev" ] + ++ lib.optionals (prev.stdenv.buildPlatform == prev.stdenv.hostPlatform) [ "devdoc" ]; + mesonFlags = [ + "-Dgtk_doc=${lib.boolToString (prev.stdenv.buildPlatform == prev.stdenv.hostPlatform)}" + "-Dintrospection=${lib.boolToString (prev.stdenv.buildPlatform == prev.stdenv.hostPlatform)}" + ]; + }); + + gst_all_1 = prev.gst_all_1 // { + # gst-editing-services = prev.gst_all_1.gst-editing-services.override { + # # fixes "Run-time dependency gst-validate-1.0 found: NO" + # # new failure mode: "/nix/store/grqh2wygy9f9wp5bgvqn4im76v82zmcx-binutils-2.39/bin/ld: /nix/store/f7yr5z123d162p5457jh3wzkqm7x8yah-glib-2.74.3/lib/libgobject-2.0.so: error adding symbols: file in wrong format" + # inherit (emulated) stdenv; + # }; + # XXX this feels risky; it propagates a (conflicting) gst-plugins to all consumers + # gst-editing-services = emulated.gst_all_1.gst-editing-services; + gst-editing-services = prev.gst_all_1.gst-editing-services.overrideAttrs (orig: { + # fixes "Run-time dependency gst-validate-1.0 found: NO" + buildInputs = orig.buildInputs ++ [ next.gst_all_1.gst-devtools ]; + mesonFlags = orig.mesonFlags ++ [ + # disable "python formatters" to avoid undefined references to Py_Initialize, etc. + "-Dpython=disabled" + ]; + }); + inherit (emulated.gst_all_1) gst-plugins-good; + # gst-plugins-good = prev.gst_all_1.gst-plugins-good.override { + # # when invoked with `qt5Support = true`, qtbase shows up in both buildInputs and nativeBuildInputs + # # if these aren't identical, then qt complains: "Error: detected mismatched Qt dependencies" + # # doesn't fix the original error. + # inherit (emulated) stdenv; + # # qt5Support = true; + # }; + }; # 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 ]; @@ -332,16 +464,49 @@ in # }) # ]; # }); + # gvfs = prev.gvfs.override { + # # solves original config-time problem + # # new failure: "/nix/store/grqh2wygy9f9wp5bgvqn4im76v82zmcx-binutils-2.39/bin/ld: /nix/store/3n0n1s5gb34lkckkr8ix5b7s5hz4n48v-libxml2-2.10.3/lib/libxml2.so: error adding symbols: file in wrong format" + # inherit (emulated) stdenv; + # }; + + hdf5 = prev.hdf5.override { + inherit (emulated) stdenv; + }; # ibus = prev.ibus.override { # # "_giscanner.cpython-310-x86_64-linux-gnu.so: cannot open shared object file: No such file or directory" # inherit (emulated) stdenv; # }; + iio-sensor-proxy = prev.iio-sensor-proxy.overrideAttrs (orig: { + # fixes "./autogen.sh: line 26: gtkdocize: not found" + nativeBuildInputs = orig.nativeBuildInputs ++ [ next.glib next.gtk-doc ]; + }); + + # kitty = prev.kitty.override { + # # does not solve original error + # inherit (emulated) stdenv; + # }; + + # libchamplain = prev.libchamplain.override { + # # fails: "/nix/store/grqh2wygy9f9wp5bgvqn4im76v82zmcx-binutils-2.39/bin/ld: /nix/store/f7yr5z123d162p5457jh3wzkqm7x8yah-glib-2.74.3/lib/libglib-2.0.so: error adding symbols: file in wrong format"; + # inherit (emulated) stdenv; + # }; + # libgweather = prev.libgweather.override { + # # solves original problem + # # new failure mode: "/nix/store/grqh2wygy9f9wp5bgvqn4im76v82zmcx-binutils-2.39/bin/ld: /nix/store/f7yr5z123d162p5457jh3wzkqm7x8yah-glib-2.74.3/lib/libgio-2.0.so: error adding symbols: file in wrong format" + # inherit (emulated) stdenv; + # }; libHX = prev.libHX.overrideAttrs (orig: { # "Can't exec "libtoolize": No such file or directory at /nix/store/r4fvx9hazsm0rdm7s393zd5v665dsh1c-autoconf-2.71/share/autoconf/Autom4te/FileUtils.pm line 294." nativeBuildInputs = orig.nativeBuildInputs ++ [ next.libtool ]; }); + # libjcat = prev.libjcat.override { + # # fixes original error + # # new failure mode: "/nix/store/grqh2wygy9f9wp5bgvqn4im76v82zmcx-binutils-2.39/bin/ld: /nix/store/f7yr5z123d162p5457jh3wzkqm7x8yah-glib-2.74.3/lib/libgio-2.0.so: error adding symbols: file in wrong format" + # inherit (emulated) stdenv; + # }; librest = prev.librest.overrideAttrs (orig: { # fixes "You must have gtk-doc >= 1.13 installed to build documentation" @@ -357,10 +522,26 @@ in "-Dgtk_doc=${lib.boolToString (prev.stdenv.buildPlatform == prev.stdenv.hostPlatform)}" ]; }); - # libsForQt5 = prev.libsForQt5.overrideScope' (self: super: { - # inherit (emulated.libsForQt5) - # qtbase - # ; + libsForQt5 = prev.libsForQt5.overrideScope' (self: super: { + qgpgme = super.qgpgme.overrideAttrs (orig: { + # fix so it can find the MOC compiler + # it looks like it might not *need* to propagate qtbase, but so far unclear + nativeBuildInputs = orig.nativeBuildInputs ++ [ self.qtbase ]; + propagatedBuildInputs = lib.remove self.qtbase orig.propagatedBuildInputs; + }); + phonon = super.phonon.overrideAttrs (orig: { + # fixes "ECM (required version >= 5.60), Extra CMake Modules" + buildInputs = orig.buildInputs ++ [ next.extra-cmake-modules ]; + }); + }); + + # libtiger = prev.libtiger.override { + # # fails to fix: "src/tiger_internal.h:24:10: fatal error: pango/pango.h: No such file or directory" + # inherit (emulated) stdenv; + # }; + # libtiger = prev.libtiger.overrideAttrs (orig: { + # # fails to fix: "src/tiger_internal.h:24:10: fatal error: pango/pango.h: No such file or directory" + # nativeBuildInputs = orig.nativeBuildInputs ++ [ next.libkate next.cairo next.pango ]; # }); libuv = prev.libuv.overrideAttrs (orig: { @@ -376,41 +557,60 @@ in }; networkmanager-fortisslvpn = prev.networkmanager-fortisslvpn.overrideAttrs (orig: { # fixes "gdbus-codegen: command not found" - nativeBuildInputs = orig.nativeBuildInputs ++ [ prev.glib ]; + nativeBuildInputs = orig.nativeBuildInputs ++ [ next.glib ]; }); # networkmanager-iodine = prev.networkmanager-iodine.overrideAttrs (orig: { # # fails to fix "configure.ac:58: error: possibly undefined macro: AM_GLIB_GNU_GETTEXT" - # nativeBuildInputs = orig.nativeBuildInputs ++ [ prev.gettext ]; + # nativeBuildInputs = orig.nativeBuildInputs ++ [ next.gettext ]; # }); + networkmanager-iodine = prev.networkmanager-iodine.override { + # fixes "configure.ac:58: error: possibly undefined macro: AM_GLIB_GNU_GETTEXT" + inherit (emulated) stdenv; + }; networkmanager-l2tp = prev.networkmanager-l2tp.overrideAttrs (orig: { # fixes "gdbus-codegen: command not found" # fixes "gtk4-builder-tool: command not found" - nativeBuildInputs = orig.nativeBuildInputs ++ [ prev.glib prev.gtk4 ]; + nativeBuildInputs = orig.nativeBuildInputs ++ [ next.glib next.gtk4 ]; }); networkmanager-openconnect = prev.networkmanager-openconnect.overrideAttrs (orig: { # fixes "properties/gresource.xml: Permission denied" # - by providing glib-compile-resources - nativeBuildInputs = orig.nativeBuildInputs ++ [ prev.glib ]; + nativeBuildInputs = orig.nativeBuildInputs ++ [ next.glib ]; }); networkmanager-openvpn = prev.networkmanager-openvpn.overrideAttrs (orig: { # fixes "properties/gresource.xml: Permission denied" # - by providing glib-compile-resources - nativeBuildInputs = orig.nativeBuildInputs ++ [ prev.glib ]; + nativeBuildInputs = orig.nativeBuildInputs ++ [ next.glib ]; }); networkmanager-sstp = prev.networkmanager-sstp.overrideAttrs (orig: { # fixes "gdbus-codegen: command not found" - nativeBuildInputs = orig.nativeBuildInputs ++ [ prev.glib ]; + nativeBuildInputs = orig.nativeBuildInputs ++ [ next.glib ]; }); networkmanager-vpnc = prev.networkmanager-vpnc.overrideAttrs (orig: { # fixes "properties/gresource.xml: Permission denied" # - by providing glib-compile-resources - nativeBuildInputs = orig.nativeBuildInputs ++ [ prev.glib ]; + nativeBuildInputs = orig.nativeBuildInputs ++ [ next.glib ]; }); nheko = prev.nheko.overrideAttrs (orig: { # fixes "fatal error: lmdb++.h: No such file or directory buildInputs = orig.buildInputs ++ [ next.lmdbxx ]; }); - + # notmuch = prev.notmuch.override { + # # fails to solve original error + # inherit (emulated) stdenv; + # }; + obex_data_server = prev.obex_data_server.override { + # fixes "/nix/store/0wk6nr1mryvylf5g5frckjam7g7p9gpi-bash-5.2-p15/bin/bash: line 2: --prefix=ods_manager: command not found" + inherit (emulated) stdenv; + }; + openfortivpn = prev.openfortivpn.override { + # fixes "checking for /proc/net/route... configure: error: cannot check for file existence when cross compiling" + inherit (emulated) stdenv; + }; + ostree = prev.ostree.override { + # fixes "configure: error: Need GPGME_PTHREAD version 1.1.8 or later" + inherit (emulated) stdenv; + }; pam_mount = prev.pam_mount.overrideAttrs (orig: { # fixes: "perl: command not found" nativeBuildInputs = orig.nativeBuildInputs ++ [ next.perl ]; @@ -422,10 +622,27 @@ in # ; # }; + phoc = prev.phoc.override { + # fixes "Program wayland-scanner found: NO" + inherit (emulated) stdenv; + }; + # phosh = prev.phosh.override { + # # fixes original error. + # # new failure mode: "/nix/store/grqh2wygy9f9wp5bgvqn4im76v82zmcx-binutils-2.39/bin/ld: /nix/store/2bzd39fbsifidd667s7x930d0b7pm3qx-pango-1.50.12/lib/libpangocairo-1.0.so: error adding symbols: file in wrong format" + # inherit (emulated) stdenv; + # }; + phosh-mobile-settings = prev.phosh-mobile-settings.override { + # fixes "meson.build:26:0: ERROR: Dependency "phosh-plugins" not found, tried pkgconfig" + inherit (emulated) stdenv; + }; 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 ]; + nativeBuildInputs = orig.nativeBuildInputs ++ [ next.glib ]; }); + psqlodbc = prev.psqlodbc.override { + # fixes "configure: error: odbc_config not found (required for unixODBC build)" + inherit (emulated) stdenv; + }; pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [ (py-next: py-prev: { @@ -479,10 +696,47 @@ in "tests/unit/test_compat.py" ]; }); - # skia-pathops + # skia-pathops = ? # it tries to call `cc` during the build, but can't find it. }) ]; + # qt5 = prev.qt5.overrideScope' (self: super: { + # qtbase = super.qtbase.override { + # inherit (emulated) stdenv; + # }; + # qtx11extras = super.qtx11extras.override { + # # "Project ERROR: Cannot run compiler 'g++'"; + # # this fails an assert though, where the cross qt now references the emulated qt. + # inherit (emulated.qt5) qtModule; + # }; + # }); + # qt6 = prev.qt6.overrideScope' (self: super: { + # qtbase = super.qtbase.override { + # # fixes: "You need to set QT_HOST_PATH to cross compile Qt." + # inherit (emulated) stdenv; + # }; + # }); + rapidfuzz-cpp = prev.rapidfuzz-cpp.overrideAttrs (orig: { + # fixes "error: could not find git for clone of catch2-populate" + buildInputs = orig.buildInputs or [] ++ [ next.catch2_3 ]; + }); + re2 = (prev.re2.override { + # fixes: "FAILED: CMakeFiles/test.util" + inherit (emulated) stdenv; + }).overrideAttrs (orig: { + # exhaustive{,1,2}_test times out after 1500s. + # this is after exhaustive3_test takes 600s to pass. + doCheck = false; + }); + rmlint = prev.rmlint.override { + # fixes "Checking whether the C compiler works... no" + inherit (emulated) stdenv; + }; + # sequoia = prev.sequoia.override { + # # fails to fix original error + # inherit (emulated) stdenv; + # }; + # squeekboard = prev.squeekboard.overrideAttrs (orig: { # # fixes: "meson.build:1:0: ERROR: 'rust' compiler binary not defined in cross or native file" # # new error: "meson.build:1:0: ERROR: Rust compiler rustc --target aarch64-unknown-linux-gnu -C linker=aarch64-unknown-linux-gnu-gcc can not compile programs." @@ -496,6 +750,11 @@ in # in # orig.mesonFlags or [] ++ lib.optionals (next.stdenv.hostPlatform != next.stdenv.buildPlatform) [ "--cross-file=${crossFile}" ]; # }); + # squeekboard = prev.squeekboard.override { + # # new error: "gcc: error: unrecognized command line option '-m64'" + # inherit (emulated) stdenv; + # }; + strp = prev.srtp.overrideAttrs (orig: { # roc_driver test times out after 30s doCheck = false; @@ -508,13 +767,41 @@ in # fixes "configure: error: *** gdbus-codegen is required to build tpm2-abrmd; No package 'gio-unix-2.0' found" nativeBuildInputs = orig.nativeBuildInputs ++ [ next.glib ]; }); + tracker-miners = prev.tracker-miners.override { + # fixes "meson.build:183:0: ERROR: Can not run test applications in this cross environment." + inherit (emulated) stdenv; + }; + # twitter-color-emoji = prev.twitter-color-emoji.override { + # # fails to fix original error + # inherit (emulated) stdenv; + # }; # unar = (prev.unar.override { # # fixes "ar: command not found" # # new error: "gcc: error: unrecognized command line option '-fobjc-runtime=gnustep-2.0'" # inherit (emulated) stdenv; # }); + unixODBCDrivers = prev.unixODBCDrivers // { + # TODO: should this package be deduped with toplevel psqlodbc in upstream nixpkgs? + psql = prev.unixODBCDrivers.psql.override { + # fixes "configure: error: odbc_config not found (required for unixODBC build)" + inherit (emulated) stdenv; + }; + # psql = prev.unixODBCDrivers.psql.overrideAttrs (orig: { + # # fixes "configure: error: odbc_config not found (required for unixODBC build)" + # # new error: "/nix/store/h3ms3h95rbj5p8yhxfhbsbnxgvpnb8w0-aarch64-unknown-linux-gnu-binutils-2.39/bin/aarch64-unknown-linux-gnu-ld: /nix/store/6h6z98qvg5k8rsqpivi42r5008zjfp2v-unixODBC-2.3.11/lib/libodbcinst.so: error adding symbols: file in wrong format" + # nativeBuildInputs = orig.nativeBuildInputs or [] ++ orig.buildInputs; + # }); + }; + vlc = prev.vlc.overrideAttrs (orig: { + # fixes: "configure: error: could not find the LUA byte compiler" + # fixes: "configure: error: protoc compiler needed for chromecast was not found" + nativeBuildInputs = orig.nativeBuildInputs ++ [ next.lua5 next.protobuf ]; + # fix that it can't find the c compiler + # makeFlags = orig.makeFlags or [] ++ [ "CC=${prev.stdenv.cc.targetPrefix}cc" ]; + BUILDCC = "${prev.stdenv.cc}/bin/${prev.stdenv.cc.targetPrefix}cc"; + }); vpnc = prev.vpnc.overrideAttrs (orig: { # fixes "perl: command not found" nativeBuildInputs = orig.nativeBuildInputs ++ [ next.perl ]; @@ -528,6 +815,11 @@ in # fixes: "src/meson.build:25:0: ERROR: Program 'gdbus-codegen' not found or not executable" nativeBuildInputs = orig.nativeBuildInputs ++ [ next.gettext next.glib ]; }); + # webp-pixbuf-loader = prev.webp-pixbuf-loader.override { + # # fixes "Builder called die: Cannot wrap '/nix/store/kpp8qhzdjqgvw73llka5gpnsj0l4jlg8-gdk-pixbuf-aarch64-unknown-linux-gnu-2.42.10/bin/gdk-pixbuf-thumbnailer' because it is not an executable file" + # # new failure mode: "/nix/store/grqh2wygy9f9wp5bgvqn4im76v82zmcx-binutils-2.39/bin/ld: /nix/store/2syg6jxk8zi1zkpqvkxkz87x8sl27c6b-gdk-pixbuf-2.42.10/lib/libgdk_pixbuf-2.0.so: error adding symbols: file in wrong format" + # inherit (emulated) stdenv; + # }; }) ]; }; From e69734250e2eb1fa379f54303f2287f0a4f09355 Mon Sep 17 00:00:00 2001 From: Colin Date: Sat, 11 Feb 2023 00:51:20 +0000 Subject: [PATCH 21/67] phosh: disable konsole. it drags in a large closure, especially qt stuff which doesn't cross compile well --- hosts/modules/gui/phosh.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hosts/modules/gui/phosh.nix b/hosts/modules/gui/phosh.nix index 9494a9b5c..3a384b84a 100644 --- a/hosts/modules/gui/phosh.nix +++ b/hosts/modules/gui/phosh.nix @@ -29,7 +29,7 @@ in # TODO: see about removing gnome-bluetooth if the in-built gnome-settings bluetooth manager can work "gnome.gnome-bluetooth" "phosh-mobile-settings" - "plasma5Packages.konsole" # more reliable terminal + # "plasma5Packages.konsole" # more reliable terminal ]; }; } @@ -107,6 +107,7 @@ in }; programs.dconf.packages = [ + # org.kde.konsole.desktop (pkgs.writeTextFile { name = "dconf-phosh-settings"; destination = "/etc/dconf/db/site.d/00_phosh_settings"; @@ -119,7 +120,7 @@ in sleep-inactive-battery-timeout=5400 [sm/puri/phosh] - favorites=['gpodder.desktop', 'nheko.desktop', 'sublime-music.desktop', 'firefox.desktop', 'org.kde.konsole.desktop'] + favorites=['gpodder.desktop', 'nheko.desktop', 'sublime-music.desktop', 'firefox.desktop', 'org.gnome.Terminal.desktop'] ''; }) ]; From 02067db774ab2874f6e5157757ce3bb70da8f8ef Mon Sep 17 00:00:00 2001 From: Colin Date: Sat, 11 Feb 2023 00:51:49 +0000 Subject: [PATCH 22/67] moby: ship the full recommended guiApps again --- hosts/by-name/moby/default.nix | 8 -------- 1 file changed, 8 deletions(-) diff --git a/hosts/by-name/moby/default.nix b/hosts/by-name/moby/default.nix index 93eb82047..9d454f482 100644 --- a/hosts/by-name/moby/default.nix +++ b/hosts/by-name/moby/default.nix @@ -10,14 +10,6 @@ sane.services.wg-home.enable = true; sane.services.wg-home.ip = config.sane.hosts.by-name."moby".wg-home.ip; - # TODO: re-enable once base is cross-compiled - sane.programs.guiApps.enableSuggested = false; - # compile a subset of the larger mobile package set, until we're ready for it. - sane.programs.gpodder-configured.enableFor.user.colin = true; - sane.programs.nheko.enableFor.user.colin = true; - sane.programs.sublime-music-mobile.enableFor.user.colin = true; - sane.programs.vlc.enableFor.user.colin = true; - # cross-compiled documentation is *slow*. # no obvious way to natively compile docs (2022/09/29). # entrypoint is nixos/modules/misc/documentation.nix From 15755a8a71353a3a8e31ea3956318fad5f39e65c Mon Sep 17 00:00:00 2001 From: Colin Date: Tue, 14 Feb 2023 10:19:32 +0000 Subject: [PATCH 23/67] WIP: reduce emulated cross pkgset; aborted x86-x86 cross compilation --- flake.nix | 4 +- hosts/by-name/desko/default.nix | 2 +- hosts/by-name/moby/kernel.nix | 2 +- hosts/common/cross.nix | 186 ++++++++++++++++++++++++++++---- hosts/instantiate.nix | 18 ++-- nixpatches/list.nix | 7 ++ overlays/pins.nix | 47 +++++++- 7 files changed, 233 insertions(+), 33 deletions(-) diff --git a/flake.nix b/flake.nix index 70237789f..073b3817c 100644 --- a/flake.nix +++ b/flake.nix @@ -67,7 +67,9 @@ (nixosSystem { # we use pkgs built for and *by* the target, i.e. emulation, by default. # cross compilation only happens on explicit access to `pkgs.cross` - system = target; + # system = target; + # localSystem = local; + # crossSystem = target; modules = [ (import ./hosts/instantiate.nix { localSystem = local; hostName = name; }) self.nixosModules.default diff --git a/hosts/by-name/desko/default.nix b/hosts/by-name/desko/default.nix index d8bf738ac..31d4530c4 100644 --- a/hosts/by-name/desko/default.nix +++ b/hosts/by-name/desko/default.nix @@ -50,7 +50,7 @@ }; programs.steam = { - enable = true; + # enable = true; # not sure if needed: stole this whole snippet from the wiki remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server diff --git a/hosts/by-name/moby/kernel.nix b/hosts/by-name/moby/kernel.nix index 6ba536776..f9356d285 100644 --- a/hosts/by-name/moby/kernel.nix +++ b/hosts/by-name/moby/kernel.nix @@ -114,7 +114,7 @@ in # - phone rotation sensor is off by 90 degrees # - ambient light sensor causes screen brightness to be shakey # - phosh greeter may not appear after wake from sleep - boot.kernelPackages = pkgs.cross.linuxPackagesFor pkgs.cross.linux-megous; + boot.kernelPackages = pkgs.linuxPackagesFor pkgs.linux-megous; boot.kernelPatches = [ (patchDefconfig (kernelConfig // diff --git a/hosts/common/cross.nix b/hosts/common/cross.nix index b3059c6e9..3489c5ad3 100644 --- a/hosts/common/cross.nix +++ b/hosts/common/cross.nix @@ -15,6 +15,7 @@ # - qt: `nix build '.#host-pkgs.moby-cross.libsForQt5.phonon'` # most of these can be built in a nixpkgs source root like: # - `nix build '.#pkgsCross.aarch64-multiplatform.xdg-utils'` +# - `nix build '.#pkgsCross.gnu64.xdg-utils'` # for x86_64-linux # # tracking issues, PRs: # - libuv tests fail: @@ -23,6 +24,11 @@ # - perl Module Build broken: # - last checked: 2023-02-07 # - opened: 2019-08 +# - ModuleBuild needs access to `Scalar/Utils.pm`, which doesn't *seem* to exist in the cross builds +# - this can be fixed by adding `nativeBuildInputs = [ perl ]` to it +# - alternatively, there's some "stubbing" method mentioned in +# - stubbing documented at bottom: +# # - perl536Packages.Testutf8 fails to cross: # - last checked: 2023-02-07 # - opened: 2022-10 @@ -36,6 +42,37 @@ # also i haven't deployed it yet to make sure this doesn't cause anything funky at runtime though. # """ +# TODO: +# - ??.llvmPackages_14.llvm: "FAIL: LLVM-Unit :: ExecutionEngine/MCJIT/./MCJITTests/MCJITMultipleModuleTest.two_module_global_variables_case (43769 of 46988)" +# - nix log /nix/store/ib2yw6sajnhlmibxkrn7lj7chllbr85h-llvm-14.0.6.drv +# - wanted by clang-11-12-LLVMgold-path, compiler-rt-libc-12.0.1, clang-wrapper-12.0.1 +# - ?..llvmPackages_12.llvm: "FAIL: LLVM-Unit :: ExecutionEngine/MCJIT/./MCJITTests/MCJITTest.return_global (2857 of 42084)" +# - nix log /nix/store/6vydavlxh1gvs0vmrkcx9qp67g3h7kcz-llvm-12.0.1.drv +# - wanted by sequoia, rav1e, rustc-1.66.1 +# - `host-pkgs.desko.stdenv` fails build: +# - #cross-compiling:nixos.org says pkgsCross.gnu64 IS KNOWN TO NOT COMPILE. let this go for now: +# - make a `` (don't specifiy local/targetSystem) and `-cross` target. +# - `desko-cross` will be broken but `desko` can work +# - see +# - disallowedRequisites = [ bootstrapTools.out ]; +# """ +# error: output '/nix/store/w2vgzyvs2jzf7yr6qqqrjbvrqxxmhwy0-stdenv-linux' is not allowed to refer to the following paths: +# /nix/store/2qbgchkjj1hqi1c8raznwml94pkm3k7q-libunistring-1.0 +# /nix/store/4j425ybkjxcdj89352l5gpdl3nmxq4zn-libidn2-2.3.2 +# /nix/store/c35hf8g5b9vksadym9dbjrd6p2y11m8h-glibc-2.35-224 +# /nix/store/qbgfsaviwqi2p6jr7an1g2754sv3xqhn-gcc-11.3.0-lib +# """ +# - rg doesn't reveal any such references in the output though... +# - nor references to bootstrapTools +# - HOWEVER, IT DOES CONTAIN A REFERENCE TO THE PREVIOUS STAGE'S BASH: +# - /nix/store/w2vgzyvs2jzf7yr6qqqrjbvrqxxmhwy0-stdenv-linux/setup +# - export SHELL=/nix/store/qqa28hmysc23yy081d178jfd9a1yk8aw-bash-5.2-p15/bin/bash +# - not clear if that matters? but maybe it reaches bootstrapTools transitively? +# - yeah: that bash specifies the above `glibc` as its loader +# - so we probably can't `inherit` the emulated bash like that. +# - try building `.#host-pkgs.desko.stdenv.shellPackage` or `.#host-pkgs.desko.stdenv.bootstrapTools` +# - `file result/bin/bash` does show that it uses the interpreter for the glibc, above + { config, lib, pkgs, ... }: @@ -55,6 +92,7 @@ let }; mkEmulated = pkgs: import pkgs.path { + # system = pkgs.stdenv.hostPlatform.system; localSystem = pkgs.stdenv.hostPlatform.system; inherit (config.nixpkgs) config; inherit overlays; @@ -69,19 +107,140 @@ in config = { # the configuration of which specific package set `pkgs.cross` refers to happens elsewhere; # here we just define them all. + + nixpkgs.config.perlPackageOverrides = pkgs: (with pkgs; with pkgs.perlPackages; { + # these are the upstream nixpkgs perl modules, but with `nativeBuildInputs = [ perl ]` + # to fix cross compilation errors + ModuleBuild = buildPerlPackage { + pname = "Module-Build"; + version = "0.4231"; + src = fetchurl { + url = "mirror://cpan/authors/id/L/LE/LEONT/Module-Build-0.4231.tar.gz"; + hash = "sha256-fg9MaSwXQMGshOoU1+o9i8eYsvsmwJh3Ip4E9DCytxc="; + }; + # support cross-compilation by removing unnecessary File::Temp version check + # postPatch = lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) '' + # sed -i '/File::Temp/d' Build.PL + # ''; + nativeBuildInputs = [ perl ]; + meta = { + description = "Build and install Perl modules"; + license = with lib.licenses; [ artistic1 gpl1Plus ]; + mainProgram = "config_data"; + }; + }; + FileBaseDir = buildPerlModule { + version = "0.08"; + pname = "File-BaseDir"; + src = fetchurl { + url = "mirror://cpan/authors/id/K/KI/KIMRYAN/File-BaseDir-0.08.tar.gz"; + hash = "sha256-wGX80+LyKudpk3vMlxuR+AKU1QCfrBQL+6g799NTBeM="; + }; + configurePhase = '' + runHook preConfigure + perl Build.PL PREFIX="$out" prefix="$out" + ''; + nativeBuildInputs = [ perl ]; + propagatedBuildInputs = [ IPCSystemSimple ]; + buildInputs = [ FileWhich ]; + meta = { + description = "Use the Freedesktop.org base directory specification"; + license = with lib.licenses; [ artistic1 gpl1Plus ]; + }; + }; + # fixes: "FAILED IPython/terminal/tests/test_debug_magic.py::test_debug_magic_passes_through_generators - pexpect.exceptions.TIMEOUT: Timeout exceeded." + Testutf8 = buildPerlPackage { + pname = "Test-utf8"; + version = "1.02"; + src = fetchurl { + url = "mirror://cpan/authors/id/M/MA/MARKF/Test-utf8-1.02.tar.gz"; + hash = "sha256-34LwnFlAgwslpJ8cgWL6JNNx5gKIDt742aTUv9Zri9c="; + }; + nativeBuildInputs = [ perl ]; + meta = { + description = "Handy utf8 tests"; + homepage = "https://github.com/2shortplanks/Test-utf8/tree"; + license = with lib.licenses; [ artistic1 gpl1Plus ]; + }; + }; + # inherit (pkgs.emulated.perl.pkgs) + # Testutf8 + # ; + }); nixpkgs.overlays = [ (next: prev: { # non-emulated packages build *from* local *for* target. # for large packages like the linux kernel which are expensive to build under emulation, # the config can explicitly pull such packages from `pkgs.cross` to do more efficient cross-compilation. - crossFrom."x86_64-linux" = mkCrossFrom "x86_64-linux" prev; - crossFrom."aarch64-linux" = mkCrossFrom "aarch64-linux" prev; + # crossFrom."x86_64-linux" = mkCrossFrom "x86_64-linux" prev; + # crossFrom."aarch64-linux" = mkCrossFrom "aarch64-linux" prev; emulated = mkEmulated prev; }) + # (next: prev: + # let + # emulated = prev.emulated; + # in { + # # packages which don't "cross compile" from x86_64 -> x86_64 + # inherit (emulated) + # # aws-crt-cpp # "/build/source/include/aws/crt/Optional.h:6:10: fatal error: utility: No such file or directory" + # # # bash # "configure: error: C compiler cannot create executables" + # # boehmgc # "gc_badalc.cc:29:10: fatal error: new: No such file or directory " + # # c-ares # dns-proto.h:11:10: fatal error: memory: No such file or directory + # # db48 # "./db_cxx.h:59:10: fatal error: iostream.h: No such file or directory" + # # # kexec-tools # "configure: error: C compiler cannot create executables" + # # gmp6 # "configure: error: could not find a working compiler" + # # gtest # "/build/source/googletest/src/gtest_main.cc:30:10: fatal error: cstdio: No such file or directory" + # # icu72 # "../common/unicode/localpointer.h:45:10: fatal error: memory: No such file or directory" + # # # libidn2 # "configure: error: C compiler cannot create executables" + # # ncurses # "configure: error: C compiler cannot create executables" + # ; + + # bash = prev.bash.overrideAttrs (orig: { + # # configure doesn't know how to build because it doesn't know where to find crt1.o. + # # some parts of nixpkgs specify the path to it explicitly: + # # - + # # - + # # alternatively, the wrapper gcc (first item on PATH if we look at a failed bash's env-vars) + # # adds these flags automatically. so we can probably just tell `configure` to *not* use any special gcc other than the wrapper. + # # TESTING IN PROGRESS: + # # - N.B.: BUILDCC is a vlc-ism! + # # BUILDCC = "${prev.stdenv.cc}/bin/${prev.stdenv.cc.targetPrefix}cc"; # has illegal requisites + # CC = "${prev.stdenv.cc}/bin/${prev.stdenv.cc.targetPrefix}cc"; # XXX: tested in nixpkgs: FAILS WITH SAME SIGNATURE. env-vars doesn't show our CC though :-( + # # ^ env vars set here are making their way through, but something else (build script?) is overwriting it + # SANE_CC = "${prev.stdenv.cc}/bin/${prev.stdenv.cc.targetPrefix}cc"; + # # CC = "gcc" # bash configure.ac + # # CC_FOR_BUILD = "gcc" # bash configure.ac + # # BUILDCC = "gcc"; # VLC + # }); + # } + # ) + (nativeSelf: nativeSuper: { + pkgsi686Linux = nativeSuper.pkgsi686Linux.extend (i686Self: i686Super: { + # fixes eval-time error: "Unsupported cross architecture" + # it happens even on a x86_64 -> x86_64 build: + # - defining `config.nixpkgs.buildPlatform` to the non-default causes that setting to be inherited by pkgsi686. + # - hence, `pkgsi686` on a non-cross build is ordinarily *emulated*: + # defining a cross build causes it to also be cross (but to the right hostPlatform) + # this has no inputs other than stdenv, and fetchurl, so emulating it is fine. + tbb = nativeSuper.emulated.pkgsi686Linux.tbb; + # tbb = i686Super.tbb.overrideAttrs (orig: (with i686Self; { + # makeFlags = lib.optionals stdenv.cc.isClang [ + # "compiler=clang" + # ] ++ (lib.optional (stdenv.buildPlatform != stdenv.hostPlatform) + # (if stdenv.hostPlatform.isAarch64 then "arch=arm64" + # else if stdenv.hostPlatform.isx86_64 then "arch=intel64" + # else throw "Unsupported cross architecture: ${stdenv.buildPlatform.system} -> ${stdenv.hostPlatform.system}")); + # })); + }); + }) (next: prev: let emulated = prev.emulated; + # emulated = if prev.stdenv.buildPlatform.system == prev.stdenv.hostPlatform.system then + # prev + # else + # prev.emulated; in { # packages which don't cross compile inherit (emulated) @@ -109,7 +268,7 @@ in # libsForQt5 # qtbase # make: g++: No such file or directory libtiger # "src/tiger_internal.h:24:10: fatal error: pango/pango.h: No such file or directory" notmuch # "Error: The dependencies of notmuch could not be satisfied" (xapian, gmime, glib, talloc) - perlInterpreters # perl5.36.0-Module-Build perl5.36.0-Test-utf8 (see tracking issues ^) + # perlInterpreters # perl5.36.0-Module-Build perl5.36.0-Test-utf8 (see tracking issues ^) phosh # libadwaita-1 not found # qgnomeplatform # qtbase @@ -544,13 +703,6 @@ in # nativeBuildInputs = orig.nativeBuildInputs ++ [ next.libkate next.cairo next.pango ]; # }); - 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; - }); - ncftp = prev.ncftp.override { # fixes: "ar: No such file or directory" inherit (emulated) stdenv; @@ -616,12 +768,6 @@ in nativeBuildInputs = orig.nativeBuildInputs ++ [ next.perl ]; }); - # perlPackageOverrides = _perl: { - # inherit (pkgs.emulated.perl.pkgs) - # Testutf8 - # ; - # }; - phoc = prev.phoc.override { # fixes "Program wayland-scanner found: NO" inherit (emulated) stdenv; @@ -668,6 +814,10 @@ in # buildInputs = []; # # HDF5_DIR = "${hdf5}"; # }); + ipython = py-prev.ipython.overridePythonAttrs (orig: { + # fixes "FAILED IPython/terminal/tests/test_debug_magic.py::test_debug_magic_passes_through_generators - pexpect.exceptions.TIMEOUT: Timeout exceeded." + disabledTests = orig.disabledTests ++ [ "test_debug_magic_passes_through_generator" ]; + }); mutatormath = py-prev.mutatormath.overridePythonAttrs (orig: { # TODO: diagnose and upstream nativeBuildInputs = orig.nativeBuildInputs or [] ++ orig.nativeCheckInputs; @@ -755,10 +905,6 @@ in # inherit (emulated) stdenv; # }; - strp = prev.srtp.overrideAttrs (orig: { - # roc_driver test times out after 30s - doCheck = false; - }); sysprof = prev.sysprof.overrideAttrs (orig: { # fixes: "src/meson.build:12:2: ERROR: Program 'gdbus-codegen' not found or not executable" nativeBuildInputs = orig.nativeBuildInputs ++ [ next.glib ]; diff --git a/hosts/instantiate.nix b/hosts/instantiate.nix index cb3e621ef..a0e6242aa 100644 --- a/hosts/instantiate.nix +++ b/hosts/instantiate.nix @@ -15,13 +15,13 @@ networking.hostName = hostName; - nixpkgs.overlays = [ - (next: prev: { - # for local != target we by default just emulate the target while building. - # provide a `pkgs.cross.` alias that consumers can use instead of `pkgs.` - # to explicitly opt into non-emulated cross compilation for any specific package. - # this is most beneficial for large packages with few pre-requisites -- like Linux. - cross = prev.crossFrom."${localSystem}"; - }) - ]; + # nixpkgs.overlays = [ + # (next: prev: { + # # for local != target we by default just emulate the target while building. + # # provide a `pkgs.cross.` alias that consumers can use instead of `pkgs.` + # # to explicitly opt into non-emulated cross compilation for any specific package. + # # this is most beneficial for large packages with few pre-requisites -- like Linux. + # cross = prev.crossFrom."${localSystem}"; + # }) + # ]; } diff --git a/nixpatches/list.nix b/nixpatches/list.nix index cc944a646..151f3639b 100644 --- a/nixpatches/list.nix +++ b/nixpatches/list.nix @@ -21,6 +21,13 @@ # hash = "sha256-PnPzvJymafa+zjkauQW0LzFsJC7S+7D9JRszTE3in+w="; # }) + # (fetchpatch { + # # stdenv: fix cc for pseudo-crosscompilation + # # closed because it breaks pkgsStatic (as of 2023/02/12) + # url = "https://github.com/NixOS/nixpkgs/pull/196497.diff"; + # hash = "sha256-eTwEbVULYjmOW7zUFcTUqvBZqUFjHTKFhvmU2m3XQeo="; + # }) + ./2022-12-19-i2p-aarch64.patch # fix for CMA memory leak in mesa: diff --git a/overlays/pins.nix b/overlays/pins.nix index fc9c2b78a..02664171f 100644 --- a/overlays/pins.nix +++ b/overlays/pins.nix @@ -4,20 +4,65 @@ # - if it's broken by that upstream builder, then pin it: somebody will come along and fix the package. # - otherwise, search github issues/PRs for knowledge of it before pinning. # - if nobody's said anything about it yet, probably want to root cause it or hold off on updating. +# +# note that these pins apply to *all* platforms: +# - natively compiled packages +# - cross compiled packages +# - qemu-emulated packages + (next: prev: { # XXX: when invoked outside our flake (e.g. via NIX_PATH) there is no `next.stable`, # so just forward the unstable packages. inherit (next.stable or prev) ; - # 2023/01/30: one test times out. probably flakey test that only got built because i patched mesa. + ell = prev.ell.overrideAttrs (_upstream: { + # 2023/02/11 + # fixes "TEST FAILED in get_random_return_callback at unit/test-dbus-message-fds.c:278: !l_dbus_message_get_error(message, ((void *)0), ((void *)0))" + # unclear *why* this test fails. + doCheck = false; + }); gjs = prev.gjs.overrideAttrs (_upstream: { + # 2023/01/30: one test times out. probably flakey test that only got built because i patched mesa. + doCheck = false; + }); + gssdp = prev.gssdp.overrideAttrs (orig: { + # 2023/02/11 + # fixes "ERROR:../tests/test-regression.c:429:test_ggo_7: assertion failed (error == NULL): Failed to set multicast interfaceProtocol not available (gssdp-error, 1)" + doCheck = false; + }); + json-glib = prev.json-glib.overrideAttrs (orig: { + # 2023/02/11 + # fixes: "15/15 json-glib:docs / doc-check TIMEOUT 30.52s killed by signal 15 SIGTERM" + doCheck = false; + }); + lapack-reference = prev.lapack-reference.overrideAttrs (_upstream: { + # 2023/02/11: test timeouts + # > The following tests FAILED: + # > 93 - LAPACK-xlintstz_ztest_in (Timeout) + # > 98 - LAPACK-xeigtstz_svd_in (Timeout) + # > 99 - LAPACK-xeigtstz_zec_in (Timeout) doCheck = false; }); libadwaita = prev.libadwaita.overrideAttrs (_upstream: { + # 2023/01/30: one test times out. probably flakey test that only got built because i patched mesa. doCheck = false; }); libsecret = prev.libsecret.overrideAttrs (_upstream: { + # 2023/01/30: one test times out. probably flakey test that only got built because i patched mesa. + doCheck = false; + }); + + libuv = prev.libuv.overrideAttrs (orig: { + # 2023/02/11 + # 2 tests fail: + # - not ok 261 - tcp_bind6_error_addrinuse + # - not ok 267 - tcp_bind_error_addrinuse_listen + doCheck = false; + }); + strp = prev.srtp.overrideAttrs (orig: { + # 2023/02/11 + # roc_driver test times out after 30s doCheck = false; }); }) From ec26f11db4ebf45af1b461adfc3351ded1a8db89 Mon Sep 17 00:00:00 2001 From: Colin Date: Sun, 19 Feb 2023 21:42:27 +0000 Subject: [PATCH 24/67] pins: disable failing python310Packages.pytest-xdist tests --- overlays/pins.nix | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/overlays/pins.nix b/overlays/pins.nix index 02664171f..5d4695992 100644 --- a/overlays/pins.nix +++ b/overlays/pins.nix @@ -26,12 +26,12 @@ # 2023/01/30: one test times out. probably flakey test that only got built because i patched mesa. doCheck = false; }); - gssdp = prev.gssdp.overrideAttrs (orig: { + gssdp = prev.gssdp.overrideAttrs (_upstream: { # 2023/02/11 # fixes "ERROR:../tests/test-regression.c:429:test_ggo_7: assertion failed (error == NULL): Failed to set multicast interfaceProtocol not available (gssdp-error, 1)" doCheck = false; }); - json-glib = prev.json-glib.overrideAttrs (orig: { + json-glib = prev.json-glib.overrideAttrs (_upstream: { # 2023/02/11 # fixes: "15/15 json-glib:docs / doc-check TIMEOUT 30.52s killed by signal 15 SIGTERM" doCheck = false; @@ -52,15 +52,33 @@ # 2023/01/30: one test times out. probably flakey test that only got built because i patched mesa. doCheck = false; }); - - libuv = prev.libuv.overrideAttrs (orig: { + libuv = prev.libuv.overrideAttrs (_upstream: { # 2023/02/11 # 2 tests fail: # - not ok 261 - tcp_bind6_error_addrinuse # - not ok 267 - tcp_bind_error_addrinuse_listen doCheck = false; }); - strp = prev.srtp.overrideAttrs (orig: { + pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [ + (py-next: py-prev: { + pytest-xdist = py-prev.pytest-xdist.overridePythonAttrs (upstream: { + # 2023/02/19 + # 4 tests fail: + # - FAILED: testing/test_remote.py::TestWorkInteractor::* - execnet.gateway_base.TimeoutError: no item after 10.0 seconds + # doCheck = false; + disabledTestPaths = upstream.disabledTestPaths or [] ++ [ + "testing/test_remote.py" + ]; + # disabledTests = upstream.disabledTests or [] ++ [ + # "test_basic_collect_and_runtests" + # "test_remote_collect_fail" + # "test_remote_collect_skip" + # "test_runtests_all" + # ]; + }); + }) + ]; + strp = prev.srtp.overrideAttrs (_upstream: { # 2023/02/11 # roc_driver test times out after 30s doCheck = false; From 976f48268d6b188be70db07088131b7fcbd9cd3e Mon Sep 17 00:00:00 2001 From: Colin Date: Mon, 20 Feb 2023 20:23:32 +0000 Subject: [PATCH 25/67] pins: disable failing python310Packages.ipython tests --- overlays/pins.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/overlays/pins.nix b/overlays/pins.nix index 5d4695992..2d896c25d 100644 --- a/overlays/pins.nix +++ b/overlays/pins.nix @@ -61,6 +61,20 @@ }); pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [ (py-next: py-prev: { + ipython = py-prev.ipython.overridePythonAttrs (upstream: { + # > FAILED IPython/core/tests/test_debugger.py::test_xmode_skip - pexpect.exceptions.TIMEOUT: Timeout exceeded. + # > FAILED IPython/core/tests/test_debugger.py::test_decorator_skip - pexpect.exceptions.TIMEOUT: Timeout exceeded. + # > FAILED IPython/core/tests/test_debugger.py::test_decorator_skip_disabled - pexpect.exceptions.TIMEOUT: Timeout exceeded. + # > FAILED IPython/core/tests/test_debugger.py::test_decorator_skip_with_breakpoint - pexpect.exceptions.TIMEOUT: Timeout exceeded. + # > FAILED IPython/core/tests/test_debugger.py::test_where_erase_value - pexpect.exceptions.TIMEOUT: Timeout exceeded. + # > FAILED IPython/terminal/tests/test_debug_magic.py::test_debug_magic_passes_through_generators - pexpect.exceptions.TIMEOUT: Timeout exceeded. + # > FAILED IPython/terminal/tests/test_embed.py::test_nest_embed - pexpect.exceptions.TIMEOUT: Timeout exceeded. + disabledTestPaths = upstream.disabledTestPaths or [] ++ [ + "IPython/core/tests/test_debugger.py" + "IPython/terminal/tests/test_debug_magic.py" + "IPython/terminal/tests/test_embed.py" + ]; + }); pytest-xdist = py-prev.pytest-xdist.overridePythonAttrs (upstream: { # 2023/02/19 # 4 tests fail: From 33ff993981114f44ae85ed7565aa97b8f2cda774 Mon Sep 17 00:00:00 2001 From: Colin Date: Mon, 20 Feb 2023 20:24:37 +0000 Subject: [PATCH 26/67] cross: compile appstream, colord without emulation --- hosts/common/cross.nix | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/hosts/common/cross.nix b/hosts/common/cross.nix index 3489c5ad3..d93716893 100644 --- a/hosts/common/cross.nix +++ b/hosts/common/cross.nix @@ -246,8 +246,6 @@ in inherit (emulated) # adwaita-qt # psqlodbc apacheHttpd_2_4 # `configure: error: Size of "void *" is less than size of "long"` - appstream # meson.build:139:0: ERROR: Program 'gperf' not found or not executable - colord # (meson) ERROR: An exe_wrapper is needed but was not found. Please define one in cross file and check the command and/or add it to PATH. # duplicity # python3.10-s3transfer flatpak # No package 'libxml-2.0' found fwupd-efi # efi/meson.build:162:0: ERROR: Program or command 'gcc' not found or not executable @@ -325,6 +323,20 @@ in # # does not fix "ERROR: An exe_wrapper is needed but was not found. Please define one in cross file and check the command and/or add it to PATH." # nativeBuildInputs = orig.nativeBuildInputs ++ [ next.gperf ]; # }); + # appstream = prev.appstream.overrideAttrs (upstream: { + # # does not fix "Program 'gperf' not found or not executable" + # nativeBuildInputs = upstream.nativeBuildInputs ++ lib.optionals (!prev.stdenv.buildPlatform.canExecute prev.stdenv.hostPlatform) [ + # next.mesonEmulatorHook + # ]; + # }); + appstream = prev.appstream.overrideAttrs (upstream: { + # fixes "Program 'gperf' not found or not executable" + nativeBuildInputs = upstream.nativeBuildInputs ++ lib.optionals (!prev.stdenv.buildPlatform.canExecute prev.stdenv.hostPlatform) [ + next.mesonEmulatorHook + ] ++ [ + next.gperf + ]; + }); blueman = prev.blueman.overrideAttrs (orig: { # configure: error: ifconfig or ip not found, install net-tools or iproute2 @@ -351,6 +363,12 @@ in # # doesn't fix: "ld: error adding symbols: file in wrong format" # inherit (emulated) stdenv; # }; + colord = prev.colord.overrideAttrs (upstream: { + # fixes: (meson) ERROR: An exe_wrapper is needed but was not found. Please define one in cross file and check the command and/or add it to PATH. + nativeBuildInputs = upstream.nativeBuildInputs ++ lib.optionals (!prev.stdenv.buildPlatform.canExecute prev.stdenv.hostPlatform) [ + next.mesonEmulatorHook + ]; + }); dante = prev.dante.override { # fixes: "configure: error: error: getaddrinfo() error value count too low" From 02df87fc519b4e9748b958a201994b217ce3953f Mon Sep 17 00:00:00 2001 From: Colin Date: Tue, 21 Feb 2023 00:05:37 +0000 Subject: [PATCH 27/67] cross compilation: build `webp-pixbuf-loader` without emulation --- hosts/common/cross.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/hosts/common/cross.nix b/hosts/common/cross.nix index d93716893..826547aa4 100644 --- a/hosts/common/cross.nix +++ b/hosts/common/cross.nix @@ -249,6 +249,7 @@ in # duplicity # python3.10-s3transfer flatpak # No package 'libxml-2.0' found fwupd-efi # efi/meson.build:162:0: ERROR: Program or command 'gcc' not found or not executable + # gdk-pixbuf # cross-compiled version doesn't output bin/gdk-pixbuf-thumbnailer (used by webp-pixbuf-loader gmime3 # "checking preferred charset formats for system iconv... cannot run test program while cross compiling" # gnome-tour # XXX: gnustep members aren't individually overridable, because the "scope" uses `rec` such that members don't see overrides @@ -281,7 +282,6 @@ in # - "/nix/store/0wk6nr1mryvylf5g5frckjam7g7p9gpi-bash-5.2-p15/bin/bash: line 1: ar: command not found" unar visidata # python3.10-psycopg2 python3.10-pandas python3.10-h5py - webp-pixbuf-loader # install phase: "Builder called die: Cannot wrap '/nix/store/kpp8qhzdjqgvw73llka5gpnsj0l4jlg8-gdk-pixbuf-aarch64-unknown-linux-gnu-2.42.10/bin/gdk-pixbuf-thumbnailer' because it is not an executable file" # webkitgtk_4_1 # requires nativeBuildInputs = perl.pkgs.FileCopyRecursive => perl5.36.0-Test-utf8 # xdg-utils # perl5.36.0-File-BaseDir / perl5.36.0-Module-Build ; @@ -984,6 +984,12 @@ in # # new failure mode: "/nix/store/grqh2wygy9f9wp5bgvqn4im76v82zmcx-binutils-2.39/bin/ld: /nix/store/2syg6jxk8zi1zkpqvkxkz87x8sl27c6b-gdk-pixbuf-2.42.10/lib/libgdk_pixbuf-2.0.so: error adding symbols: file in wrong format" # inherit (emulated) stdenv; # }; + webp-pixbuf-loader = prev.webp-pixbuf-loader.overrideAttrs (upstream: { + # fixes: "Builder called die: Cannot wrap '/nix/store/kpp8qhzdjqgvw73llka5gpnsj0l4jlg8-gdk-pixbuf-aarch64-unknown-linux-gnu-2.42.10/bin/gdk-pixbuf-thumbnailer' because it is not an executable file" + # gdk-pixbuf doesn't create a `bin/` directory when cross-compiling, breaks some thumbnailing stuff. + # see `librsvg` for a more bullet-proof cross-compilation approach + postInstall = ""; + }); }) ]; }; From f4a1ede7d43967295d274a40e39de33d52197b0e Mon Sep 17 00:00:00 2001 From: Colin Date: Tue, 21 Feb 2023 12:19:49 +0000 Subject: [PATCH 28/67] cross compilation: fix `unar` --- hosts/common/cross.nix | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/hosts/common/cross.nix b/hosts/common/cross.nix index 826547aa4..cd2b59e87 100644 --- a/hosts/common/cross.nix +++ b/hosts/common/cross.nix @@ -277,10 +277,6 @@ in # splatmoji squeekboard # meson.build:1:0: ERROR: 'rust' compiler binary not defined in cross or native file twitter-color-emoji # /nix/store/0wk6nr1mryvylf5g5frckjam7g7p9gpi-bash-5.2-p15/bin/bash: line 1: pkg-config: command not found - # unar has multiple failures: - # - "configure: error: Your compiler does not appear to implement the -fconstant-string-class option needed for support of strings. Please check for a more recent version or consider using --enable-nxconstantstring" - # - "/nix/store/0wk6nr1mryvylf5g5frckjam7g7p9gpi-bash-5.2-p15/bin/bash: line 1: ar: command not found" - unar visidata # python3.10-psycopg2 python3.10-pandas python3.10-h5py # webkitgtk_4_1 # requires nativeBuildInputs = perl.pkgs.FileCopyRecursive => perl5.36.0-Test-utf8 # xdg-utils # perl5.36.0-File-BaseDir / perl5.36.0-Module-Build @@ -940,11 +936,11 @@ in # inherit (emulated) stdenv; # }; - # unar = (prev.unar.override { - # # fixes "ar: command not found" - # # new error: "gcc: error: unrecognized command line option '-fobjc-runtime=gnustep-2.0'" - # inherit (emulated) stdenv; - # }); + unar = prev.unar.overrideAttrs (upstream: { + # fixes: "ar: command not found" + # `ar` is provided by bintools + nativeBuildInputs = upstream.nativeBuildInputs ++ [ next.bintools ]; + }); unixODBCDrivers = prev.unixODBCDrivers // { # TODO: should this package be deduped with toplevel psqlodbc in upstream nixpkgs? psql = prev.unixODBCDrivers.psql.override { From 415a2e1a677b220686e3a574b9b0d6c67d51ed31 Mon Sep 17 00:00:00 2001 From: Colin Date: Wed, 22 Feb 2023 01:41:56 +0000 Subject: [PATCH 29/67] cross compilation: fix libchamplain --- hosts/common/cross.nix | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/hosts/common/cross.nix b/hosts/common/cross.nix index cd2b59e87..737899d91 100644 --- a/hosts/common/cross.nix +++ b/hosts/common/cross.nix @@ -260,7 +260,6 @@ in # http2 ibus # configure.ac:152: error: possibly undefined macro: AM_PATH_GLIB_2_0 kitty # "FileNotFoundError: [Errno 2] No such file or directory: 'pkg-config'" - libchamplain # "failed to produce output path for output 'devdoc'" libgccjit # "../../gcc-9.5.0/gcc/jit/jit-result.c:52:3: error: 'dlclose' was not declared in this scope" libgweather # "Run-time dependency vapigen found: NO (tried pkgconfig)" libjcat # data/tests/meson.build:10:0: ERROR: Program 'gnutls-certtool certtool' not found or not executable @@ -662,10 +661,10 @@ in # inherit (emulated) stdenv; # }; - # libchamplain = prev.libchamplain.override { - # # fails: "/nix/store/grqh2wygy9f9wp5bgvqn4im76v82zmcx-binutils-2.39/bin/ld: /nix/store/f7yr5z123d162p5457jh3wzkqm7x8yah-glib-2.74.3/lib/libglib-2.0.so: error adding symbols: file in wrong format"; - # inherit (emulated) stdenv; - # }; + libchamplain = prev.libchamplain.overrideAttrs (upstream: { + # fixes: "failed to produce output path for output 'devdoc'" + outputs = lib.remove "devdoc" upstream.outputs; + }); # libgweather = prev.libgweather.override { # # solves original problem # # new failure mode: "/nix/store/grqh2wygy9f9wp5bgvqn4im76v82zmcx-binutils-2.39/bin/ld: /nix/store/f7yr5z123d162p5457jh3wzkqm7x8yah-glib-2.74.3/lib/libgio-2.0.so: error adding symbols: file in wrong format" From 8ddfa91125321bb8f290f33a6bff0f0a111678df Mon Sep 17 00:00:00 2001 From: Colin Date: Wed, 22 Feb 2023 06:02:05 +0000 Subject: [PATCH 30/67] cross: remove emulation for libjcat, libgweather --- hosts/common/cross.nix | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/hosts/common/cross.nix b/hosts/common/cross.nix index 737899d91..c8e2900af 100644 --- a/hosts/common/cross.nix +++ b/hosts/common/cross.nix @@ -261,8 +261,6 @@ in ibus # configure.ac:152: error: possibly undefined macro: AM_PATH_GLIB_2_0 kitty # "FileNotFoundError: [Errno 2] No such file or directory: 'pkg-config'" libgccjit # "../../gcc-9.5.0/gcc/jit/jit-result.c:52:3: error: 'dlclose' was not declared in this scope" - libgweather # "Run-time dependency vapigen found: NO (tried pkgconfig)" - libjcat # data/tests/meson.build:10:0: ERROR: Program 'gnutls-certtool certtool' not found or not executable # libsForQt5 # qtbase # make: g++: No such file or directory libtiger # "src/tiger_internal.h:24:10: fatal error: pango/pango.h: No such file or directory" notmuch # "Error: The dependencies of notmuch could not be satisfied" (xapian, gmime, glib, talloc) @@ -665,20 +663,34 @@ in # fixes: "failed to produce output path for output 'devdoc'" outputs = lib.remove "devdoc" upstream.outputs; }); - # libgweather = prev.libgweather.override { - # # solves original problem - # # new failure mode: "/nix/store/grqh2wygy9f9wp5bgvqn4im76v82zmcx-binutils-2.39/bin/ld: /nix/store/f7yr5z123d162p5457jh3wzkqm7x8yah-glib-2.74.3/lib/libgio-2.0.so: error adding symbols: file in wrong format" - # inherit (emulated) stdenv; - # }; + libgweather = prev.libgweather.overrideAttrs (upstream: { + # fixes: "Run-time dependency vapigen found: NO (tried pkgconfig)" + mesonFlags = + ( + lib.remove "-Denable_vala=true" + (lib.remove "-Dgtk_doc=true" upstream.mesonFlags) + ) ++ [ + "-Dintrospection=false" + "-Denable_vala=false" + "-Dgtk_doc=false" + ]; + outputs = lib.remove "devdoc" upstream.outputs; + nativeBuildInputs = (lib.remove next.gobject-introspection upstream.nativeBuildInputs) ++ [ + next.glib + ]; + }); libHX = prev.libHX.overrideAttrs (orig: { # "Can't exec "libtoolize": No such file or directory at /nix/store/r4fvx9hazsm0rdm7s393zd5v665dsh1c-autoconf-2.71/share/autoconf/Autom4te/FileUtils.pm line 294." nativeBuildInputs = orig.nativeBuildInputs ++ [ next.libtool ]; }); - # libjcat = prev.libjcat.override { - # # fixes original error - # # new failure mode: "/nix/store/grqh2wygy9f9wp5bgvqn4im76v82zmcx-binutils-2.39/bin/ld: /nix/store/f7yr5z123d162p5457jh3wzkqm7x8yah-glib-2.74.3/lib/libgio-2.0.so: error adding symbols: file in wrong format" - # inherit (emulated) stdenv; - # }; + libjcat = prev.libjcat.overrideAttrs (upstream: { + # fixes: "ERROR: Program 'gnutls-certtool certtool' not found or not executable" + # N.B.: gnutls library is used by the compiled program (i.e. the host); + # gnutls binaries are used by the build machine. + # therefore gnutls can be specified in both buildInputs and nativeBuildInputs + nativeBuildInputs = upstream.nativeBuildInputs ++ [ next.gnutls ]; + # buildInputs = lib.remove next.gnutls upstream.buildInputs; + }); librest = prev.librest.overrideAttrs (orig: { # fixes "You must have gtk-doc >= 1.13 installed to build documentation" From 03d7cf65a43488d1a9d5055bac6634242c7dae85 Mon Sep 17 00:00:00 2001 From: Colin Date: Wed, 22 Feb 2023 06:03:14 +0000 Subject: [PATCH 31/67] cross compilation: remove emulation from ncftp --- hosts/common/cross.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/hosts/common/cross.nix b/hosts/common/cross.nix index c8e2900af..d4d14460c 100644 --- a/hosts/common/cross.nix +++ b/hosts/common/cross.nix @@ -728,10 +728,11 @@ in # nativeBuildInputs = orig.nativeBuildInputs ++ [ next.libkate next.cairo next.pango ]; # }); - ncftp = prev.ncftp.override { - # fixes: "ar: No such file or directory" - inherit (emulated) stdenv; - }; + ncftp = prev.ncftp.overrideAttrs (upstream: { + # fixes: "ar: command not found" + # `ar` is provided by bintools + nativeBuildInputs = upstream.nativeBuildInputs or [] ++ [ next.bintools ]; + }); networkmanager-fortisslvpn = prev.networkmanager-fortisslvpn.overrideAttrs (orig: { # fixes "gdbus-codegen: command not found" nativeBuildInputs = orig.nativeBuildInputs ++ [ next.glib ]; From c8a8fe73caa1cf232a3861472506ec99a78319da Mon Sep 17 00:00:00 2001 From: Colin Date: Wed, 22 Feb 2023 06:47:31 +0000 Subject: [PATCH 32/67] cross compilation: fix `libvisual` build --- hosts/common/cross.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/hosts/common/cross.nix b/hosts/common/cross.nix index d4d14460c..aeddf0bed 100644 --- a/hosts/common/cross.nix +++ b/hosts/common/cross.nix @@ -728,6 +728,14 @@ in # nativeBuildInputs = orig.nativeBuildInputs ++ [ next.libkate next.cairo next.pango ]; # }); + libvisual = prev.libvisual.overrideAttrs (upstream: { + # fixes: "configure: error: *** sdl-config not found." + # 2023/02/21: TODO: update nixpkgs to remove this override. + # - it's fixed by 11b095e8805aa123a4d77a5e706bebaf86622879 + buildInputs = [ next.glib ]; + configureFlags = [ "--disable-examples" ]; + }); + ncftp = prev.ncftp.overrideAttrs (upstream: { # fixes: "ar: command not found" # `ar` is provided by bintools From f8ab8b290ebbf8ce1be6fa7ee3dd9ccd1b5543c8 Mon Sep 17 00:00:00 2001 From: Colin Date: Wed, 22 Feb 2023 09:03:15 +0000 Subject: [PATCH 33/67] cross compilation: don't emulate `file-roller` --- hosts/common/cross.nix | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/hosts/common/cross.nix b/hosts/common/cross.nix index aeddf0bed..841373829 100644 --- a/hosts/common/cross.nix +++ b/hosts/common/cross.nix @@ -455,10 +455,14 @@ in # # doesn't fix "CMake Error: try_run() invoked in cross-compiling mode, please set the following cache variables appropriately" # nativeBuildInputs = orig.nativeBuildInputs ++ [ next.perl ]; # }); - file-roller = super.file-roller.override { - # fixes "src/meson.build:106:0: ERROR: Program 'glib-compile-resources' not found or not executable" - inherit (emulated) stdenv; - }; + # file-roller = super.file-roller.override { + # # fixes "src/meson.build:106:0: ERROR: Program 'glib-compile-resources' not found or not executable" + # inherit (emulated) stdenv; + # }; + file-roller = super.file-roller.overrideAttrs (orig: { + # fixes: "src/meson.build:106:0: ERROR: Program 'glib-compile-resources' not found or not executable" + nativeBuildInputs = orig.nativeBuildInputs ++ [ next.glib ]; + }); gnome-color-manager = super.gnome-color-manager.overrideAttrs (orig: { # fixes: "src/meson.build:3:0: ERROR: Program 'glib-compile-resources' not found or not executable" nativeBuildInputs = orig.nativeBuildInputs ++ [ next.glib ]; From b77bde5417ac35cfa30c5f3f50a2f4d07ae90964 Mon Sep 17 00:00:00 2001 From: Colin Date: Thu, 23 Feb 2023 08:17:50 +0000 Subject: [PATCH 34/67] cross compilation: fix gnome-settings-daemon (by disabling the power plugin) --- hosts/common/cross.nix | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/hosts/common/cross.nix b/hosts/common/cross.nix index 841373829..457f06204 100644 --- a/hosts/common/cross.nix +++ b/hosts/common/cross.nix @@ -427,7 +427,6 @@ in dconf-editor # "error: Package `dconf' not found in specified Vala API directories or GObject-Introspection GIR directories" evolution-data-server # "The 'perl' not found, not installing csv2vcard" gnome-shell # "meson.build:128:0: ERROR: Program 'gjs' not found or not executable" - gnome-settings-daemon # subprojects/gvc/meson.build:30:0: ERROR: Program 'glib-mkenums mkenums' not found or not executable mutter # meson.build:237:2: ERROR: Dependency "gbm" not found, tried pkgconfig (it's provided by mesa) ; # dconf-editor = super.dconf-editor.override { @@ -513,14 +512,21 @@ in # nativeBuildInputs = orig.nativeBuildInputs ++ [ next.mesonEmulatorHook ]; # }); # gnome-settings-daemon = super.gnome-settings-daemon.overrideAttrs (orig: { - # # fixes "subprojects/gvc/meson.build:30:0: ERROR: Program 'glib-mkenums mkenums' not found or not executable" - # # new error: "plugins/power/meson.build:22:0: ERROR: Dependency lookup for glib-2.0 with method 'pkgconfig' failed: Pkg-config binary for machine 0 not found. Giving up." - # nativeBuildInputs = orig.nativeBuildInputs ++ [ next.glib ]; - # }); - # gnome-settings-daemon = super.gnome-settings-daemon.overrideAttrs (orig: { # # does not fix original error # nativeBuildInputs = orig.nativeBuildInputs ++ [ next.mesonEmulatorHook ]; # }); + gnome-settings-daemon = super.gnome-settings-daemon.overrideAttrs (orig: { + # glib solves: "Program 'glib-mkenums mkenums' not found or not executable" + nativeBuildInputs = orig.nativeBuildInputs ++ [ next.glib ]; + # pkg-config solves: "plugins/power/meson.build:22:0: ERROR: Dependency lookup for glib-2.0 with method 'pkgconfig' failed: Pkg-config binary for machine 0 not found." + # stdenv.cc fixes: "plugins/power/meson.build:60:0: ERROR: No build machine compiler for 'plugins/power/gsd-power-enums-update.c'" + # but then it fails with a link-time error. + # depsBuildBuild = orig.depsBuildBuild or [] ++ [ next.glib next.pkg-config next.buildPackages.stdenv.cc ]; + # hack to just not build the power plugin (panel?), to avoid cross compilation errors + postPatch = orig.postPatch + '' + sed -i "s/disabled_plugins = \[\]/disabled_plugins = ['power']/" plugins/meson.build + ''; + }); gnome-session = super.gnome-session.overrideAttrs (orig: { # fixes: "gdbus-codegen not found or executable" nativeBuildInputs = orig.nativeBuildInputs ++ [ next.glib ]; From 9477160a2d5d99347e8f964e1d71b6259be847c0 Mon Sep 17 00:00:00 2001 From: Colin Date: Thu, 23 Feb 2023 08:35:59 +0000 Subject: [PATCH 35/67] cross compilation: build gnome.mutter w/o emulation --- hosts/common/cross.nix | 40 ++++++++++------------------------------ 1 file changed, 10 insertions(+), 30 deletions(-) diff --git a/hosts/common/cross.nix b/hosts/common/cross.nix index 457f06204..f6479e91e 100644 --- a/hosts/common/cross.nix +++ b/hosts/common/cross.nix @@ -427,7 +427,6 @@ in dconf-editor # "error: Package `dconf' not found in specified Vala API directories or GObject-Introspection GIR directories" evolution-data-server # "The 'perl' not found, not installing csv2vcard" gnome-shell # "meson.build:128:0: ERROR: Program 'gjs' not found or not executable" - mutter # meson.build:237:2: ERROR: Dependency "gbm" not found, tried pkgconfig (it's provided by mesa) ; # dconf-editor = super.dconf-editor.override { # # fails to fix original error @@ -544,35 +543,16 @@ in # fixes: meson.build:111:6: ERROR: Program 'glib-compile-schemas' not found or not executable nativeBuildInputs = orig.nativeBuildInputs ++ [ next.glib ]; }); - # mutter = super.mutter.override { - # # DOES NOT FIX: "meson.build:237:2: ERROR: Dependency "gbm" not found, tried pkgconfig (it's provided by mesa)" - # inherit (next) stdenv; - # }; - # mutter = super.mutter.overrideAttrs (orig: { - # # fixes "meson.build:237:2: ERROR: Dependency "gbm" not found, tried pkgconfig (it's provided by mesa)" - # # new error: "/nix/store/c190src4bjkfp7bdgc5sadnmvgzv7kxb-gobject-introspection-aarch64-unknown-linux-gnu-1.74.0/lib/gobject-introspection/giscanner/_giscanner.cpython-310-x86_64-linux-gnu.so: cannot open shared object file: No such file or directory" - # nativeBuildInputs = orig.nativeBuildInputs ++ [ next.gobject-introspection next.wayland-scanner ]; - # buildInputs = orig.buildInputs ++ [ next.mesa ]; - # # disable docs building - # mesonFlags = lib.remove "-Ddocs=true" orig.mesonFlags; - # }); - # mutter = super.mutter.overrideAttrs (orig: { - # # TODO: something seems to be propagating an *emulated* version of gobject-introspection into the build - # nativeBuildInputs = - # (lib.remove next.python3 - # (lib.remove next.mesa orig.nativeBuildInputs) - # ) - # ++ [ - # next.gobject-introspection - # next.mesonEmulatorHook - # next.python3.pythonForBuild - # next.wayland-scanner - # ]; - # buildInputs = (lib.remove next.gobject-introspection orig.buildInputs) - # ++ [ next.mesa ]; - # # disable docs building - # mesonFlags = lib.remove "-Ddocs=true" orig.mesonFlags; - # }); + mutter = super.mutter.overrideAttrs (orig: { + # buildInputs += [next.mesa] fixes "meson.build:237:2: ERROR: Dependency "gbm" not found, tried pkgconfig" + # buildInputs += [next.glib] fixes "clutter/clutter/meson.build:281:0: ERROR: Program 'glib-mkenums mkenums' not found or not executable" + # introspection=false and remove docs=true fixes gobject-introspection/_giscanner import error + nativeBuildInputs = orig.nativeBuildInputs ++ [ next.glib next.wayland-scanner ]; + buildInputs = orig.buildInputs ++ [ next.mesa ]; + mesonFlags = (lib.remove "-Ddocs=true" orig.mesonFlags) + ++ [ "-Dintrospection=false" ]; + outputs = lib.remove "devdoc" orig.outputs; + }); # nautilus = super.nautilus.override { # # fixes: "meson.build:123:0: ERROR: Dependency "libxml-2.0" not found, tried pkgconfig" # # new failure mode: "/nix/store/grqh2wygy9f9wp5bgvqn4im76v82zmcx-binutils-2.39/bin/ld: /nix/store/f7yr5z123d162p5457jh3wzkqm7x8yah-glib-2.74.3/lib/libglib-2.0.so: error adding symbols: file in wrong format" From 0da3edfa52e43415d10a821ee73b1eca597837a6 Mon Sep 17 00:00:00 2001 From: Colin Date: Thu, 23 Feb 2023 12:11:33 +0000 Subject: [PATCH 36/67] cross compilation: don't emulate fuzzel stdenv --- hosts/common/cross.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hosts/common/cross.nix b/hosts/common/cross.nix index f6479e91e..4b06664e7 100644 --- a/hosts/common/cross.nix +++ b/hosts/common/cross.nix @@ -378,10 +378,10 @@ in # inherit (emulated) stdenv; # }; - fuzzel = prev.fuzzel.override { - # meson.build:100:0: ERROR: Dependency lookup for wayland-scanner with method 'pkgconfig' failed: Pkg-config binary for machine 0 not found. Giving up. - inherit (emulated) stdenv; - }; + fuzzel = prev.fuzzel.overrideAttrs (upstream: { + # fixes: "meson.build:100:0: ERROR: Dependency lookup for wayland-scanner with method 'pkgconfig' failed: Pkg-config binary for machine 0 not found. Giving up." + depsBuildBuild = upstream.depsBuildBuild or [] ++ [ next.pkg-config ]; + }); # fwupd-efi = prev.fwupd-efi.override { # # efi/meson.build:33:2: ERROR: Problem encountered: gnu-efi support requested, but headers were not found From cb20b4a56bec38419b79da59a31ed679c8e2ef22 Mon Sep 17 00:00:00 2001 From: Colin Date: Thu, 23 Feb 2023 12:12:10 +0000 Subject: [PATCH 37/67] cross compilation: gupnp, tracker: disable tests (flakiness) --- overlays/pins.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/overlays/pins.nix b/overlays/pins.nix index 2d896c25d..d7fd3efee 100644 --- a/overlays/pins.nix +++ b/overlays/pins.nix @@ -31,6 +31,11 @@ # fixes "ERROR:../tests/test-regression.c:429:test_ggo_7: assertion failed (error == NULL): Failed to set multicast interfaceProtocol not available (gssdp-error, 1)" doCheck = false; }); + gupnp = prev.gupnp.overrideAttrs (_upstream: { + # 2023/02/22 + # fixes "Bail out! ERROR:../tests/test-bugs.c:205:test_bgo_696762: assertion failed (error == NULL): Failed to set multicast interfaceProtocol not available (gssdp-erro>" + doCheck = false; + }); json-glib = prev.json-glib.overrideAttrs (_upstream: { # 2023/02/11 # fixes: "15/15 json-glib:docs / doc-check TIMEOUT 30.52s killed by signal 15 SIGTERM" @@ -97,4 +102,9 @@ # roc_driver test times out after 30s doCheck = false; }); + tracker = prev.tracker.overrideAttrs (_upstream: { + # 2023/02/22 + # "27/37 tracker:core / service TIMEOUT 60.37s killed by signal 15 SIGTERM" + doCheck = false; + }); }) From 07d3f60f2642fe21ded90ba80803548f0543c4c4 Mon Sep 17 00:00:00 2001 From: Colin Date: Fri, 24 Feb 2023 10:31:35 +0000 Subject: [PATCH 38/67] cross compilation: don't emulate flatpak --- hosts/common/cross.nix | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/hosts/common/cross.nix b/hosts/common/cross.nix index 4b06664e7..98099f683 100644 --- a/hosts/common/cross.nix +++ b/hosts/common/cross.nix @@ -247,7 +247,6 @@ in # adwaita-qt # psqlodbc apacheHttpd_2_4 # `configure: error: Size of "void *" is less than size of "long"` # duplicity # python3.10-s3transfer - flatpak # No package 'libxml-2.0' found fwupd-efi # efi/meson.build:162:0: ERROR: Program or command 'gcc' not found or not executable # gdk-pixbuf # cross-compiled version doesn't output bin/gdk-pixbuf-thumbnailer (used by webp-pixbuf-loader gmime3 # "checking preferred charset formats for system iconv... cannot run test program while cross compiling" @@ -373,10 +372,14 @@ in inherit (emulated) stdenv; }; - # flatpak = prev.flatpak.override { - # # doesn't fix: "ld: error adding symbols: file in wrong format" - # inherit (emulated) stdenv; - # }; + flatpak = prev.flatpak.overrideAttrs (upstream: { + # fixes "No package 'libxml-2.0' found" + buildInputs = upstream.buildInputs ++ [ next.libxml2 ]; + configureFlags = upstream.configureFlags ++ [ + "--enable-selinux-module=no" # fixes "checking for /usr/share/selinux/devel/Makefile... configure: error: cannot check for file existence when cross compiling" + "--disable-gtk-doc" # fixes "You must have gtk-doc >= 1.20 installed to build documentation for Flatpak" + ]; + }); fuzzel = prev.fuzzel.overrideAttrs (upstream: { # fixes: "meson.build:100:0: ERROR: Dependency lookup for wayland-scanner with method 'pkgconfig' failed: Pkg-config binary for machine 0 not found. Giving up." From 652e4ca93b3654ac40164200846c3905350f209c Mon Sep 17 00:00:00 2001 From: Colin Date: Fri, 24 Feb 2023 10:50:00 +0000 Subject: [PATCH 39/67] cross compilation: remove emulation for gvfs (also: meaningless hdf5 changes) --- hosts/common/cross.nix | 38 +++++++++++--------------------------- 1 file changed, 11 insertions(+), 27 deletions(-) diff --git a/hosts/common/cross.nix b/hosts/common/cross.nix index 98099f683..c2de41ef4 100644 --- a/hosts/common/cross.nix +++ b/hosts/common/cross.nix @@ -254,7 +254,7 @@ in # XXX: gnustep members aren't individually overridable, because the "scope" uses `rec` such that members don't see overrides gnustep # gnustep.base: "configure: error: Your compiler does not appear to implement the -fconstant-string-class option needed for support of strings." # grpc - gvfs # meson.build:312:2: ERROR: Assert failed: http required but libxml-2.0 not found + # nixpkgs hdf5 is at commit 3e847e003632bdd5fdc189ccbffe25ad2661e16f # hdf5 # configure: error: cannot run test program while cross compiling # http2 ibus # configure.ac:152: error: possibly undefined macro: AM_PATH_GLIB_2_0 @@ -608,35 +608,19 @@ in # # qt5Support = true; # }; }; - # 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; - # }) - # ]; - # }); - # gvfs = prev.gvfs.override { - # # solves original config-time problem - # # new failure: "/nix/store/grqh2wygy9f9wp5bgvqn4im76v82zmcx-binutils-2.39/bin/ld: /nix/store/3n0n1s5gb34lkckkr8ix5b7s5hz4n48v-libxml2-2.10.3/lib/libxml2.so: error adding symbols: file in wrong format" + gvfs = prev.gvfs.overrideAttrs (upstream: { + nativeBuildInputs = upstream.nativeBuildInputs ++ [ + next.openssh + next.glib # fixes "gdbus-codegen: command not found" + ]; + # fixes "meson.build:312:2: ERROR: Assert failed: http required but libxml-2.0 not found" + buildInputs = upstream.buildInputs ++ [ next.libxml2 ]; + }); + + # hdf5 = prev.hdf5.override { # inherit (emulated) stdenv; # }; - hdf5 = prev.hdf5.override { - inherit (emulated) stdenv; - }; - # ibus = prev.ibus.override { # # "_giscanner.cpython-310-x86_64-linux-gnu.so: cannot open shared object file: No such file or directory" # inherit (emulated) stdenv; From c92e67bda1341a9ca6971e641ad33566aab93d32 Mon Sep 17 00:00:00 2001 From: Colin Date: Sat, 25 Feb 2023 01:28:30 +0000 Subject: [PATCH 40/67] cross compilation: fix `notmuch` to compile --- hosts/common/cross.nix | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/hosts/common/cross.nix b/hosts/common/cross.nix index c2de41ef4..21fa140cf 100644 --- a/hosts/common/cross.nix +++ b/hosts/common/cross.nix @@ -262,7 +262,6 @@ in libgccjit # "../../gcc-9.5.0/gcc/jit/jit-result.c:52:3: error: 'dlclose' was not declared in this scope" # libsForQt5 # qtbase # make: g++: No such file or directory libtiger # "src/tiger_internal.h:24:10: fatal error: pango/pango.h: No such file or directory" - notmuch # "Error: The dependencies of notmuch could not be satisfied" (xapian, gmime, glib, talloc) # perlInterpreters # perl5.36.0-Module-Build perl5.36.0-Test-utf8 (see tracking issues ^) phosh # libadwaita-1 not found # qgnomeplatform @@ -758,10 +757,18 @@ in # fixes "fatal error: lmdb++.h: No such file or directory buildInputs = orig.buildInputs ++ [ next.lmdbxx ]; }); - # notmuch = prev.notmuch.override { - # # fails to solve original error - # inherit (emulated) stdenv; - # }; + notmuch = prev.notmuch.overrideAttrs (upstream: { + # fixes "Error: The dependencies of notmuch could not be satisfied" (xapian, gmime, glib, talloc) + # when cross-compiling, we only have a triple-prefixed pkg-config which notmuch's configure script doesn't know how to find. + # so just replace these with the nix-supplied env-var which resolves to the relevant pkg-config. + postPatch = upstream.postPatch or "" + '' + sed -i 's/pkg-config/\$PKG_CONFIG/g' configure + ''; + XAPIAN_CONFIG = next.buildPackages.writeShellScript "xapian-config" '' + exec ${lib.getBin next.xapian}/bin/xapian-config $@ + ''; + nativeBuildInputs = upstream.nativeBuildInputs ++ [ next.gnupg next.perl ]; + }); obex_data_server = prev.obex_data_server.override { # fixes "/nix/store/0wk6nr1mryvylf5g5frckjam7g7p9gpi-bash-5.2-p15/bin/bash: line 2: --prefix=ods_manager: command not found" inherit (emulated) stdenv; From 2937cbc67a8484f232325b794b03264db65f707e Mon Sep 17 00:00:00 2001 From: Colin Date: Sat, 25 Feb 2023 01:29:21 +0000 Subject: [PATCH 41/67] cross compilation: fix xapian to not use `#!/bin/sh` --- hosts/common/cross.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hosts/common/cross.nix b/hosts/common/cross.nix index 21fa140cf..ea4b38cc4 100644 --- a/hosts/common/cross.nix +++ b/hosts/common/cross.nix @@ -970,6 +970,11 @@ in # fixes "perl: command not found" nativeBuildInputs = orig.nativeBuildInputs ++ [ next.perl ]; }); + xapian = prev.xapian.overrideAttrs (upstream: { + # the output has #!/bin/sh scripts. + # - shebangs get re-written on native build, but not cross build + buildInputs = upstream.buildInputs ++ [ next.bash ]; + }); xdg-desktop-portal-gtk = prev.xdg-desktop-portal-gtk.overrideAttrs (orig: { # fixes "No package 'xdg-desktop-portal' found" buildInputs = orig.buildInputs ++ [ next.xdg-desktop-portal ]; From a55e8847ec1ba761952d975ea47fa807247b47dd Mon Sep 17 00:00:00 2001 From: Colin Date: Sun, 26 Feb 2023 11:27:01 +0000 Subject: [PATCH 42/67] cross compilation: disable tests for packages that flake --- overlays/pins.nix | 81 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) diff --git a/overlays/pins.nix b/overlays/pins.nix index d7fd3efee..d23fd42c3 100644 --- a/overlays/pins.nix +++ b/overlays/pins.nix @@ -64,6 +64,60 @@ # - not ok 267 - tcp_bind_error_addrinuse_listen doCheck = false; }); + + llvmPackages_12 = + let + tools = prev.llvmPackages_12.tools.extend (self: super: { + libllvm = super.libllvm.overrideAttrs (upstream: { + # 2023/02/21: fix: "FAIL: LLVM-Unit :: ExecutionEngine/MCJIT/./MCJITTests/MCJITTest.return_global (2857 of 42084)" + # - nix log /nix/store/6vydavlxh1gvs0vmrkcx9qp67g3h7kcz-llvm-12.0.1.drv + # - wanted by sequoia, rav1e, rustc-1.66.1 (is this right?) + doCheck = false; + # upstream sets this with `rec`; TODO: have upstream refer to the final overrideAttrs version of the derivation instead of using rec. + cmakeFlags = next.lib.remove "-DLLVM_BUILD_TESTS=ON" upstream.cmakeFlags; + }); + }); + in + # see + # - we copy their strategy / attrset mutilation + prev.llvmPackages_12 // { inherit tools; } // tools; + + llvmPackages_14 = + let + tools = prev.llvmPackages_14.tools.extend (self: super: { + libllvm = super.libllvm.overrideAttrs (upstream: { + # 2023/02/21: fix: "FAIL: LLVM-Unit :: ExecutionEngine/MCJIT/./MCJITTests/MCJITMultipleModuleTest.two_module_global_variables_case (43769 of 46988)" + # - nix log /nix/store/ib2yw6sajnhlmibxkrn7lj7chllbr85h-llvm-14.0.6.drv + # - wanted by clang-11-12-LLVMgold-path, compiler-rt-libc-12.0.1, clang-wrapper-12.0.1 (is this right?) + doCheck = false; + # upstream sets this with `rec`; TODO: have upstream refer to the final overrideAttrs version of the derivation instead of using rec. + cmakeFlags = next.lib.remove "-DLLVM_BUILD_TESTS=ON" upstream.cmakeFlags; + }); + }); + in + # see + # - we copy their strategy / attrset mutilation + prev.llvmPackages_14 // { inherit tools; } // tools; + + llvmPackages_15 = + let + tools = prev.llvmPackages_15.tools.extend (self: super: { + libllvm = super.libllvm.override { + # 2023/02/21: fix: "FAIL: LLVM-Unit :: ExecutionEngine/MCJIT/./MCJITTests/..." + # llvm15 passes doCheck as a call arg, so we don't need to set cmakeFlags explicitly as in previous versions + doCheck = false; + }; + }); + in + prev.llvmPackages_15 // { inherit tools; } // tools; + + modemmanager = prev.modemmanager.overrideAttrs (_upstream: { + # 2023/02/25 + # "ERROR:test-modem-helpers.c:257:test_cmgl_response: assertion failed: (list != NULL)" + doCheck = false; + doInstallCheck = false; # tests are run during install check?? + }); + pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [ (py-next: py-prev: { ipython = py-prev.ipython.overridePythonAttrs (upstream: { @@ -95,6 +149,23 @@ # "test_runtests_all" # ]; }); + twisted = py-prev.twisted.overridePythonAttrs (upstream: { + # 2023/02/25 + # ``` + # [ERROR] + # Traceback (most recent call last): + # File "/nix/store/dcnsxrn8rsfk1dghah7md5glbbnfysq3-python3.10-twisted-22.10.0/lib/python3.10/site-packages/twisted/test/test_udp.py", line 645, in test_interface + # self.assertEqual(self.client.transport.getOutgoingInterface(), "0.0.0.0") + # File "/nix/store/dcnsxrn8rsfk1dghah7md5glbbnfysq3-python3.10-twisted-22.10.0/lib/python3.10/site-packages/twisted/internet/udp.py", line 449, in getOutgoingInterface + # i = self.socket.getsockopt(socket.IPPROTO_IP, socket.IP_MULTICAST_IF) + # builtins.OSError: [Errno 92] Protocol not available + # + # twisted.test.test_udp.MulticastTests.test_interface + # ``` + postPatch = upstream.postPatch + '' + echo 'MulticastTests.test_interface.skip = "Protocol not available"'>> src/twisted/test/test_udp.py + ''; + }); }) ]; strp = prev.srtp.overrideAttrs (_upstream: { @@ -107,4 +178,14 @@ # "27/37 tracker:core / service TIMEOUT 60.37s killed by signal 15 SIGTERM" doCheck = false; }); + udisks2 = prev.udisks2.overrideAttrs (_upstream: { + # 2023/02/25 + # "udisks-test:ERROR:test.c:61:on_completed_expect_failure: assertion failed (message == expected_message): ("Command-line `./udisks-test-helper 4' was signaled with signal SIGSEGV (11):\nstdout: `OK, deliberately causing a segfault\n'\nstderr: `qemu: uncaught target signal 11 (Segmentation fault) - core dumped\n'" == "Command-line `./udisks-test-helper 4' was signaled with signal SIGSEGV (11): OK, deliberately causing a segfault\n")" + doCheck = false; + }); + upower = prev.upower.overrideAttrs (_upstream: { + # 2023/02/25 + # "Tests.test_battery_state_guessing TIMEOUT 60.80s killed by signal 15 SIGTERM" + doCheck = false; + }); }) From 503f0972725a396a4033c6d8049d1db3f463926a Mon Sep 17 00:00:00 2001 From: Colin Date: Sun, 26 Feb 2023 11:29:15 +0000 Subject: [PATCH 43/67] cross compilation: get dconf-editor to cross compile --- hosts/common/cross.nix | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/hosts/common/cross.nix b/hosts/common/cross.nix index ea4b38cc4..f75a8d265 100644 --- a/hosts/common/cross.nix +++ b/hosts/common/cross.nix @@ -366,6 +366,14 @@ in inherit (emulated) stdenv; }; + dconf = (prev.dconf.override { + # we need dconf to build with vala, because dconf-editor requires that. + # this only happens if dconf *isn't* cross-compiled + inherit (emulated) stdenv; + }).overrideAttrs (upstream: { + nativeBuildInputs = lib.remove next.glib upstream.nativeBuildInputs; + }); + emacs = prev.emacs.override { # fixes "configure: error: cannot run test program while cross compiling" inherit (emulated) stdenv; @@ -426,7 +434,6 @@ in gnome = prev.gnome.overrideScope' (self: super: { inherit (emulated.gnome) - dconf-editor # "error: Package `dconf' not found in specified Vala API directories or GObject-Introspection GIR directories" evolution-data-server # "The 'perl' not found, not installing csv2vcard" gnome-shell # "meson.build:128:0: ERROR: Program 'gjs' not found or not executable" ; @@ -434,10 +441,13 @@ in # # fails to fix original error # inherit (emulated) stdenv; # }; - # dconf-editor = super.dconf-editor.overrideAttrs (orig: { - # # fails to fix original error - # nativeBuildInputs = orig.nativeBuildInputs ++ [ next.dconf ]; - # }); + dconf-editor = super.dconf-editor.overrideAttrs (orig: { + # fixes "error: Package `dconf' not found in specified Vala API directories or GObject-Introspection GIR directories" + # - but ONLY if `dconf` was built with the vala feature. + # - dconf is NOT built with vala when cross-compiled + # - that's an explicit choice/limitation in nixpkgs upstream + nativeBuildInputs = orig.nativeBuildInputs ++ [ next.dconf ]; + }); evince = super.evince.overrideAttrs (orig: { # fixes (meson) "Run-time dependency gi-docgen found: NO (tried pkgconfig and cmake)" # inspired by gupnp From 0abbd006fcd54dc00f6179f5565c3e582a36af26 Mon Sep 17 00:00:00 2001 From: Colin Date: Mon, 27 Feb 2023 21:29:55 +0000 Subject: [PATCH 44/67] cross compilation: get `evolution-data-server` to cross compile --- hosts/common/cross.nix | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/hosts/common/cross.nix b/hosts/common/cross.nix index f75a8d265..adfe4803d 100644 --- a/hosts/common/cross.nix +++ b/hosts/common/cross.nix @@ -434,7 +434,6 @@ in gnome = prev.gnome.overrideScope' (self: super: { inherit (emulated.gnome) - evolution-data-server # "The 'perl' not found, not installing csv2vcard" gnome-shell # "meson.build:128:0: ERROR: Program 'gjs' not found or not executable" ; # dconf-editor = super.dconf-editor.override { @@ -457,14 +456,21 @@ in "-Dgtk_doc=${lib.boolToString (prev.stdenv.buildPlatform == prev.stdenv.hostPlatform)}" ]; }); - # evolution-data-server = super.evolution-data-server.override { - # inherit (next) stdenv; - # }; - # evolution-data-server = super.evolution-data-server.overrideAttrs (orig: { - # # fixes "The 'perl' not found, not installing csv2vcard" - # # doesn't fix "CMake Error: try_run() invoked in cross-compiling mode, please set the following cache variables appropriately" - # nativeBuildInputs = orig.nativeBuildInputs ++ [ next.perl ]; - # }); + evolution-data-server = (super.evolution-data-server.override { + inherit (emulated) stdenv; # fixes aborts in "Performing Test _correct_iconv" &tc + }).overrideAttrs (orig: { + nativeBuildInputs = orig.nativeBuildInputs ++ [ + next.perl # fixes "The 'perl' not found, not installing csv2vcard" + # next.glib + # next.libiconv + # next.iconv + ]; + # buildInputs = orig.buildInputs ++ [ + # next.pcre2 # fixes: "Package 'libpcre2-8', required by 'glib-2.0', not found" + # next.mount # fails to fix: "Package 'mount', required by 'gio-2.0', not found" + # ]; + }); + # file-roller = super.file-roller.override { # # fixes "src/meson.build:106:0: ERROR: Program 'glib-compile-resources' not found or not executable" # inherit (emulated) stdenv; From 9305566330a00a0b17afd499cb445fb95acca740 Mon Sep 17 00:00:00 2001 From: Colin Date: Tue, 28 Feb 2023 01:44:57 +0000 Subject: [PATCH 45/67] cross compilation: get gnome-shell to build --- hosts/common/cross.nix | 47 ++++++++++++++++++++++++++++-------------- 1 file changed, 32 insertions(+), 15 deletions(-) diff --git a/hosts/common/cross.nix b/hosts/common/cross.nix index adfe4803d..95eec9b12 100644 --- a/hosts/common/cross.nix +++ b/hosts/common/cross.nix @@ -434,7 +434,6 @@ in gnome = prev.gnome.overrideScope' (self: super: { inherit (emulated.gnome) - gnome-shell # "meson.build:128:0: ERROR: Program 'gjs' not found or not executable" ; # dconf-editor = super.dconf-editor.override { # # fails to fix original error @@ -521,13 +520,29 @@ in # # "-Dgtk_doc=${lib.boolToString (prev.stdenv.buildPlatform == prev.stdenv.hostPlatform)}" # # ]; # }); - # gnome-shell = super.gnome-shell.override { - # inherit (next) stdenv; - # }; - # gnome-shell = super.gnome-shell.overrideAttrs (orig: { - # # does not solve original error - # nativeBuildInputs = orig.nativeBuildInputs ++ [ next.mesonEmulatorHook ]; - # }); + gnome-shell = (super.gnome-shell.override { + inherit (next) stdenv; + }).overrideAttrs (upstream: { + nativeBuildInputs = upstream.nativeBuildInputs ++ [ + next.gjs # fixes "meson.build:128:0: ERROR: Program 'gjs' not found or not executable" + next.buildPackages.gobject-introspection # fixes "shew| Build-time dependency gobject-introspection-1.0 found: NO" + ]; + buildInputs = lib.remove next.gobject-introspection upstream.buildInputs; + # try to reduce gobject-introspection/shew dependencies + mesonFlags = [ + "-Dextensions_app=false" + "-Dextensions_tool=false" + "-Dman=false" + "-Dgtk_doc=false" + ]; + outputs = [ "out" "dev" ]; + postPatch = upstream.postPatch or "" + '' + # disable introspection for the gvc (libgnome-volume-control) subproject + # to remove its dependency on gobject-introspection + sed -i s/introspection=true/introspection=false/ meson.build + sed -i 's/libgvc_gir/# libgvc_gir/' meson.build src/meson.build + ''; + }); # gnome-settings-daemon = super.gnome-settings-daemon.overrideAttrs (orig: { # # does not fix original error # nativeBuildInputs = orig.nativeBuildInputs ++ [ next.mesonEmulatorHook ]; @@ -562,13 +577,15 @@ in nativeBuildInputs = orig.nativeBuildInputs ++ [ next.glib ]; }); mutter = super.mutter.overrideAttrs (orig: { - # buildInputs += [next.mesa] fixes "meson.build:237:2: ERROR: Dependency "gbm" not found, tried pkgconfig" - # buildInputs += [next.glib] fixes "clutter/clutter/meson.build:281:0: ERROR: Program 'glib-mkenums mkenums' not found or not executable" - # introspection=false and remove docs=true fixes gobject-introspection/_giscanner import error - nativeBuildInputs = orig.nativeBuildInputs ++ [ next.glib next.wayland-scanner ]; - buildInputs = orig.buildInputs ++ [ next.mesa ]; - mesonFlags = (lib.remove "-Ddocs=true" orig.mesonFlags) - ++ [ "-Dintrospection=false" ]; + nativeBuildInputs = orig.nativeBuildInputs ++ [ + next.glib # fixes "clutter/clutter/meson.build:281:0: ERROR: Program 'glib-mkenums mkenums' not found or not executable" + next.buildPackages.gobject-introspection # allows to build without forcing `introspection=false` (which would break gnome-shell) + next.wayland-scanner + ]; + buildInputs = orig.buildInputs ++ [ + next.mesa # fixes "meson.build:237:2: ERROR: Dependency "gbm" not found, tried pkgconfig" + ]; + mesonFlags = lib.remove "-Ddocs=true" orig.mesonFlags; outputs = lib.remove "devdoc" orig.outputs; }); # nautilus = super.nautilus.override { From 0eedcd0114e4faaef371ab366d7e3e0d2bbe88ac Mon Sep 17 00:00:00 2001 From: Colin Date: Tue, 28 Feb 2023 03:30:07 +0000 Subject: [PATCH 46/67] cross compilation: get phoc and phosh to cross-compile --- hosts/common/cross.nix | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/hosts/common/cross.nix b/hosts/common/cross.nix index 95eec9b12..39ec331a4 100644 --- a/hosts/common/cross.nix +++ b/hosts/common/cross.nix @@ -263,7 +263,6 @@ in # libsForQt5 # qtbase # make: g++: No such file or directory libtiger # "src/tiger_internal.h:24:10: fatal error: pango/pango.h: No such file or directory" # perlInterpreters # perl5.36.0-Module-Build perl5.36.0-Test-utf8 (see tracking issues ^) - phosh # libadwaita-1 not found # qgnomeplatform # qtbase qt5 # qt5.qtx11extras fails, but we can't selectively emulate it @@ -819,15 +818,28 @@ in nativeBuildInputs = orig.nativeBuildInputs ++ [ next.perl ]; }); - phoc = prev.phoc.override { - # fixes "Program wayland-scanner found: NO" - inherit (emulated) stdenv; - }; - # phosh = prev.phosh.override { - # # fixes original error. - # # new failure mode: "/nix/store/grqh2wygy9f9wp5bgvqn4im76v82zmcx-binutils-2.39/bin/ld: /nix/store/2bzd39fbsifidd667s7x930d0b7pm3qx-pango-1.50.12/lib/libpangocairo-1.0.so: error adding symbols: file in wrong format" + # phoc = prev.phoc.override { + # # fixes "Program wayland-scanner found: NO" # inherit (emulated) stdenv; # }; + phoc = prev.phoc.overrideAttrs (upstream: { + # buildInputs = upstream.buildInputs or [] ++ [ next.wayland-scanner ]; + nativeBuildInputs = upstream.nativeBuildInputs or [] ++ [ + next.wayland-scanner + next.glib # fixes (meson) "Program 'glib-mkenums mkenums' not found or not executable" + ]; + }); + phosh = prev.phosh.overrideAttrs (upstream: { + buildInputs = upstream.buildInputs ++ [ + next.libadwaita # "plugins/meson.build:41:2: ERROR: Dependency "libadwaita-1" not found, tried pkgconfig" + ]; + mesonFlags = upstream.mesonFlags ++ [ + "-Dphoc_tests=disabled" # "tests/meson.build:20:0: ERROR: Program 'phoc' not found or not executable" + ]; + postPatch = upstream.postPatch or "" + '' + sed -i 's:gio_querymodules = :gio_querymodules = "${next.buildPackages.glib.dev}/bin/gio-querymodules" if True else :' build-aux/post_install.py + ''; + }); phosh-mobile-settings = prev.phosh-mobile-settings.override { # fixes "meson.build:26:0: ERROR: Dependency "phosh-plugins" not found, tried pkgconfig" inherit (emulated) stdenv; From 91054159d31c44cf78888ed7743931531bee2b4b Mon Sep 17 00:00:00 2001 From: Colin Date: Tue, 28 Feb 2023 06:05:35 +0000 Subject: [PATCH 47/67] cross compilation: cross compile `ibus` --- hosts/common/cross.nix | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/hosts/common/cross.nix b/hosts/common/cross.nix index 39ec331a4..3ca1b5a14 100644 --- a/hosts/common/cross.nix +++ b/hosts/common/cross.nix @@ -257,7 +257,6 @@ in # nixpkgs hdf5 is at commit 3e847e003632bdd5fdc189ccbffe25ad2661e16f # hdf5 # configure: error: cannot run test program while cross compiling # http2 - ibus # configure.ac:152: error: possibly undefined macro: AM_PATH_GLIB_2_0 kitty # "FileNotFoundError: [Errno 2] No such file or directory: 'pkg-config'" libgccjit # "../../gcc-9.5.0/gcc/jit/jit-result.c:52:3: error: 'dlclose' was not declared in this scope" # libsForQt5 # qtbase # make: g++: No such file or directory @@ -652,10 +651,23 @@ in # inherit (emulated) stdenv; # }; - # ibus = prev.ibus.override { - # # "_giscanner.cpython-310-x86_64-linux-gnu.so: cannot open shared object file: No such file or directory" - # inherit (emulated) stdenv; - # }; + ibus = (prev.ibus.override { + # fixes: "configure.ac:152: error: possibly undefined macro: AM_PATH_GLIB_2_0" + inherit (emulated) stdenv; + }).overrideAttrs (upstream: { + nativeBuildInputs = upstream.nativeBuildInputs or [] ++ [ + # fixes "_giscanner.cpython-310-x86_64-linux-gnu.so: cannot open shared object file: No such file or directory" + next.buildPackages.gobject-introspection + ]; + buildInputs = lib.remove next.gobject-introspection upstream.buildInputs; + }); + # ibus = prev.ibus.overrideAttrs (upstream: { + # # FIXES: configure.ac:152: error: possibly undefined macro: AM_PATH_GLIB_2_0 + # # technique copied from + # # new error: ImportError: /nix/store/fi1rsalr11xg00dqwgzbf91jpl3zwygi-gobject-introspection-aarch64-unknown-linux-gnu-1.74.0/lib/gobject-introspection/giscanner/_giscanner.cpython-310-x86_64-linux-gnu.so: cannot open shared object file: No such file or directory + # nativeBuildInputs = upstream.nativeBuildInputs ++ [ next.glib next.gobject-introspection ]; + # buildInputs = lib.remove next.gobject-introspection upstream.buildInputs; + # }); iio-sensor-proxy = prev.iio-sensor-proxy.overrideAttrs (orig: { # fixes "./autogen.sh: line 26: gtkdocize: not found" From 7a67f3ed0fdb30b361892d73f80159e323e05827 Mon Sep 17 00:00:00 2001 From: Colin Date: Tue, 28 Feb 2023 06:08:08 +0000 Subject: [PATCH 48/67] cross compilation: don't emulate `gmime3` --- hosts/common/cross.nix | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/hosts/common/cross.nix b/hosts/common/cross.nix index 3ca1b5a14..a96587f60 100644 --- a/hosts/common/cross.nix +++ b/hosts/common/cross.nix @@ -249,7 +249,6 @@ in # duplicity # python3.10-s3transfer fwupd-efi # efi/meson.build:162:0: ERROR: Program or command 'gcc' not found or not executable # gdk-pixbuf # cross-compiled version doesn't output bin/gdk-pixbuf-thumbnailer (used by webp-pixbuf-loader - gmime3 # "checking preferred charset formats for system iconv... cannot run test program while cross compiling" # gnome-tour # XXX: gnustep members aren't individually overridable, because the "scope" uses `rec` such that members don't see overrides gnustep # gnustep.base: "configure: error: Your compiler does not appear to implement the -fconstant-string-class option needed for support of strings." @@ -416,19 +415,27 @@ in nativeBuildInputs = orig.nativeBuildInputs ++ [ next.glib ]; }); gmime = prev.gmime.overrideAttrs (orig: { - # "checking preferred charset formats for system iconv... cannot run test program while cross compiling" + # fixes: "checking preferred charset formats for system iconv... cannot run test program while cross compiling" configureFlags = orig.configureFlags ++ [ "ac_cv_have_iconv_detect_h=no" ]; }); + gmime3 = prev.gmime3.overrideAttrs (upstream: { + configureFlags = upstream.configureFlags ++ [ + "ac_cv_have_iconv_detect_h=no" # fixes: "checking preferred charset formats for system iconv... cannot run test program while cross compiling" + ]; + nativeBuildInputs = upstream.nativeBuildInputs or [] ++ [ + next.buildPackages.gobject-introspection + ]; + }); # gmime3 = prev.gmime3.overrideAttrs (orig: { - # # "checking preferred charset formats for system iconv... cannot run test program while cross compiling" - # # unsolved: "ImportError: /nix/store/c190src4bjkfp7bdgc5sadnmvgzv7kxb-gobject-introspection-aarch64-unknown-linux-gnu-1.74.0/lib/gobject-introspection/giscanner/_giscanner.cpython-310-x86_64-linux-gnu.so: cannot open shared object file: No such file or directory" + # # fixes: "checking preferred charset formats for system iconv... cannot run test program while cross compiling" + # # new error: something about python imports; doesn't happen on nixpkgs/tip. # configureFlags = orig.configureFlags ++ [ "ac_cv_have_iconv_detect_h=no" ]; + # nativeBuildInputs = orig.nativeBuildInputs ++ [ next.gobject-introspection ]; + # # XXX lib.remove doesn't work on pkg sets (?) + # buildInputs = with next; [ vala zlib gpgme libidn2 libunistring ]; + # # buildInputs = lib.remove next.gobject-introspection orig.buildInputs; # }); - # gmime3 = prev.gmime3.override { - # # doesn't fix - # inherit (emulated) stdenv; - # }; gnome = prev.gnome.overrideScope' (self: super: { inherit (emulated.gnome) From f1709c0355f41c5977b6f61d28b19a2d1384b917 Mon Sep 17 00:00:00 2001 From: Colin Date: Tue, 28 Feb 2023 07:15:34 +0000 Subject: [PATCH 49/67] cross compilation: libgweather: build with vala (dependents need it) --- hosts/common/cross.nix | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/hosts/common/cross.nix b/hosts/common/cross.nix index a96587f60..8823aafdf 100644 --- a/hosts/common/cross.nix +++ b/hosts/common/cross.nix @@ -690,21 +690,14 @@ in # fixes: "failed to produce output path for output 'devdoc'" outputs = lib.remove "devdoc" upstream.outputs; }); - libgweather = prev.libgweather.overrideAttrs (upstream: { - # fixes: "Run-time dependency vapigen found: NO (tried pkgconfig)" - mesonFlags = - ( - lib.remove "-Denable_vala=true" - (lib.remove "-Dgtk_doc=true" upstream.mesonFlags) - ) ++ [ - "-Dintrospection=false" - "-Denable_vala=false" - "-Dgtk_doc=false" - ]; - outputs = lib.remove "devdoc" upstream.outputs; - nativeBuildInputs = (lib.remove next.gobject-introspection upstream.nativeBuildInputs) ++ [ - next.glib - ]; + libgweather = (prev.libgweather.override { + # alternative to emulating python3 is to specify it in `buildInputs` instead of `nativeBuildInputs` (upstream), + # but presumably that's just a different way to emulate it. + inherit (emulated) + stdenv # fixes "Run-time dependency vapigen found: NO (tried pkgconfig)" + gobject-introspection # fixes gir x86-64 python -> aarch64 shared object import + python3 # fixes build-aux/meson/gen_locations_variant.py x86-64 python -> aarch64 import of glib + ; }); libHX = prev.libHX.overrideAttrs (orig: { # "Can't exec "libtoolize": No such file or directory at /nix/store/r4fvx9hazsm0rdm7s393zd5v665dsh1c-autoconf-2.71/share/autoconf/Autom4te/FileUtils.pm line 294." From b7c2dfea19b12b94e93fbe413794b0987d2a1b8c Mon Sep 17 00:00:00 2001 From: Colin Date: Tue, 28 Feb 2023 07:35:56 +0000 Subject: [PATCH 50/67] cross compilation: reduce emulation of fwupd-efi --- hosts/common/cross.nix | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/hosts/common/cross.nix b/hosts/common/cross.nix index 8823aafdf..aa90bc551 100644 --- a/hosts/common/cross.nix +++ b/hosts/common/cross.nix @@ -247,7 +247,6 @@ in # adwaita-qt # psqlodbc apacheHttpd_2_4 # `configure: error: Size of "void *" is less than size of "long"` # duplicity # python3.10-s3transfer - fwupd-efi # efi/meson.build:162:0: ERROR: Program or command 'gcc' not found or not executable # gdk-pixbuf # cross-compiled version doesn't output bin/gdk-pixbuf-thumbnailer (used by webp-pixbuf-loader # gnome-tour # XXX: gnustep members aren't individually overridable, because the "scope" uses `rec` such that members don't see overrides @@ -390,10 +389,24 @@ in depsBuildBuild = upstream.depsBuildBuild or [] ++ [ next.pkg-config ]; }); - # fwupd-efi = prev.fwupd-efi.override { - # # efi/meson.build:33:2: ERROR: Problem encountered: gnu-efi support requested, but headers were not found - # inherit (emulated) stdenv; - # }; + fwupd-efi = prev.fwupd-efi.override { + # fwupd-efi queries meson host_machine to decide what arch to build for. + # for some reason, this gives x86_64 unless meson itself is emulated. + # maybe meson's use of "host_machine" actually mirrors nix's "build machine"? + inherit (emulated) + stdenv # fixes: "efi/meson.build:162:0: ERROR: Program or command 'gcc' not found or not executable" + meson # fixes: "efi/meson.build:33:2: ERROR: Problem encountered: gnu-efi support requested, but headers were not found" + ; + }; + # fwupd-efi = prev.fwupd-efi.overrideAttrs (upstream: { + # # does not fix: "efi/meson.build:162:0: ERROR: Program or command 'gcc' not found or not executable" + # makeFlags = upstream.makeFlags or [] ++ [ "CC=${prev.stdenv.cc.targetPrefix}cc" ]; + # # does not fix: "efi/meson.build:162:0: ERROR: Program or command 'gcc' not found or not executable" + + # # nativeBuildInputs = upstream.nativeBuildInputs ++ lib.optionals (!prev.stdenv.buildPlatform.canExecute prev.stdenv.hostPlatform) [ + # # next.mesonEmulatorHook + # # ]; + # }); fwupd = prev.fwupd.overrideAttrs (orig: { # solves (meson) "Run-time dependency libgcab-1.0 found: NO (tried pkgconfig and cmake)", and others. buildInputs = orig.buildInputs ++ [ next.gcab next.gnutls ]; From aab2a9cd26495e79951691438f6b65fad097b478 Mon Sep 17 00:00:00 2001 From: Colin Date: Wed, 1 Mar 2023 04:45:59 +0000 Subject: [PATCH 51/67] cross compilation: gmime3: build with gpgme support (needed by `notmuch`) --- hosts/common/cross.nix | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/hosts/common/cross.nix b/hosts/common/cross.nix index aa90bc551..5c1734a58 100644 --- a/hosts/common/cross.nix +++ b/hosts/common/cross.nix @@ -427,17 +427,40 @@ in # fixes (meson) "Program 'glib-mkenums mkenums' not found or not executable" nativeBuildInputs = orig.nativeBuildInputs ++ [ next.glib ]; }); - gmime = prev.gmime.overrideAttrs (orig: { - # fixes: "checking preferred charset formats for system iconv... cannot run test program while cross compiling" - configureFlags = orig.configureFlags ++ [ "ac_cv_have_iconv_detect_h=no" ]; + + gmime = prev.gmime.overrideAttrs (upstream: { + configureFlags = upstream.configureFlags ++ [ + "ac_cv_have_iconv_detect_h=yes" # fixes: "checking preferred charset formats for system iconv... cannot run test program while cross compiling" + "--enable-cryptography=yes" # force GPGME (TODO: might not be necessary?) + ]; + postPatch = upstream.postPatch + '' + # mimick how upstream builds iconv-detect.h + # the resulting binary is for the host, but unlike configure we know how to invoke that. + "$CC" ./iconv-detect.c -o iconv-detect + ./iconv-detect + rm iconv-detect + ''; }); gmime3 = prev.gmime3.overrideAttrs (upstream: { configureFlags = upstream.configureFlags ++ [ - "ac_cv_have_iconv_detect_h=no" # fixes: "checking preferred charset formats for system iconv... cannot run test program while cross compiling" + "ac_cv_have_iconv_detect_h=yes" # fixes: "checking preferred charset formats for system iconv... cannot run test program while cross compiling" + "--enable-crypto=yes" # force GPGME (TODO: might not be necessary?) ]; + postPatch = upstream.postPatch + '' + # mimick how upstream builds iconv-detect.h + # the resulting binary is for the host, but unlike configure we know how to invoke that. + "$CC" ./iconv-detect.c -o iconv-detect + ./iconv-detect + rm iconv-detect + ''; nativeBuildInputs = upstream.nativeBuildInputs or [] ++ [ next.buildPackages.gobject-introspection ]; + # configure detects gpgme support by invoking `gpgme-config` which otherwise fails on cross-compiled builds and causes gmime3 to build without gpgme support. + # consumers of gmime3 expect gpgme support, so make sure we build it on all platforms with this. + GPGME_CONFIG = next.buildPackages.writeShellScript "gpgme-config" '' + exec ${lib.getBin next.gpgme.dev}/bin/gpgme-config $@ + ''; }); # gmime3 = prev.gmime3.overrideAttrs (orig: { From b56507d4c2015a009b7f89f43660d0c31abb2d6c Mon Sep 17 00:00:00 2001 From: Colin Date: Wed, 1 Mar 2023 04:49:04 +0000 Subject: [PATCH 52/67] cross compilation: fix build of `notmuch` --- hosts/common/cross.nix | 58 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 57 insertions(+), 1 deletion(-) diff --git a/hosts/common/cross.nix b/hosts/common/cross.nix index 5c1734a58..ec634b53d 100644 --- a/hosts/common/cross.nix +++ b/hosts/common/cross.nix @@ -847,8 +847,64 @@ in XAPIAN_CONFIG = next.buildPackages.writeShellScript "xapian-config" '' exec ${lib.getBin next.xapian}/bin/xapian-config $@ ''; - nativeBuildInputs = upstream.nativeBuildInputs ++ [ next.gnupg next.perl ]; + # depsBuildBuild = [ next.gnupg ]; + nativeBuildInputs = upstream.nativeBuildInputs ++ [ + next.gnupg # nixpkgs specifies gpg as a buildInput instead of a nativeBuildInput + next.perl # used to build manpages + # next.pythonPackages.python + # next.shared-mime-info + ]; + buildInputs = with next; [ + xapian gmime3 talloc zlib # dependencies described in INSTALL + # perl + # pythonPackages.python + ruby # notmuch links against ruby.so + ]; + # buildInputs = + # (lib.remove + # next.perl + # (lib.remove + # next.gmime + # (lib.remove next.gnupg upstream.buildInputs) + # ) + # ) ++ [ next.gmime ]; }); + # notmuch = (prev.notmuch.override { + # inherit (emulated) + # stdenv + # # gmime + # ; + # gmime = emulated.gmime3; + # }).overrideAttrs (upstream: { + # postPatch = upstream.postPatch or "" + '' + # sed -i 's/pkg-config/\$PKG_CONFIG/g' configure + # ''; + # nativeBuildInputs = upstream.nativeBuildInputs ++ [ + # next.gnupg + # next.perl + # ]; + # buildInputs = lib.remove next.gnupg upstream.buildInputs; + # }); + # notmuch = prev.notmuch.overrideAttrs (upstream: { + # # fixes "Error: The dependencies of notmuch could not be satisfied" (xapian, gmime, glib, talloc) + # # when cross-compiling, we only have a triple-prefixed pkg-config which notmuch's configure script doesn't know how to find. + # # so just replace these with the nix-supplied env-var which resolves to the relevant pkg-config. + # postPatch = upstream.postPatch or "" + '' + # sed -i 's/pkg-config/\$PKG_CONFIG/g' configure + # sed -i 's: gpg : ${next.buildPackages.gnupg}/bin/gpg :' configure + # ''; + # XAPIAN_CONFIG = next.buildPackages.writeShellScript "xapian-config" '' + # exec ${lib.getBin next.xapian}/bin/xapian-config $@ + # ''; + # # depsBuildBuild = upstream.depsBuildBuild or [] ++ [ + # # next.buildPackages.stdenv.cc + # # ]; + # nativeBuildInputs = upstream.nativeBuildInputs ++ [ + # # next.gnupg + # next.perl + # ]; + # # buildInputs = lib.remove next.gnupg upstream.buildInputs; + # }); obex_data_server = prev.obex_data_server.override { # fixes "/nix/store/0wk6nr1mryvylf5g5frckjam7g7p9gpi-bash-5.2-p15/bin/bash: line 2: --prefix=ods_manager: command not found" inherit (emulated) stdenv; From 7f38cd7535bb722a93d45c6a2665fcce1192267e Mon Sep 17 00:00:00 2001 From: Colin Date: Wed, 1 Mar 2023 08:07:44 +0000 Subject: [PATCH 53/67] cross compilation: emulate less of `squeekboard` --- hosts/common/cross.nix | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/hosts/common/cross.nix b/hosts/common/cross.nix index ec634b53d..c7da8ad72 100644 --- a/hosts/common/cross.nix +++ b/hosts/common/cross.nix @@ -266,7 +266,6 @@ in qt6 # "You need to set QT_HOST_PATH to cross compile Qt." sequoia # "/nix/store/q8hg17w47f9xr014g36rdc2gi8fv02qc-clang-aarch64-unknown-linux-gnu-12.0.1-lib/lib/libclang.so.12: cannot open shared object file: No such file or directory"', /build/sequoia-0.27.0-vendor.tar.gz/bindgen/src/lib.rs:1975:31" # splatmoji - squeekboard # meson.build:1:0: ERROR: 'rust' compiler binary not defined in cross or native file twitter-color-emoji # /nix/store/0wk6nr1mryvylf5g5frckjam7g7p9gpi-bash-5.2-p15/bin/bash: line 1: pkg-config: command not found visidata # python3.10-psycopg2 python3.10-pandas python3.10-h5py # webkitgtk_4_1 # requires nativeBuildInputs = perl.pkgs.FileCopyRecursive => perl5.36.0-Test-utf8 @@ -1067,10 +1066,14 @@ in # in # orig.mesonFlags or [] ++ lib.optionals (next.stdenv.hostPlatform != next.stdenv.buildPlatform) [ "--cross-file=${crossFile}" ]; # }); - # squeekboard = prev.squeekboard.override { - # # new error: "gcc: error: unrecognized command line option '-m64'" - # inherit (emulated) stdenv; - # }; + squeekboard = prev.squeekboard.override { + inherit (emulated) + rustPlatform # fixes original "'rust' compiler binary not defined in cross or native file" + stdenv # fixes error when linking src/squeekboard: "/nix/store/3c0dqm093ylw8ks7myzxdaif0m16rgcl-binutils-2.40/bin/ld: /nix/store/jzh15bi6zablx3d9s928w3lgqy6and91-glib-2.74.3/lib/libgio-2.0.so" + glib # fixes "gcc: error: unrecognized command line option '-m64'" + wayland # fixes error when linking src/squeekboard: "/nix/store/3c0dqm093ylw8ks7myzxdaif0m16rgcl-binutils-2.40/bin/ld: /nix/store/ni0vb1pnaznx85378i3h9xhw9cay68g5-wayland-1.21.0/lib/libwayland-client.so: error adding symbols: file in wrong format" + ; + }; sysprof = prev.sysprof.overrideAttrs (orig: { # fixes: "src/meson.build:12:2: ERROR: Program 'gdbus-codegen' not found or not executable" From f27202056e838890110321eb95101ea4e7233295 Mon Sep 17 00:00:00 2001 From: Colin Date: Wed, 1 Mar 2023 08:09:05 +0000 Subject: [PATCH 54/67] cross compilation: draft lighter-weight solutions to gocryptfs, networkmanager-iodine, ostree (commented out) --- hosts/common/cross.nix | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/hosts/common/cross.nix b/hosts/common/cross.nix index c7da8ad72..bb2cadd9b 100644 --- a/hosts/common/cross.nix +++ b/hosts/common/cross.nix @@ -643,6 +643,18 @@ in # fixes "error: hash mismatch in fixed-output derivation" (vendorSha256) inherit (emulated) buildGoModule; # equivalent to stdenv }; + # gocryptfs = prev.gocryptfs.override { + # # fixes "error: hash mismatch in fixed-output derivation" (vendorSha256) + # # new error: "go: inconsistent vendoring in /build/source:" + # # - "github.com/hanwen/go-fuse/v2@v2.1.1-0.20211219085202-934a183ed914: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt" + # # - ... + # buildGoModule = args: next.buildGoModule (args // { + # vendorSha256 = { + # x86_64-linux = args.vendorSha256; + # aarch64-linux = "sha256-9famtUjkeAtzxfXzmWVum/pyaNp89Aqnfd+mWE7KjaI="; + # }."${next.stdenv.system}"; + # }); + # }; gupnp_1_6 = prev.gupnp_1_6.overrideAttrs (orig: { # fixes "subprojects/gi-docgen/meson.build:10:0: ERROR: python3 not found" # this patch is copied from the default gupnp. @@ -808,6 +820,15 @@ in # fixes "configure.ac:58: error: possibly undefined macro: AM_GLIB_GNU_GETTEXT" inherit (emulated) stdenv; }; + # networkmanager-iodine = prev.networkmanager-iodine.overrideAttrs (upstream: { + # # buildInputs = upstream.buildInputs ++ [ next.intltool next.gettext ]; + # # nativeBuildInputs = lib.remove next.intltool upstream.nativeBuildInputs; + # # nativeBuildInputs = upstream.nativeBuildInputs ++ [ next.gettext ]; + # postPatch = upstream.postPatch or "" + '' + # sed -i s/AM_GLIB_GNU_GETTEXT/AM_GNU_GETTEXT/ configure.ac + # ''; + # }); + networkmanager-l2tp = prev.networkmanager-l2tp.overrideAttrs (orig: { # fixes "gdbus-codegen: command not found" # fixes "gtk4-builder-tool: command not found" @@ -916,6 +937,12 @@ in # fixes "configure: error: Need GPGME_PTHREAD version 1.1.8 or later" inherit (emulated) stdenv; }; + # ostree = prev.ostree.overrideAttrs (upstream: { + # # fixes: "configure: error: Need GPGME_PTHREAD version 1.1.8 or later" + # # new failure mode: "./src/libotutil/ot-gpg-utils.h:22:10: fatal error: gpgme.h: No such file or directory" + # # buildInputs = lib.remove next.gpgme upstream.buildInputs; + # nativeBuildInputs = upstream.nativeBuildInputs ++ [ next.gpgme ]; + # }); pam_mount = prev.pam_mount.overrideAttrs (orig: { # fixes: "perl: command not found" nativeBuildInputs = orig.nativeBuildInputs ++ [ next.perl ]; From 8ce1fae67b195c4348e0341ac59fd7599ff0285d Mon Sep 17 00:00:00 2001 From: Colin Date: Wed, 1 Mar 2023 08:16:41 +0000 Subject: [PATCH 55/67] fonts: switch from twitter-color-emoji -> noto-color-emoji because the former doesn't cross compile --- hosts/common/cross.nix | 2 +- hosts/common/default.nix | 17 +++++++++++++++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/hosts/common/cross.nix b/hosts/common/cross.nix index bb2cadd9b..3e6fdc5cb 100644 --- a/hosts/common/cross.nix +++ b/hosts/common/cross.nix @@ -266,7 +266,7 @@ in qt6 # "You need to set QT_HOST_PATH to cross compile Qt." sequoia # "/nix/store/q8hg17w47f9xr014g36rdc2gi8fv02qc-clang-aarch64-unknown-linux-gnu-12.0.1-lib/lib/libclang.so.12: cannot open shared object file: No such file or directory"', /build/sequoia-0.27.0-vendor.tar.gz/bindgen/src/lib.rs:1975:31" # splatmoji - twitter-color-emoji # /nix/store/0wk6nr1mryvylf5g5frckjam7g7p9gpi-bash-5.2-p15/bin/bash: line 1: pkg-config: command not found + # twitter-color-emoji # /nix/store/0wk6nr1mryvylf5g5frckjam7g7p9gpi-bash-5.2-p15/bin/bash: line 1: pkg-config: command not found visidata # python3.10-psycopg2 python3.10-pandas python3.10-h5py # webkitgtk_4_1 # requires nativeBuildInputs = perl.pkgs.FileCopyRecursive => perl5.36.0-Test-utf8 # xdg-utils # perl5.36.0-File-BaseDir / perl5.36.0-Module-Build diff --git a/hosts/common/default.nix b/hosts/common/default.nix index ffbd9dded..593fe6300 100644 --- a/hosts/common/default.nix +++ b/hosts/common/default.nix @@ -42,16 +42,29 @@ fonts = { enableDefaultFonts = true; - fonts = with pkgs; [ font-awesome twitter-color-emoji hack-font ]; + fonts = with pkgs; [ font-awesome noto-fonts-emoji hack-font ]; fontconfig.enable = true; fontconfig.defaultFonts = { - emoji = [ "Font Awesome 6 Free" "Twitter Color Emoji" ]; + emoji = [ "Font Awesome 6 Free" "Noto Color Emoji" ]; monospace = [ "Hack" ]; serif = [ "DejaVu Serif" ]; sansSerif = [ "DejaVu Sans" ]; }; }; + # XXX: twitter-color-emoji doesn't cross-compile; but not-fonts-emoji does + # fonts = { + # enableDefaultFonts = true; + # fonts = with pkgs; [ font-awesome twitter-color-emoji hack-font ]; + # fontconfig.enable = true; + # fontconfig.defaultFonts = { + # emoji = [ "Font Awesome 6 Free" "Twitter Color Emoji" ]; + # monospace = [ "Hack" ]; + # serif = [ "DejaVu Serif" ]; + # sansSerif = [ "DejaVu Sans" ]; + # }; + # }; + # disable non-required packages like nano, perl, rsync, strace environment.defaultPackages = []; From 0ee0b3c3bbd00d160a45e0dd6c9e79db641f8137 Mon Sep 17 00:00:00 2001 From: Colin Date: Wed, 1 Mar 2023 08:18:00 +0000 Subject: [PATCH 56/67] phosh: disable the qt gnome theming because qtdeclarative/qgnomeplatform does not cross compile --- hosts/modules/gui/phosh.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hosts/modules/gui/phosh.nix b/hosts/modules/gui/phosh.nix index 3a384b84a..c5a09af94 100644 --- a/hosts/modules/gui/phosh.nix +++ b/hosts/modules/gui/phosh.nix @@ -49,6 +49,12 @@ in (mkIf cfg.enable { sane.programs.phoshApps.enableFor.user.colin = true; + # TODO(2023/02/28): remove this qt.style = "gtk2" override. + # gnome by default tells qt to stylize its apps similar to gnome. + # but the package needed for that doesn't cross-compile, hence i disable that here. + qt.platformTheme = "gtk2"; + qt.style = "gtk2"; + # docs: https://github.com/NixOS/nixpkgs/blob/nixos-22.05/nixos/modules/services/x11/desktop-managers/phosh.nix services.xserver.desktopManager.phosh = { enable = true; From 8350386ea87d163786ff8d19689e4510b0dc4d5f Mon Sep 17 00:00:00 2001 From: Colin Date: Wed, 1 Mar 2023 08:22:36 +0000 Subject: [PATCH 57/67] cross.nix: doc improvements --- hosts/common/cross.nix | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/hosts/common/cross.nix b/hosts/common/cross.nix index 3e6fdc5cb..25d97da11 100644 --- a/hosts/common/cross.nix +++ b/hosts/common/cross.nix @@ -1,10 +1,19 @@ # cross compiling - +# +# terminology: +# - buildPlatform is the machine on which a compiler is run. +# - hostPlatform is the machine on which a built package is run. +# - targetPlatform is used only by compilers which aren't multi-output. +# - specifies the platform for which a compiler will produce binaries after that compiler is built. +# # - for edge-casey things, see in nixpkgs: # - `git show da9a9a440415b236f22f57ba67a24ab3fb53f595` # - e.g. `mesonEmulatorHook`, `depsBuildBuild`, `python3.pythonForBuild` # - # - e.g. `makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];` +# - +# - `${stdenv.hostPlatform.emulator buildPackages} ` +# - to run code compiled for host platform # # build a particular package as evaluated here with: # - toplevel: `nix build '.#host-pkgs.moby-cross.xdg-utils'` @@ -43,12 +52,6 @@ # """ # TODO: -# - ??.llvmPackages_14.llvm: "FAIL: LLVM-Unit :: ExecutionEngine/MCJIT/./MCJITTests/MCJITMultipleModuleTest.two_module_global_variables_case (43769 of 46988)" -# - nix log /nix/store/ib2yw6sajnhlmibxkrn7lj7chllbr85h-llvm-14.0.6.drv -# - wanted by clang-11-12-LLVMgold-path, compiler-rt-libc-12.0.1, clang-wrapper-12.0.1 -# - ?..llvmPackages_12.llvm: "FAIL: LLVM-Unit :: ExecutionEngine/MCJIT/./MCJITTests/MCJITTest.return_global (2857 of 42084)" -# - nix log /nix/store/6vydavlxh1gvs0vmrkcx9qp67g3h7kcz-llvm-12.0.1.drv -# - wanted by sequoia, rav1e, rustc-1.66.1 # - `host-pkgs.desko.stdenv` fails build: # - #cross-compiling:nixos.org says pkgsCross.gnu64 IS KNOWN TO NOT COMPILE. let this go for now: # - make a `` (don't specifiy local/targetSystem) and `-cross` target. @@ -256,7 +259,7 @@ in # hdf5 # configure: error: cannot run test program while cross compiling # http2 kitty # "FileNotFoundError: [Errno 2] No such file or directory: 'pkg-config'" - libgccjit # "../../gcc-9.5.0/gcc/jit/jit-result.c:52:3: error: 'dlclose' was not declared in this scope" + libgccjit # "../../gcc-9.5.0/gcc/jit/jit-result.c:52:3: error: 'dlclose' was not declared in this scope" (needed by emacs!) # libsForQt5 # qtbase # make: g++: No such file or directory libtiger # "src/tiger_internal.h:24:10: fatal error: pango/pango.h: No such file or directory" # perlInterpreters # perl5.36.0-Module-Build perl5.36.0-Test-utf8 (see tracking issues ^) @@ -281,6 +284,7 @@ in # mod_dnssd = prev.mod_dnssd.override { # inherit (emulated) stdenv; # }; + apacheHttpdPackagesFor = apacheHttpd: self: let prevHttpdPkgs = prev.apacheHttpdPackagesFor apacheHttpd self; @@ -290,6 +294,7 @@ in inherit (emulated) stdenv; }; }; + # apacheHttpdPackagesFor = apacheHttpd: self: # let # prevHttpdPkgs = lib.fix (emulated.apacheHttpdPackagesFor apacheHttpd); @@ -569,6 +574,7 @@ in ]; buildInputs = lib.remove next.gobject-introspection upstream.buildInputs; # try to reduce gobject-introspection/shew dependencies + # TODO: these likely aren't all necessary mesonFlags = [ "-Dextensions_app=false" "-Dextensions_tool=false" @@ -658,7 +664,6 @@ in gupnp_1_6 = prev.gupnp_1_6.overrideAttrs (orig: { # fixes "subprojects/gi-docgen/meson.build:10:0: ERROR: python3 not found" # this patch is copied from the default gupnp. - # TODO: upstream outputs = [ "out" "dev" ] ++ lib.optionals (prev.stdenv.buildPlatform == prev.stdenv.hostPlatform) [ "devdoc" ]; mesonFlags = [ @@ -975,7 +980,7 @@ in inherit (emulated) stdenv; }; pipewire = prev.pipewire.overrideAttrs (orig: { - # fix `spa/plugins/bluez5/meson.build:41:0: ERROR: Program 'gdbus-codegen' not found or not executable` + # fixes `spa/plugins/bluez5/meson.build:41:0: ERROR: Program 'gdbus-codegen' not found or not executable` nativeBuildInputs = orig.nativeBuildInputs ++ [ next.glib ]; }); psqlodbc = prev.psqlodbc.override { @@ -986,11 +991,9 @@ in pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [ (py-next: py-prev: { defcon = py-prev.defcon.overridePythonAttrs (orig: { - # TODO: diagnose and upstream nativeBuildInputs = orig.nativeBuildInputs ++ orig.nativeCheckInputs; }); executing = py-prev.executing.overridePythonAttrs (orig: { - # TODO: confirm & upstream # test has an assertion that < 1s of CPU time elapsed => flakey disabledTestPaths = orig.disabledTestPaths or [] ++ [ # "tests/test_main.py::TestStuff::test_many_source_for_filename_calls" @@ -1012,11 +1015,9 @@ in disabledTests = orig.disabledTests ++ [ "test_debug_magic_passes_through_generator" ]; }); mutatormath = py-prev.mutatormath.overridePythonAttrs (orig: { - # TODO: diagnose and upstream nativeBuildInputs = orig.nativeBuildInputs or [] ++ orig.nativeCheckInputs; }); pandas = py-prev.pandas.overridePythonAttrs (orig: { - # TODO: upstream # XXX: we only actually need numpy when building in ~/nixpkgs repo: not sure why we need all the propagatedBuildInputs here. # nativeBuildInputs = orig.nativeBuildInputs ++ [ py-next.numpy ]; nativeBuildInputs = orig.nativeBuildInputs ++ orig.propagatedBuildInputs; From 4b722a6c30bbbee1a564167bfa0160dcb00093a3 Mon Sep 17 00:00:00 2001 From: Colin Date: Wed, 1 Mar 2023 09:45:03 +0000 Subject: [PATCH 58/67] pins: disable failing fish tests --- overlays/pins.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/overlays/pins.nix b/overlays/pins.nix index d23fd42c3..e5178a915 100644 --- a/overlays/pins.nix +++ b/overlays/pins.nix @@ -22,6 +22,13 @@ # unclear *why* this test fails. doCheck = false; }); + fish = prev.fish.overrideAttrs (_upstream: { + # 2023/02/28 + # The following tests FAILED: + # 177 - sigint.fish (Failed) + # 241 - torn_escapes.py (Failed) + doCheck = false; + }); gjs = prev.gjs.overrideAttrs (_upstream: { # 2023/01/30: one test times out. probably flakey test that only got built because i patched mesa. doCheck = false; From 706cf3bac263e4f98b26f746377b39b42f93d55a Mon Sep 17 00:00:00 2001 From: Colin Date: Wed, 1 Mar 2023 09:48:35 +0000 Subject: [PATCH 59/67] cross.nix: move to subdir --- hosts/common/{cross.nix => cross/default.nix} | 4 ++-- hosts/common/default.nix | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) rename hosts/common/{cross.nix => cross/default.nix} (99%) diff --git a/hosts/common/cross.nix b/hosts/common/cross/default.nix similarity index 99% rename from hosts/common/cross.nix rename to hosts/common/cross/default.nix index 25d97da11..674ce64ce 100644 --- a/hosts/common/cross.nix +++ b/hosts/common/cross/default.nix @@ -83,8 +83,8 @@ let # these are the overlays which we *also* pass through to the cross and emulated package sets. # TODO: refactor to not specify same overlay in multiple places (here and flake.nix). overlays = [ - (import ./../../overlays/pkgs.nix) - (import ./../../overlays/pins.nix) + (import ./../../../overlays/pkgs.nix) + (import ./../../../overlays/pins.nix) ]; mkCrossFrom = localSystem: pkgs: import pkgs.path { diff --git a/hosts/common/default.nix b/hosts/common/default.nix index 593fe6300..2387e8335 100644 --- a/hosts/common/default.nix +++ b/hosts/common/default.nix @@ -1,7 +1,7 @@ { lib, pkgs, ... }: { imports = [ - ./cross.nix + ./cross ./feeds.nix ./fs.nix ./hardware.nix From 7445adbea0b8e41bb53e9d4a968a4a90f926f1d9 Mon Sep 17 00:00:00 2001 From: Colin Date: Wed, 1 Mar 2023 10:14:12 +0000 Subject: [PATCH 60/67] cross compilation: don't emulate kitty --- hosts/common/cross/default.nix | 16 +++++++++++----- hosts/common/cross/kitty-no-docs.patch | 22 ++++++++++++++++++++++ 2 files changed, 33 insertions(+), 5 deletions(-) create mode 100644 hosts/common/cross/kitty-no-docs.patch diff --git a/hosts/common/cross/default.nix b/hosts/common/cross/default.nix index 674ce64ce..5e7ae8819 100644 --- a/hosts/common/cross/default.nix +++ b/hosts/common/cross/default.nix @@ -258,7 +258,6 @@ in # nixpkgs hdf5 is at commit 3e847e003632bdd5fdc189ccbffe25ad2661e16f # hdf5 # configure: error: cannot run test program while cross compiling # http2 - kitty # "FileNotFoundError: [Errno 2] No such file or directory: 'pkg-config'" libgccjit # "../../gcc-9.5.0/gcc/jit/jit-result.c:52:3: error: 'dlclose' was not declared in this scope" (needed by emacs!) # libsForQt5 # qtbase # make: g++: No such file or directory libtiger # "src/tiger_internal.h:24:10: fatal error: pango/pango.h: No such file or directory" @@ -733,10 +732,17 @@ in nativeBuildInputs = orig.nativeBuildInputs ++ [ next.glib next.gtk-doc ]; }); - # kitty = prev.kitty.override { - # # does not solve original error - # inherit (emulated) stdenv; - # }; + kitty = prev.kitty.overrideAttrs (upstream: { + # fixes: "FileNotFoundError: [Errno 2] No such file or directory: 'pkg-config'" + PKGCONFIG_EXE = "${next.buildPackages.pkg-config}/bin/${next.buildPackages.pkg-config.targetPrefix}pkg-config"; + + # when building docs, kitty's setup.py invokes `sphinx`, which tries to load a .so for the host. + # on cross compilation, that fails + KITTY_NO_DOCS = true; + patches = upstream.patches ++ [ + ./kitty-no-docs.patch + ]; + }); libchamplain = prev.libchamplain.overrideAttrs (upstream: { # fixes: "failed to produce output path for output 'devdoc'" diff --git a/hosts/common/cross/kitty-no-docs.patch b/hosts/common/cross/kitty-no-docs.patch new file mode 100644 index 000000000..2bb4bfabc --- /dev/null +++ b/hosts/common/cross/kitty-no-docs.patch @@ -0,0 +1,22 @@ +diff --git a/setup.py b/setup.py +index 2b9d240e..770bc5e7 100755 +--- a/setup.py ++++ b/setup.py +@@ -1092,11 +1092,12 @@ def c(base_path: str, **kw: object) -> None: + + + def create_linux_bundle_gunk(ddir: str, libdir_name: str) -> None: +- if not os.path.exists('docs/_build/html'): +- make = 'gmake' if is_freebsd else 'make' +- run_tool([make, 'docs']) +- copy_man_pages(ddir) +- copy_html_docs(ddir) ++ if not os.getenv('KITTY_NO_DOCS'): ++ if not os.path.exists('docs/_build/html'): ++ make = 'gmake' if is_freebsd else 'make' ++ run_tool([make, 'docs']) ++ copy_man_pages(ddir) ++ copy_html_docs(ddir) + for (icdir, ext) in {'256x256': 'png', 'scalable': 'svg'}.items(): + icdir = os.path.join(ddir, 'share', 'icons', 'hicolor', icdir, 'apps') + safe_makedirs(icdir) From 2fcb0ebfd07e296ee3ea8e005dbff979810354b7 Mon Sep 17 00:00:00 2001 From: Colin Date: Wed, 1 Mar 2023 10:14:48 +0000 Subject: [PATCH 61/67] moby: disable sequioa instead of emulating it --- hosts/by-name/moby/default.nix | 3 +++ hosts/common/cross/default.nix | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/hosts/by-name/moby/default.nix b/hosts/by-name/moby/default.nix index 9d454f482..87c3aa649 100644 --- a/hosts/by-name/moby/default.nix +++ b/hosts/by-name/moby/default.nix @@ -44,6 +44,9 @@ sane.nixcache.enable = true; sane.persist.enable = true; sane.gui.phosh.enable = true; + # sane.programs.consoleUtils.enableFor.user.colin = false; + # sane.programs.guiApps.enableFor.user.colin = false; + sane.programs.sequoia.enableFor.user.colin = false; boot.loader.efi.canTouchEfiVariables = false; # /boot space is at a premium. default was 20. diff --git a/hosts/common/cross/default.nix b/hosts/common/cross/default.nix index 5e7ae8819..835843746 100644 --- a/hosts/common/cross/default.nix +++ b/hosts/common/cross/default.nix @@ -266,7 +266,7 @@ in # qtbase qt5 # qt5.qtx11extras fails, but we can't selectively emulate it qt6 # "You need to set QT_HOST_PATH to cross compile Qt." - sequoia # "/nix/store/q8hg17w47f9xr014g36rdc2gi8fv02qc-clang-aarch64-unknown-linux-gnu-12.0.1-lib/lib/libclang.so.12: cannot open shared object file: No such file or directory"', /build/sequoia-0.27.0-vendor.tar.gz/bindgen/src/lib.rs:1975:31" + # sequoia # "/nix/store/q8hg17w47f9xr014g36rdc2gi8fv02qc-clang-aarch64-unknown-linux-gnu-12.0.1-lib/lib/libclang.so.12: cannot open shared object file: No such file or directory"', /build/sequoia-0.27.0-vendor.tar.gz/bindgen/src/lib.rs:1975:31" # splatmoji # twitter-color-emoji # /nix/store/0wk6nr1mryvylf5g5frckjam7g7p9gpi-bash-5.2-p15/bin/bash: line 1: pkg-config: command not found visidata # python3.10-psycopg2 python3.10-pandas python3.10-h5py From 78ab7b0b807caca391af225c78c7f39ae6fa2f6b Mon Sep 17 00:00:00 2001 From: Colin Date: Wed, 1 Mar 2023 11:33:15 +0000 Subject: [PATCH 62/67] readme: document nixos-rebuild remote deployment --- readme.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/readme.md b/readme.md index 6cd91eeb3..3ea554549 100644 --- a/readme.md +++ b/readme.md @@ -32,6 +32,13 @@ this can then be `dd`'d onto a disk and directly booted from a EFI system. there's some post-processing to do before running a rebuild on the deployed system (deploying ssh keys, optionally changing fs UUIDs, etc). refer to flake.nix for more details. +## remote deployment + +some of my systems support cross compilation (i.e. building from x86-64 for an aarch64 host without using emulation). +- `nixos-rebuild --flake '.#moby-cross' build` +- `sudo nix sign-paths -r -k ./nix-serve.key $(readlink ./result)` (key comes from e.g. secrets/desko.yaml) +- `nixos-rebuild --flake '.#moby-cross' switch --target-host colin@moby --use-remote-sudo` + ## building packages build anything with From d973cb939c0046dd5256639a7db55730f035ca51 Mon Sep 17 00:00:00 2001 From: Colin Date: Wed, 1 Mar 2023 11:35:37 +0000 Subject: [PATCH 63/67] readme: document how to build a host package --- readme.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 3ea554549..367ceef37 100644 --- a/readme.md +++ b/readme.md @@ -52,11 +52,15 @@ on the other hand the `packages` output contains only my own packages. in addition, my packages are placed into both the global scope and a `sane` scope. so use the scoped path when you want to be explicit. - ``` nix build sane.linux-megous ``` +to build a package precisely how a specific host would see it (in case the host's config customizes it): +``` +nix build '.#host-pkgs.moby-cross.xdg-utils' +``` + ## using this repo in your own config this should be a pretty "standard" flake. just reference it, and import either From 4ee31d075af84b6fd3189a0b4dcbefc41eef1670 Mon Sep 17 00:00:00 2001 From: Colin Date: Wed, 1 Mar 2023 13:00:33 +0000 Subject: [PATCH 64/67] readme: document the real key i use to sign packages --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 367ceef37..be82790e0 100644 --- a/readme.md +++ b/readme.md @@ -36,7 +36,7 @@ refer to flake.nix for more details. some of my systems support cross compilation (i.e. building from x86-64 for an aarch64 host without using emulation). - `nixos-rebuild --flake '.#moby-cross' build` -- `sudo nix sign-paths -r -k ./nix-serve.key $(readlink ./result)` (key comes from e.g. secrets/desko.yaml) +- `sudo nix sign-paths -r -k /run/secrets/nix_serve_privkey $(readlink ./result)` - `nixos-rebuild --flake '.#moby-cross' switch --target-host colin@moby --use-remote-sudo` ## building packages From 3caa072d00d7ee38f5ab6cfb822298ec41ba7826 Mon Sep 17 00:00:00 2001 From: Colin Date: Wed, 1 Mar 2023 13:01:41 +0000 Subject: [PATCH 65/67] flake: fix the unstable hashing by `import`ing the nixpatches flake instead of specifying it as input --- flake.lock | 22 ++-------------------- flake.nix | 25 ++++++++++++++++++------- 2 files changed, 20 insertions(+), 27 deletions(-) diff --git a/flake.lock b/flake.lock index ab3bf3727..eb126c0ba 100644 --- a/flake.lock +++ b/flake.lock @@ -31,23 +31,6 @@ "type": "github" } }, - "nixpkgs": { - "inputs": { - "nixpkgs": [ - "nixpkgs-unpatched" - ] - }, - "locked": { - "lastModified": 1, - "narHash": "sha256-AJlQHunLsnhZ8LdYirwIcqD1iojYJEQAdxGfJn9siPs=", - "path": "/nix/store/7s2pgwqd5ch6n53mh2v8hw7d1zp1r654-source/nixpatches", - "type": "path" - }, - "original": { - "path": "/nix/store/7s2pgwqd5ch6n53mh2v8hw7d1zp1r654-source/nixpatches", - "type": "path" - } - }, "nixpkgs-stable": { "locked": { "lastModified": 1676162277, @@ -83,7 +66,6 @@ "root": { "inputs": { "mobile-nixos": "mobile-nixos", - "nixpkgs": "nixpkgs", "nixpkgs-unpatched": "nixpkgs-unpatched", "sops-nix": "sops-nix", "uninsane-dot-org": "uninsane-dot-org" @@ -92,7 +74,7 @@ "sops-nix": { "inputs": { "nixpkgs": [ - "nixpkgs" + "nixpkgs-unpatched" ], "nixpkgs-stable": "nixpkgs-stable" }, @@ -114,7 +96,7 @@ "inputs": { "flake-utils": "flake-utils", "nixpkgs": [ - "nixpkgs" + "nixpkgs-unpatched" ] }, "locked": { diff --git a/flake.nix b/flake.nix index 073b3817c..1fed79d74 100644 --- a/flake.nix +++ b/flake.nix @@ -23,10 +23,12 @@ # nixpkgs-unpatched.url = "github:nixos/nixpkgs?ref=nixos-unstable"; - nixpkgs = { - url = "./nixpatches"; - inputs.nixpkgs.follows = "nixpkgs-unpatched"; - }; + + # nixpkgs = { + # url = "./nixpatches"; + # inputs.nixpkgs.follows = "nixpkgs-unpatched"; + # }; + mobile-nixos = { # url = "github:nixos/mobile-nixos"; @@ -35,17 +37,18 @@ sops-nix = { # url = "github:Mic92/sops-nix"; - inputs.nixpkgs.follows = "nixpkgs"; + # inputs.nixpkgs.follows = "nixpkgs"; + inputs.nixpkgs.follows = "nixpkgs-unpatched"; }; uninsane-dot-org = { url = "git+https://git.uninsane.org/colin/uninsane"; - inputs.nixpkgs.follows = "nixpkgs"; + # inputs.nixpkgs.follows = "nixpkgs"; + inputs.nixpkgs.follows = "nixpkgs-unpatched"; }; }; outputs = { self, - nixpkgs, nixpkgs-unpatched, mobile-nixos, sops-nix, @@ -53,6 +56,14 @@ ... }@inputs: let + # rather than apply our nixpkgs patches as a flake input, do that here instead. + # this (temporarily?) resolves the bad UX wherein a subflake residing in the same git + # repo as the main flake causes the main flake to have an unstable hash. + nixpkgs = (import ./nixpatches/flake.nix).outputs { + self = nixpkgs; + nixpkgs = nixpkgs-unpatched; + }; + nixpkgsCompiledBy = local: nixpkgs.legacyPackages."${local}"; evalHost = { name, local, target }: From dfebedbd6c9860c9cb2146ba9b0a861f119990d0 Mon Sep 17 00:00:00 2001 From: Colin Date: Wed, 1 Mar 2023 23:33:32 +0000 Subject: [PATCH 66/67] flake: make separate `cross` and `emulated` package sets (so i can build non-cross systems again) --- flake.nix | 67 ++++++++++++++++++++++++++++--------------- hosts/instantiate.nix | 3 +- 2 files changed, 46 insertions(+), 24 deletions(-) diff --git a/flake.nix b/flake.nix index 1fed79d74..86b439463 100644 --- a/flake.nix +++ b/flake.nix @@ -56,6 +56,11 @@ ... }@inputs: let + inherit (builtins) attrNames listToAttrs map mapAttrs; + mapAttrs' = f: set: + listToAttrs (map (attr: f attr set.${attr}) (attrNames set)); + # mapAttrs but without the `name` argument + mapAttrValues = f: mapAttrs (_: f); # rather than apply our nixpkgs patches as a flake input, do that here instead. # this (temporarily?) resolves the bad UX wherein a subflake residing in the same git # repo as the main flake causes the main flake to have an unstable hash. @@ -76,11 +81,6 @@ nixosSystem = import ((nixpkgsCompiledBy target).path + "/nixos/lib/eval-config.nix"); in (nixosSystem { - # we use pkgs built for and *by* the target, i.e. emulation, by default. - # cross compilation only happens on explicit access to `pkgs.cross` - # system = target; - # localSystem = local; - # crossSystem = target; modules = [ (import ./hosts/instantiate.nix { localSystem = local; hostName = name; }) self.nixosModules.default @@ -91,25 +91,45 @@ self.overlays.passthru self.overlays.pins ]; - # nixpkgs.crossSystem = target; nixpkgs.hostPlatform = target; - nixpkgs.buildPlatform = local; + # nixpkgs.buildPlatform = local; # set by instantiate.nix instead } ]; }); in { - nixosConfigurations = { - servo = evalHost { name = "servo"; local = "x86_64-linux"; target = "x86_64-linux"; }; - desko = evalHost { name = "desko"; local = "x86_64-linux"; target = "x86_64-linux"; }; - lappy = evalHost { name = "lappy"; local = "x86_64-linux"; target = "x86_64-linux"; }; - moby = evalHost { name = "moby"; local = "aarch64-linux"; target = "aarch64-linux"; }; - # special cross-compiled variant, to speed up deploys from an x86 box to the arm target - # note that these *do* produce different store paths, because the closure for the tools used to cross compile - # v.s. emulate differ. - # so deploying foo-cross and then foo incurs some rebuilding. - moby-cross = evalHost { name = "moby"; local = "x86_64-linux"; target = "aarch64-linux"; }; - rescue = evalHost { name = "rescue"; local = "x86_64-linux"; target = "x86_64-linux"; }; - }; + nixosConfigurations = + let + hosts = { + servo = { name = "servo"; local = "x86_64-linux"; target = "x86_64-linux"; }; + desko = { name = "desko"; local = "x86_64-linux"; target = "x86_64-linux"; }; + lappy = { name = "lappy"; local = "x86_64-linux"; target = "x86_64-linux"; }; + moby = { name = "moby"; local = "x86_64-linux"; target = "aarch64-linux"; }; + rescue = { name = "rescue"; local = "x86_64-linux"; target = "x86_64-linux"; }; + }; + # cross-compiled builds: instead of emulating the host, build using a cross-compiler. + # - these are faster to *build* than the emulated variants (useful when tweaking packages), + # - but fewer of their packages can be found in upstream caches. + cross = mapAttrValues evalHost hosts; + emulated = mapAttrValues + ({name, local, target}: evalHost { + inherit name target; + local = null; + }) + hosts; + prefixAttrs = prefix: attrs: mapAttrs' + (name: value: { + name = prefix + name; + inherit value; + }) + attrs; + in + (prefixAttrs "cross-" cross) // + (prefixAttrs "emulated-" emulated) // { + # prefer native builds for these machines: + inherit (emulated) servo desko lappy rescue; + # prefer cross-compiled builds for these machines: + inherit (cross) moby; + }; # unofficial output # this produces a EFI-bootable .img file (GPT with a /boot partition and a system (/ or /nix) partition). @@ -125,9 +145,10 @@ # - if fs wasn't resized automatically, then `sudo btrfs filesystem resize max /` # - checkout this flake into /etc/nixos AND UPDATE THE FS UUIDS. # - `nixos-rebuild --flake './#' switch` - imgs = builtins.mapAttrs (_: host-dfn: host-dfn.config.system.build.img) self.nixosConfigurations; + imgs = mapAttrValues (host: host.config.system.build.img) self.nixosConfigurations; - host-pkgs = builtins.mapAttrs (_: host-dfn: host-dfn.config.system.build.pkgs) self.nixosConfigurations; + # unofficial output + host-pkgs = mapAttrValues (host: host.config.system.build.pkgs) self.nixosConfigurations; overlays = rec { default = pkgs; @@ -170,8 +191,8 @@ }; # extract only our own packages from the full set - packages = builtins.mapAttrs - (_: full: full.sane // { inherit (full) sane uninsane-dot-org; }) + packages = mapAttrValues + (full: full.sane // { inherit (full) sane uninsane-dot-org; }) self.legacyPackages; apps."x86_64-linux" = diff --git a/hosts/instantiate.nix b/hosts/instantiate.nix index a0e6242aa..0616e1fa6 100644 --- a/hosts/instantiate.nix +++ b/hosts/instantiate.nix @@ -4,7 +4,7 @@ { hostName, localSystem }: # module args -{ config, ... }: +{ config, lib, ... }: { imports = [ @@ -14,6 +14,7 @@ ]; networking.hostName = hostName; + nixpkgs.buildPlatform = lib.mkIf (localSystem != null) localSystem; # nixpkgs.overlays = [ # (next: prev: { From 8352d3aa8fcf131d111715a9db7c6ef0f719892c Mon Sep 17 00:00:00 2001 From: Colin Date: Thu, 2 Mar 2023 00:06:22 +0000 Subject: [PATCH 67/67] overlays/pins.nix: split out the test fixes and only apply them on platforms where we're already building from source --- hosts/common/cross/default.nix | 50 ++++---- hosts/instantiate.nix | 1 + overlays/disable-flakey-tests.nix | 187 ++++++++++++++++++++++++++++++ overlays/pins.nix | 180 ---------------------------- 4 files changed, 213 insertions(+), 205 deletions(-) create mode 100644 overlays/disable-flakey-tests.nix diff --git a/hosts/common/cross/default.nix b/hosts/common/cross/default.nix index 835843746..6bf640470 100644 --- a/hosts/common/cross/default.nix +++ b/hosts/common/cross/default.nix @@ -77,37 +77,43 @@ # - `file result/bin/bash` does show that it uses the interpreter for the glibc, above -{ config, lib, pkgs, ... }: +{ config, lib, options, pkgs, ... }: let - # these are the overlays which we *also* pass through to the cross and emulated package sets. - # TODO: refactor to not specify same overlay in multiple places (here and flake.nix). - overlays = [ + inherit (lib) types mkIf mkOption; + cfg = config.sane.cross; + # "universal" overlay means it applies to all package sets: + # - cross + # - emulated + # - any arch; etc + # these are specified for the primary package set in flake.nix, + # except for the "cross only" universal overlays which we avoid specifying for non-cross builds + # because they don't affect the result -- only the build process -- so we can disable them as an optimization. + crossOnlyUniversalOverlays = [ + (import ./../../../overlays/disable-flakey-tests.nix) + ]; + universalOverlays = [ (import ./../../../overlays/pkgs.nix) (import ./../../../overlays/pins.nix) - ]; - mkCrossFrom = localSystem: pkgs: - import pkgs.path { - inherit localSystem; # localSystem is equivalent to buildPlatform - crossSystem = pkgs.stdenv.hostPlatform.system; - inherit (config.nixpkgs) config; - inherit overlays; - }; + ] ++ crossOnlyUniversalOverlays; + mkEmulated = pkgs: import pkgs.path { # system = pkgs.stdenv.hostPlatform.system; localSystem = pkgs.stdenv.hostPlatform.system; inherit (config.nixpkgs) config; - inherit overlays; + overlays = universalOverlays; }; in { - # options = { - # perlPackageOverrides = lib.mkOption { - # }; - # }; + options = { + sane.cross.enablePatches = mkOption { + type = types.bool; + default = false; + }; + }; - config = { + config = mkIf cfg.enablePatches { # the configuration of which specific package set `pkgs.cross` refers to happens elsewhere; # here we just define them all. @@ -170,14 +176,8 @@ in # Testutf8 # ; }); - nixpkgs.overlays = [ + nixpkgs.overlays = crossOnlyUniversalOverlays ++ [ (next: prev: { - # non-emulated packages build *from* local *for* target. - # for large packages like the linux kernel which are expensive to build under emulation, - # the config can explicitly pull such packages from `pkgs.cross` to do more efficient cross-compilation. - # crossFrom."x86_64-linux" = mkCrossFrom "x86_64-linux" prev; - # crossFrom."aarch64-linux" = mkCrossFrom "aarch64-linux" prev; - emulated = mkEmulated prev; }) # (next: prev: diff --git a/hosts/instantiate.nix b/hosts/instantiate.nix index 0616e1fa6..1f5f445af 100644 --- a/hosts/instantiate.nix +++ b/hosts/instantiate.nix @@ -15,6 +15,7 @@ networking.hostName = hostName; nixpkgs.buildPlatform = lib.mkIf (localSystem != null) localSystem; + sane.cross.enablePatches = localSystem != null; # nixpkgs.overlays = [ # (next: prev: { diff --git a/overlays/disable-flakey-tests.nix b/overlays/disable-flakey-tests.nix new file mode 100644 index 000000000..da21b5656 --- /dev/null +++ b/overlays/disable-flakey-tests.nix @@ -0,0 +1,187 @@ +# disable tests for packages which flake. +# tests will fail for a variety of reasons: +# - they were coded with timeouts that aren't reliable under heavy load. +# - they assume a particular architecture (e.g. x86) whereas i compile on multiple archs. +# - they assume too much about their environment and fail under qemu. +# +(next: prev: { + ell = prev.ell.overrideAttrs (_upstream: { + # 2023/02/11 + # fixes "TEST FAILED in get_random_return_callback at unit/test-dbus-message-fds.c:278: !l_dbus_message_get_error(message, ((void *)0), ((void *)0))" + # unclear *why* this test fails. + doCheck = false; + }); + fish = prev.fish.overrideAttrs (_upstream: { + # 2023/02/28 + # The following tests FAILED: + # 177 - sigint.fish (Failed) + # 241 - torn_escapes.py (Failed) + doCheck = false; + }); + gjs = prev.gjs.overrideAttrs (_upstream: { + # 2023/01/30: one test times out. probably flakey test that only got built because i patched mesa. + doCheck = false; + }); + gssdp = prev.gssdp.overrideAttrs (_upstream: { + # 2023/02/11 + # fixes "ERROR:../tests/test-regression.c:429:test_ggo_7: assertion failed (error == NULL): Failed to set multicast interfaceProtocol not available (gssdp-error, 1)" + doCheck = false; + }); + gupnp = prev.gupnp.overrideAttrs (_upstream: { + # 2023/02/22 + # fixes "Bail out! ERROR:../tests/test-bugs.c:205:test_bgo_696762: assertion failed (error == NULL): Failed to set multicast interfaceProtocol not available (gssdp-erro>" + doCheck = false; + }); + json-glib = prev.json-glib.overrideAttrs (_upstream: { + # 2023/02/11 + # fixes: "15/15 json-glib:docs / doc-check TIMEOUT 30.52s killed by signal 15 SIGTERM" + doCheck = false; + }); + lapack-reference = prev.lapack-reference.overrideAttrs (_upstream: { + # 2023/02/11: test timeouts + # > The following tests FAILED: + # > 93 - LAPACK-xlintstz_ztest_in (Timeout) + # > 98 - LAPACK-xeigtstz_svd_in (Timeout) + # > 99 - LAPACK-xeigtstz_zec_in (Timeout) + doCheck = false; + }); + libadwaita = prev.libadwaita.overrideAttrs (_upstream: { + # 2023/01/30: one test times out. probably flakey test that only got built because i patched mesa. + doCheck = false; + }); + libsecret = prev.libsecret.overrideAttrs (_upstream: { + # 2023/01/30: one test times out. probably flakey test that only got built because i patched mesa. + doCheck = false; + }); + libuv = prev.libuv.overrideAttrs (_upstream: { + # 2023/02/11 + # 2 tests fail: + # - not ok 261 - tcp_bind6_error_addrinuse + # - not ok 267 - tcp_bind_error_addrinuse_listen + doCheck = false; + }); + + llvmPackages_12 = + let + tools = prev.llvmPackages_12.tools.extend (self: super: { + libllvm = super.libllvm.overrideAttrs (upstream: { + # 2023/02/21: fix: "FAIL: LLVM-Unit :: ExecutionEngine/MCJIT/./MCJITTests/MCJITTest.return_global (2857 of 42084)" + # - nix log /nix/store/6vydavlxh1gvs0vmrkcx9qp67g3h7kcz-llvm-12.0.1.drv + # - wanted by sequoia, rav1e, rustc-1.66.1 (is this right?) + doCheck = false; + # upstream sets this with `rec`; TODO: have upstream refer to the final overrideAttrs version of the derivation instead of using rec. + cmakeFlags = next.lib.remove "-DLLVM_BUILD_TESTS=ON" upstream.cmakeFlags; + }); + }); + in + # see + # - we copy their strategy / attrset mutilation + prev.llvmPackages_12 // { inherit tools; } // tools; + + llvmPackages_14 = + let + tools = prev.llvmPackages_14.tools.extend (self: super: { + libllvm = super.libllvm.overrideAttrs (upstream: { + # 2023/02/21: fix: "FAIL: LLVM-Unit :: ExecutionEngine/MCJIT/./MCJITTests/MCJITMultipleModuleTest.two_module_global_variables_case (43769 of 46988)" + # - nix log /nix/store/ib2yw6sajnhlmibxkrn7lj7chllbr85h-llvm-14.0.6.drv + # - wanted by clang-11-12-LLVMgold-path, compiler-rt-libc-12.0.1, clang-wrapper-12.0.1 (is this right?) + doCheck = false; + # upstream sets this with `rec`; TODO: have upstream refer to the final overrideAttrs version of the derivation instead of using rec. + cmakeFlags = next.lib.remove "-DLLVM_BUILD_TESTS=ON" upstream.cmakeFlags; + }); + }); + in + # see + # - we copy their strategy / attrset mutilation + prev.llvmPackages_14 // { inherit tools; } // tools; + + llvmPackages_15 = + let + tools = prev.llvmPackages_15.tools.extend (self: super: { + libllvm = super.libllvm.override { + # 2023/02/21: fix: "FAIL: LLVM-Unit :: ExecutionEngine/MCJIT/./MCJITTests/..." + # llvm15 passes doCheck as a call arg, so we don't need to set cmakeFlags explicitly as in previous versions + doCheck = false; + }; + }); + in + prev.llvmPackages_15 // { inherit tools; } // tools; + + modemmanager = prev.modemmanager.overrideAttrs (_upstream: { + # 2023/02/25 + # "ERROR:test-modem-helpers.c:257:test_cmgl_response: assertion failed: (list != NULL)" + doCheck = false; + doInstallCheck = false; # tests are run during install check?? + }); + + pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [ + (py-next: py-prev: { + ipython = py-prev.ipython.overridePythonAttrs (upstream: { + # > FAILED IPython/core/tests/test_debugger.py::test_xmode_skip - pexpect.exceptions.TIMEOUT: Timeout exceeded. + # > FAILED IPython/core/tests/test_debugger.py::test_decorator_skip - pexpect.exceptions.TIMEOUT: Timeout exceeded. + # > FAILED IPython/core/tests/test_debugger.py::test_decorator_skip_disabled - pexpect.exceptions.TIMEOUT: Timeout exceeded. + # > FAILED IPython/core/tests/test_debugger.py::test_decorator_skip_with_breakpoint - pexpect.exceptions.TIMEOUT: Timeout exceeded. + # > FAILED IPython/core/tests/test_debugger.py::test_where_erase_value - pexpect.exceptions.TIMEOUT: Timeout exceeded. + # > FAILED IPython/terminal/tests/test_debug_magic.py::test_debug_magic_passes_through_generators - pexpect.exceptions.TIMEOUT: Timeout exceeded. + # > FAILED IPython/terminal/tests/test_embed.py::test_nest_embed - pexpect.exceptions.TIMEOUT: Timeout exceeded. + disabledTestPaths = upstream.disabledTestPaths or [] ++ [ + "IPython/core/tests/test_debugger.py" + "IPython/terminal/tests/test_debug_magic.py" + "IPython/terminal/tests/test_embed.py" + ]; + }); + pytest-xdist = py-prev.pytest-xdist.overridePythonAttrs (upstream: { + # 2023/02/19 + # 4 tests fail: + # - FAILED: testing/test_remote.py::TestWorkInteractor::* - execnet.gateway_base.TimeoutError: no item after 10.0 seconds + # doCheck = false; + disabledTestPaths = upstream.disabledTestPaths or [] ++ [ + "testing/test_remote.py" + ]; + # disabledTests = upstream.disabledTests or [] ++ [ + # "test_basic_collect_and_runtests" + # "test_remote_collect_fail" + # "test_remote_collect_skip" + # "test_runtests_all" + # ]; + }); + twisted = py-prev.twisted.overridePythonAttrs (upstream: { + # 2023/02/25 + # ``` + # [ERROR] + # Traceback (most recent call last): + # File "/nix/store/dcnsxrn8rsfk1dghah7md5glbbnfysq3-python3.10-twisted-22.10.0/lib/python3.10/site-packages/twisted/test/test_udp.py", line 645, in test_interface + # self.assertEqual(self.client.transport.getOutgoingInterface(), "0.0.0.0") + # File "/nix/store/dcnsxrn8rsfk1dghah7md5glbbnfysq3-python3.10-twisted-22.10.0/lib/python3.10/site-packages/twisted/internet/udp.py", line 449, in getOutgoingInterface + # i = self.socket.getsockopt(socket.IPPROTO_IP, socket.IP_MULTICAST_IF) + # builtins.OSError: [Errno 92] Protocol not available + # + # twisted.test.test_udp.MulticastTests.test_interface + # ``` + postPatch = upstream.postPatch + '' + echo 'MulticastTests.test_interface.skip = "Protocol not available"'>> src/twisted/test/test_udp.py + ''; + }); + }) + ]; + strp = prev.srtp.overrideAttrs (_upstream: { + # 2023/02/11 + # roc_driver test times out after 30s + doCheck = false; + }); + tracker = prev.tracker.overrideAttrs (_upstream: { + # 2023/02/22 + # "27/37 tracker:core / service TIMEOUT 60.37s killed by signal 15 SIGTERM" + doCheck = false; + }); + udisks2 = prev.udisks2.overrideAttrs (_upstream: { + # 2023/02/25 + # "udisks-test:ERROR:test.c:61:on_completed_expect_failure: assertion failed (message == expected_message): ("Command-line `./udisks-test-helper 4' was signaled with signal SIGSEGV (11):\nstdout: `OK, deliberately causing a segfault\n'\nstderr: `qemu: uncaught target signal 11 (Segmentation fault) - core dumped\n'" == "Command-line `./udisks-test-helper 4' was signaled with signal SIGSEGV (11): OK, deliberately causing a segfault\n")" + doCheck = false; + }); + upower = prev.upower.overrideAttrs (_upstream: { + # 2023/02/25 + # "Tests.test_battery_state_guessing TIMEOUT 60.80s killed by signal 15 SIGTERM" + doCheck = false; + }); +}) diff --git a/overlays/pins.nix b/overlays/pins.nix index e5178a915..5c3819373 100644 --- a/overlays/pins.nix +++ b/overlays/pins.nix @@ -15,184 +15,4 @@ # so just forward the unstable packages. inherit (next.stable or prev) ; - - ell = prev.ell.overrideAttrs (_upstream: { - # 2023/02/11 - # fixes "TEST FAILED in get_random_return_callback at unit/test-dbus-message-fds.c:278: !l_dbus_message_get_error(message, ((void *)0), ((void *)0))" - # unclear *why* this test fails. - doCheck = false; - }); - fish = prev.fish.overrideAttrs (_upstream: { - # 2023/02/28 - # The following tests FAILED: - # 177 - sigint.fish (Failed) - # 241 - torn_escapes.py (Failed) - doCheck = false; - }); - gjs = prev.gjs.overrideAttrs (_upstream: { - # 2023/01/30: one test times out. probably flakey test that only got built because i patched mesa. - doCheck = false; - }); - gssdp = prev.gssdp.overrideAttrs (_upstream: { - # 2023/02/11 - # fixes "ERROR:../tests/test-regression.c:429:test_ggo_7: assertion failed (error == NULL): Failed to set multicast interfaceProtocol not available (gssdp-error, 1)" - doCheck = false; - }); - gupnp = prev.gupnp.overrideAttrs (_upstream: { - # 2023/02/22 - # fixes "Bail out! ERROR:../tests/test-bugs.c:205:test_bgo_696762: assertion failed (error == NULL): Failed to set multicast interfaceProtocol not available (gssdp-erro>" - doCheck = false; - }); - json-glib = prev.json-glib.overrideAttrs (_upstream: { - # 2023/02/11 - # fixes: "15/15 json-glib:docs / doc-check TIMEOUT 30.52s killed by signal 15 SIGTERM" - doCheck = false; - }); - lapack-reference = prev.lapack-reference.overrideAttrs (_upstream: { - # 2023/02/11: test timeouts - # > The following tests FAILED: - # > 93 - LAPACK-xlintstz_ztest_in (Timeout) - # > 98 - LAPACK-xeigtstz_svd_in (Timeout) - # > 99 - LAPACK-xeigtstz_zec_in (Timeout) - doCheck = false; - }); - libadwaita = prev.libadwaita.overrideAttrs (_upstream: { - # 2023/01/30: one test times out. probably flakey test that only got built because i patched mesa. - doCheck = false; - }); - libsecret = prev.libsecret.overrideAttrs (_upstream: { - # 2023/01/30: one test times out. probably flakey test that only got built because i patched mesa. - doCheck = false; - }); - libuv = prev.libuv.overrideAttrs (_upstream: { - # 2023/02/11 - # 2 tests fail: - # - not ok 261 - tcp_bind6_error_addrinuse - # - not ok 267 - tcp_bind_error_addrinuse_listen - doCheck = false; - }); - - llvmPackages_12 = - let - tools = prev.llvmPackages_12.tools.extend (self: super: { - libllvm = super.libllvm.overrideAttrs (upstream: { - # 2023/02/21: fix: "FAIL: LLVM-Unit :: ExecutionEngine/MCJIT/./MCJITTests/MCJITTest.return_global (2857 of 42084)" - # - nix log /nix/store/6vydavlxh1gvs0vmrkcx9qp67g3h7kcz-llvm-12.0.1.drv - # - wanted by sequoia, rav1e, rustc-1.66.1 (is this right?) - doCheck = false; - # upstream sets this with `rec`; TODO: have upstream refer to the final overrideAttrs version of the derivation instead of using rec. - cmakeFlags = next.lib.remove "-DLLVM_BUILD_TESTS=ON" upstream.cmakeFlags; - }); - }); - in - # see - # - we copy their strategy / attrset mutilation - prev.llvmPackages_12 // { inherit tools; } // tools; - - llvmPackages_14 = - let - tools = prev.llvmPackages_14.tools.extend (self: super: { - libllvm = super.libllvm.overrideAttrs (upstream: { - # 2023/02/21: fix: "FAIL: LLVM-Unit :: ExecutionEngine/MCJIT/./MCJITTests/MCJITMultipleModuleTest.two_module_global_variables_case (43769 of 46988)" - # - nix log /nix/store/ib2yw6sajnhlmibxkrn7lj7chllbr85h-llvm-14.0.6.drv - # - wanted by clang-11-12-LLVMgold-path, compiler-rt-libc-12.0.1, clang-wrapper-12.0.1 (is this right?) - doCheck = false; - # upstream sets this with `rec`; TODO: have upstream refer to the final overrideAttrs version of the derivation instead of using rec. - cmakeFlags = next.lib.remove "-DLLVM_BUILD_TESTS=ON" upstream.cmakeFlags; - }); - }); - in - # see - # - we copy their strategy / attrset mutilation - prev.llvmPackages_14 // { inherit tools; } // tools; - - llvmPackages_15 = - let - tools = prev.llvmPackages_15.tools.extend (self: super: { - libllvm = super.libllvm.override { - # 2023/02/21: fix: "FAIL: LLVM-Unit :: ExecutionEngine/MCJIT/./MCJITTests/..." - # llvm15 passes doCheck as a call arg, so we don't need to set cmakeFlags explicitly as in previous versions - doCheck = false; - }; - }); - in - prev.llvmPackages_15 // { inherit tools; } // tools; - - modemmanager = prev.modemmanager.overrideAttrs (_upstream: { - # 2023/02/25 - # "ERROR:test-modem-helpers.c:257:test_cmgl_response: assertion failed: (list != NULL)" - doCheck = false; - doInstallCheck = false; # tests are run during install check?? - }); - - pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [ - (py-next: py-prev: { - ipython = py-prev.ipython.overridePythonAttrs (upstream: { - # > FAILED IPython/core/tests/test_debugger.py::test_xmode_skip - pexpect.exceptions.TIMEOUT: Timeout exceeded. - # > FAILED IPython/core/tests/test_debugger.py::test_decorator_skip - pexpect.exceptions.TIMEOUT: Timeout exceeded. - # > FAILED IPython/core/tests/test_debugger.py::test_decorator_skip_disabled - pexpect.exceptions.TIMEOUT: Timeout exceeded. - # > FAILED IPython/core/tests/test_debugger.py::test_decorator_skip_with_breakpoint - pexpect.exceptions.TIMEOUT: Timeout exceeded. - # > FAILED IPython/core/tests/test_debugger.py::test_where_erase_value - pexpect.exceptions.TIMEOUT: Timeout exceeded. - # > FAILED IPython/terminal/tests/test_debug_magic.py::test_debug_magic_passes_through_generators - pexpect.exceptions.TIMEOUT: Timeout exceeded. - # > FAILED IPython/terminal/tests/test_embed.py::test_nest_embed - pexpect.exceptions.TIMEOUT: Timeout exceeded. - disabledTestPaths = upstream.disabledTestPaths or [] ++ [ - "IPython/core/tests/test_debugger.py" - "IPython/terminal/tests/test_debug_magic.py" - "IPython/terminal/tests/test_embed.py" - ]; - }); - pytest-xdist = py-prev.pytest-xdist.overridePythonAttrs (upstream: { - # 2023/02/19 - # 4 tests fail: - # - FAILED: testing/test_remote.py::TestWorkInteractor::* - execnet.gateway_base.TimeoutError: no item after 10.0 seconds - # doCheck = false; - disabledTestPaths = upstream.disabledTestPaths or [] ++ [ - "testing/test_remote.py" - ]; - # disabledTests = upstream.disabledTests or [] ++ [ - # "test_basic_collect_and_runtests" - # "test_remote_collect_fail" - # "test_remote_collect_skip" - # "test_runtests_all" - # ]; - }); - twisted = py-prev.twisted.overridePythonAttrs (upstream: { - # 2023/02/25 - # ``` - # [ERROR] - # Traceback (most recent call last): - # File "/nix/store/dcnsxrn8rsfk1dghah7md5glbbnfysq3-python3.10-twisted-22.10.0/lib/python3.10/site-packages/twisted/test/test_udp.py", line 645, in test_interface - # self.assertEqual(self.client.transport.getOutgoingInterface(), "0.0.0.0") - # File "/nix/store/dcnsxrn8rsfk1dghah7md5glbbnfysq3-python3.10-twisted-22.10.0/lib/python3.10/site-packages/twisted/internet/udp.py", line 449, in getOutgoingInterface - # i = self.socket.getsockopt(socket.IPPROTO_IP, socket.IP_MULTICAST_IF) - # builtins.OSError: [Errno 92] Protocol not available - # - # twisted.test.test_udp.MulticastTests.test_interface - # ``` - postPatch = upstream.postPatch + '' - echo 'MulticastTests.test_interface.skip = "Protocol not available"'>> src/twisted/test/test_udp.py - ''; - }); - }) - ]; - strp = prev.srtp.overrideAttrs (_upstream: { - # 2023/02/11 - # roc_driver test times out after 30s - doCheck = false; - }); - tracker = prev.tracker.overrideAttrs (_upstream: { - # 2023/02/22 - # "27/37 tracker:core / service TIMEOUT 60.37s killed by signal 15 SIGTERM" - doCheck = false; - }); - udisks2 = prev.udisks2.overrideAttrs (_upstream: { - # 2023/02/25 - # "udisks-test:ERROR:test.c:61:on_completed_expect_failure: assertion failed (message == expected_message): ("Command-line `./udisks-test-helper 4' was signaled with signal SIGSEGV (11):\nstdout: `OK, deliberately causing a segfault\n'\nstderr: `qemu: uncaught target signal 11 (Segmentation fault) - core dumped\n'" == "Command-line `./udisks-test-helper 4' was signaled with signal SIGSEGV (11): OK, deliberately causing a segfault\n")" - doCheck = false; - }); - upower = prev.upower.overrideAttrs (_upstream: { - # 2023/02/25 - # "Tests.test_battery_state_guessing TIMEOUT 60.80s killed by signal 15 SIGTERM" - doCheck = false; - }); })