2023-02-07 09:46:13 +00:00
# cross compiling
2023-02-11 00:50:46 +00:00
# - for edge-casey things, see in nixpkgs:
# - `git show da9a9a440415b236f22f57ba67a24ab3fb53f595`
# - e.g. `mesonEmulatorHook`, `depsBuildBuild`, `python3.pythonForBuild`
# - <doc/stdenv/cross-compilation.chapter.md>
# - e.g. `makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];`
2023-02-08 22:30:27 +00:00
#
# 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'`
2023-02-11 00:50:46 +00:00
# - qt: `nix build '.#host-pkgs.moby-cross.qt5.qtbase'`
# - qt: `nix build '.#host-pkgs.moby-cross.libsForQt5.phonon'`
2023-02-08 22:30:27 +00:00
# most of these can be built in a nixpkgs source root like:
# - `nix build '.#pkgsCross.aarch64-multiplatform.xdg-utils'`
2023-02-14 10:19:32 +00:00
# - `nix build '.#pkgsCross.gnu64.xdg-utils'` # for x86_64-linux
2023-02-08 22:30:27 +00:00
#
# tracking issues, PRs:
# - libuv tests fail: <https://github.com/NixOS/nixpkgs/issues/190807>
# - last checked: 2023-02-07
# - opened: 2022-09-11
# - perl Module Build broken: <https://github.com/NixOS/nixpkgs/issues/66741>
# - last checked: 2023-02-07
# - opened: 2019-08
2023-02-14 10:19:32 +00:00
# - 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 <pkgs/development/interpreters/perl/default.nix>
# - stubbing documented at bottom: <nixpkgs:doc/languages-frameworks/perl.section.md>
#
2023-02-08 22:30:27 +00:00
# - perl536Packages.Testutf8 fails to cross: <https://github.com/NixOS/nixpkgs/issues/198548>
# - last checked: 2023-02-07
# - opened: 2022-10
# - python310Packages.psycopg2: <https://github.com/NixOS/nixpkgs/issues/210265>
# - last checked: 2023-02-06
# - i have a potential fix:
# """
# i was able to just add `postgresql` to the `buildInputs` (so that it's in both `buildInputs` and `nativeBuildInputs`):
# it fixed the build for `pkgsCross.aarch64-multiplatform.python310Packages.psycopg2` but not for `armv7l-hf-multiplatform` that this issue description calls out.
#
# also i haven't deployed it yet to make sure this doesn't cause anything funky at runtime though.
# """
2023-02-14 10:19:32 +00:00
# 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 `<machine>` (don't specifiy local/targetSystem) and `<machine>-cross` target.
# - `desko-cross` will be broken but `desko` can work
# - see <nixpkgs:pkgs/stdenv/linux/default.nix>
# - 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
2023-02-07 09:46:13 +00:00
2023-02-06 22:41:32 +00:00
{ config , lib , pkgs , . . . }:
2023-01-11 08:56:06 +00:00
2023-01-13 04:39:20 +00:00
let
2023-02-05 19:36:42 +00:00
# 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 {
2023-02-14 10:19:32 +00:00
# system = pkgs.stdenv.hostPlatform.system;
2023-02-05 19:36:42 +00:00
localSystem = pkgs . stdenv . hostPlatform . system ;
inherit ( config . nixpkgs ) config ;
inherit overlays ;
} ;
2023-01-13 04:39:20 +00:00
in
2023-01-11 08:56:06 +00:00
{
2023-02-06 22:41:32 +00:00
# options = {
# perlPackageOverrides = lib.mkOption {
# };
# };
2023-02-05 19:36:42 +00:00
2023-02-06 22:41:32 +00:00
config = {
# the configuration of which specific package set `pkgs.cross` refers to happens elsewhere;
# here we just define them all.
2023-02-14 10:19:32 +00:00
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 = " M o d u l e - B u i l d " ;
version = " 0 . 4 2 3 1 " ;
src = fetchurl {
url = " m i r r o r : / / c p a n / a u t h o r s / i d / L / L E / L E O N T / M o d u l e - B u i l d - 0 . 4 2 3 1 . t a r . g z " ;
hash = " s h a 2 5 6 - f g 9 M a S w X Q M G s h O o U 1 + o 9 i 8 e Y s v s m w J h 3 I p 4 E 9 D C y t x c = " ;
} ;
# 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 = " B u i l d a n d i n s t a l l P e r l m o d u l e s " ;
license = with lib . licenses ; [ artistic1 gpl1Plus ] ;
mainProgram = " c o n f i g _ d a t a " ;
} ;
} ;
FileBaseDir = buildPerlModule {
version = " 0 . 0 8 " ;
pname = " F i l e - B a s e D i r " ;
src = fetchurl {
url = " m i r r o r : / / c p a n / a u t h o r s / i d / K / K I / K I M R Y A N / F i l e - B a s e D i r - 0 . 0 8 . t a r . g z " ;
hash = " s h a 2 5 6 - w G X 8 0 + L y K u d p k 3 v M l x u R + A K U 1 Q C f r B Q L + 6 g 7 9 9 N T B e M = " ;
} ;
configurePhase = ''
runHook preConfigure
perl Build . PL PREFIX = " $ o u t " prefix = " $ o u t "
'' ;
nativeBuildInputs = [ perl ] ;
propagatedBuildInputs = [ IPCSystemSimple ] ;
buildInputs = [ FileWhich ] ;
meta = {
description = " U s e t h e F r e e d e s k t o p . o r g b a s e d i r e c t o r y s p e c i f i c a t i o n " ;
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 = " T e s t - u t f 8 " ;
version = " 1 . 0 2 " ;
src = fetchurl {
url = " m i r r o r : / / c p a n / a u t h o r s / i d / M / M A / M A R K F / T e s t - u t f 8 - 1 . 0 2 . t a r . g z " ;
hash = " s h a 2 5 6 - 3 4 L w n F l A g w s l p J 8 c g W L 6 J N N x 5 g K I D t 7 4 2 a T U v 9 Z r i 9 c = " ;
} ;
nativeBuildInputs = [ perl ] ;
meta = {
description = " H a n d y u t f 8 t e s t s " ;
homepage = " h t t p s : / / g i t h u b . c o m / 2 s h o r t p l a n k s / T e s t - u t f 8 / t r e e " ;
license = with lib . licenses ; [ artistic1 gpl1Plus ] ;
} ;
} ;
# inherit (pkgs.emulated.perl.pkgs)
# Testutf8
# ;
} ) ;
2023-02-06 22:41:32 +00:00
nixpkgs . overlays = [
2023-02-10 00:46:04 +00:00
( next : prev : {
2023-02-06 22:41:32 +00:00
# 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.
2023-02-14 10:19:32 +00:00
# crossFrom."x86_64-linux" = mkCrossFrom "x86_64-linux" prev;
# crossFrom."aarch64-linux" = mkCrossFrom "aarch64-linux" prev;
2023-02-06 22:41:32 +00:00
emulated = mkEmulated prev ;
} )
2023-02-14 10:19:32 +00:00
# (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 <new>"
# # 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:
# # - <nixpkgs:pkgs/development/libraries/gcc/libstdc++/5.nix>
# # - <nixpkgs:pkgs/build-support/cc-wrapper/add-flags.sh>
# # 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}"));
# }));
} ) ;
} )
2023-02-06 22:41:32 +00:00
( next : prev :
let
emulated = prev . emulated ;
2023-02-14 10:19:32 +00:00
# emulated = if prev.stdenv.buildPlatform.system == prev.stdenv.hostPlatform.system then
# prev
# else
# prev.emulated;
2023-02-06 22:41:32 +00:00
in {
# packages which don't cross compile
inherit ( emulated )
# adwaita-qt # psqlodbc
2023-02-10 00:46:04 +00:00
apacheHttpd_2_4 # `configure: error: Size of "void *" is less than size of "long"`
2023-02-07 09:46:13 +00:00
# duplicity # python3.10-s3transfer
2023-02-08 22:30:27 +00:00
fwupd-efi # efi/meson.build:162:0: ERROR: Program or command 'gcc' not found or not executable
2023-02-21 00:05:37 +00:00
# gdk-pixbuf # cross-compiled version doesn't output bin/gdk-pixbuf-thumbnailer (used by webp-pixbuf-loader
2023-02-10 00:46:04 +00:00
gmime3 # "checking preferred charset formats for system iconv... cannot run test program while cross compiling"
2023-02-07 09:46:13 +00:00
# gnome-tour
2023-02-11 00:50:46 +00:00
# XXX: gnustep members aren't individually overridable, because the "scope" uses `rec` such that members don't see overrides
2023-02-09 01:05:25 +00:00
gnustep # gnustep.base: "configure: error: Your compiler does not appear to implement the -fconstant-string-class option needed for support of strings."
2023-02-06 22:41:32 +00:00
# grpc
2023-02-24 10:50:00 +00:00
# nixpkgs hdf5 is at commit 3e847e003632bdd5fdc189ccbffe25ad2661e16f
2023-02-11 00:50:46 +00:00
# hdf5 # configure: error: cannot run test program while cross compiling
2023-02-09 01:05:25 +00:00
# http2
ibus # configure.ac:152: error: possibly undefined macro: AM_PATH_GLIB_2_0
2023-02-10 00:46:04 +00:00
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"
2023-02-11 00:50:46 +00:00
# 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"
2023-02-14 10:19:32 +00:00
# perlInterpreters # perl5.36.0-Module-Build perl5.36.0-Test-utf8 (see tracking issues ^)
2023-02-09 06:13:23 +00:00
phosh # libadwaita-1 not found
2023-02-06 22:41:32 +00:00
# qgnomeplatform
# qtbase
2023-02-11 00:50:46 +00:00
qt5 # qt5.qtx11extras fails, but we can't selectively emulate it
qt6 # "You need to set QT_HOST_PATH to cross compile Qt."
2023-02-10 00:46:04 +00:00
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"
2023-02-06 22:41:32 +00:00
# splatmoji
2023-02-08 22:30:27 +00:00
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
2023-02-07 09:46:13 +00:00
visidata # python3.10-psycopg2 python3.10-pandas python3.10-h5py
2023-02-08 22:30:27 +00:00
# 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
2023-02-06 22:41:32 +00:00
;
2023-02-08 22:30:27 +00:00
2023-02-11 00:50:46 +00:00
# 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 ;
} ;
} ;
2023-02-09 01:05:25 +00:00
# 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;
# };
2023-02-10 00:46:04 +00:00
# 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 ];
# });
2023-02-20 20:24:37 +00:00
# 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
] ;
} ) ;
2023-02-09 01:05:25 +00:00
2023-02-10 00:46:04 +00:00
blueman = prev . blueman . overrideAttrs ( orig : {
2023-02-09 01:05:25 +00:00
# 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 ;
} ;
2023-02-11 00:50:46 +00:00
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 ;
} ;
2023-02-09 01:05:25 +00:00
cdrtools = prev . cdrtools . override {
# "configure: error: installation or configuration problem: C compiler cc not found."
inherit ( emulated ) stdenv ;
} ;
2023-02-11 00:50:46 +00:00
2023-02-09 01:05:25 +00:00
# colord = prev.colord.override {
# # doesn't fix: "ld: error adding symbols: file in wrong format"
# inherit (emulated) stdenv;
# };
2023-02-20 20:24:37 +00:00
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
] ;
} ) ;
2023-02-09 01:05:25 +00:00
2023-02-11 00:50:46 +00:00
dante = prev . dante . override {
# fixes: "configure: error: error: getaddrinfo() error value count too low"
inherit ( emulated ) stdenv ;
} ;
2023-02-26 11:29:15 +00:00
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 ;
} ) ;
2023-02-11 00:50:46 +00:00
emacs = prev . emacs . override {
# fixes "configure: error: cannot run test program while cross compiling"
inherit ( emulated ) stdenv ;
} ;
2023-02-24 10:31:35 +00:00
flatpak = prev . flatpak . overrideAttrs ( upstream : {
# fixes "No package 'libxml-2.0' found"
buildInputs = upstream . buildInputs ++ [ next . libxml2 ] ;
configureFlags = upstream . configureFlags ++ [
" - - e n a b l e - s e l i n u x - m o d u l e = n o " # fixes "checking for /usr/share/selinux/devel/Makefile... configure: error: cannot check for file existence when cross compiling"
" - - d i s a b l e - g t k - d o c " # fixes "You must have gtk-doc >= 1.20 installed to build documentation for Flatpak"
] ;
} ) ;
2023-02-11 00:50:46 +00:00
2023-02-23 12:11:33 +00:00
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 ] ;
} ) ;
2023-02-11 00:50:46 +00:00
2023-02-09 01:05:25 +00:00
# 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;
# };
2023-02-11 00:50:46 +00:00
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 " - D d o c s = e n a b l e d " orig . mesonFlags ) ++ [ " - D d o c s = d i s a b l e d " ] ;
outputs = lib . remove " d e v d o c " 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;
# };
2023-02-09 01:05:25 +00:00
2023-02-11 00:50:46 +00:00
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 ] ;
} ) ;
2023-02-09 01:05:25 +00:00
gmime = prev . gmime . overrideAttrs ( orig : {
# "checking preferred charset formats for system iconv... cannot run test program while cross compiling"
configureFlags = orig . configureFlags ++ [ " a c _ c v _ h a v e _ i c o n v _ d e t e c t _ h = n o " ] ;
} ) ;
2023-02-11 00:50:46 +00:00
2023-02-10 00:46:04 +00:00
# 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" ];
# });
2023-02-11 00:50:46 +00:00
# gmime3 = prev.gmime3.override {
# # doesn't fix
# inherit (emulated) stdenv;
# };
2023-02-09 01:05:25 +00:00
gnome = prev . gnome . overrideScope' ( self : super : {
inherit ( emulated . gnome )
2023-02-09 06:13:23 +00:00
gnome-shell # "meson.build:128:0: ERROR: Program 'gjs' not found or not executable"
2023-02-09 01:05:25 +00:00
;
2023-02-11 00:50:46 +00:00
# dconf-editor = super.dconf-editor.override {
# # fails to fix original error
# inherit (emulated) stdenv;
# };
2023-02-26 11:29:15 +00:00
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 ] ;
} ) ;
2023-02-10 00:46:04 +00:00
evince = super . evince . overrideAttrs ( orig : {
# fixes (meson) "Run-time dependency gi-docgen found: NO (tried pkgconfig and cmake)"
# inspired by gupnp
outputs = [ " o u t " " d e v " ]
++ lib . optionals ( prev . stdenv . buildPlatform == prev . stdenv . hostPlatform ) [ " d e v d o c " ] ;
mesonFlags = orig . mesonFlags ++ [
" - D g t k _ d o c = ${ lib . boolToString ( prev . stdenv . buildPlatform == prev . stdenv . hostPlatform ) } "
] ;
} ) ;
2023-02-27 21:29:55 +00:00
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"
# ];
} ) ;
2023-02-22 09:03:15 +00:00
# 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 ] ;
} ) ;
2023-02-10 00:46:04 +00:00
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;
# };
2023-02-11 00:50:46 +00:00
# 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 ] ;
} ) ;
2023-02-10 00:46:04 +00:00
gnome-remote-desktop = super . gnome-remote-desktop . overrideAttrs ( orig : {
2023-02-09 07:58:32 +00:00
# TODO: remove gnome-remote-desktop (wanted by gnome-control-center)
2023-02-10 00:46:04 +00:00
# fixes: "Program gdbus-codegen found: NO"
nativeBuildInputs = orig . nativeBuildInputs ++ [ next . glib ] ;
} ) ;
# 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;
# };
2023-02-11 00:50:46 +00:00
# gnome-shell = super.gnome-shell.overrideAttrs (orig: {
# # does not solve original error
# nativeBuildInputs = orig.nativeBuildInputs ++ [ next.mesonEmulatorHook ];
# });
2023-02-10 00:46:04 +00:00
# gnome-settings-daemon = super.gnome-settings-daemon.overrideAttrs (orig: {
2023-02-11 00:50:46 +00:00
# # does not fix original error
# nativeBuildInputs = orig.nativeBuildInputs ++ [ next.mesonEmulatorHook ];
# });
2023-02-23 08:17:50 +00:00
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 / d i s a b l e d _ p l u g i n s = \[ \] / d i s a b l e d _ p l u g i n s = [ ' p o w e r ' ] / " plugins/meson.build
'' ;
} ) ;
2023-02-10 00:46:04 +00:00
gnome-session = super . gnome-session . overrideAttrs ( orig : {
# fixes: "gdbus-codegen not found or executable"
2023-02-09 07:58:32 +00:00
nativeBuildInputs = orig . nativeBuildInputs ++ [ next . glib ] ;
} ) ;
2023-02-11 00:50:46 +00:00
# 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 ] ;
} ) ;
2023-02-10 00:46:04 +00:00
gnome-user-share = super . gnome-user-share . overrideAttrs ( orig : {
# fixes: meson.build:111:6: ERROR: Program 'glib-compile-schemas' not found or not executable
2023-02-09 07:58:32 +00:00
nativeBuildInputs = orig . nativeBuildInputs ++ [ next . glib ] ;
} ) ;
2023-02-23 08:35:59 +00:00
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 " - D d o c s = t r u e " orig . mesonFlags )
++ [ " - D i n t r o s p e c t i o n = f a l s e " ] ;
outputs = lib . remove " d e v d o c " orig . outputs ;
} ) ;
2023-02-11 00:50:46 +00:00
# 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 ] ;
} ) ;
2023-02-08 22:30:27 +00:00
} ) ;
2023-02-09 01:05:25 +00:00
2023-02-11 00:50:46 +00:00
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 = [ " o u t " " d e v " ]
++ lib . optionals ( prev . stdenv . buildPlatform == prev . stdenv . hostPlatform ) [ " d e v d o c " ] ;
mesonFlags = [
" - D g t k _ d o c = ${ lib . boolToString ( prev . stdenv . buildPlatform == prev . stdenv . hostPlatform ) } "
" - D i n t r o s p e c t i o n = ${ 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.
" - D p y t h o n = d i s a b l e d "
] ;
} ) ;
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;
# };
} ;
2023-02-24 10:50:00 +00:00
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 {
2023-02-11 00:50:46 +00:00
# inherit (emulated) stdenv;
# };
2023-02-09 01:05:25 +00:00
# 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;
# };
2023-02-11 00:50:46 +00:00
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;
# };
2023-02-22 01:41:56 +00:00
libchamplain = prev . libchamplain . overrideAttrs ( upstream : {
# fixes: "failed to produce output path for output 'devdoc'"
outputs = lib . remove " d e v d o c " upstream . outputs ;
} ) ;
2023-02-22 06:02:05 +00:00
libgweather = prev . libgweather . overrideAttrs ( upstream : {
# fixes: "Run-time dependency vapigen found: NO (tried pkgconfig)"
mesonFlags =
(
lib . remove " - D e n a b l e _ v a l a = t r u e "
( lib . remove " - D g t k _ d o c = t r u e " upstream . mesonFlags )
) ++ [
" - D i n t r o s p e c t i o n = f a l s e "
" - D e n a b l e _ v a l a = f a l s e "
" - D g t k _ d o c = f a l s e "
] ;
outputs = lib . remove " d e v d o c " upstream . outputs ;
nativeBuildInputs = ( lib . remove next . gobject-introspection upstream . nativeBuildInputs ) ++ [
next . glib
] ;
} ) ;
2023-02-10 00:46:04 +00:00
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 ] ;
} ) ;
2023-02-22 06:02:05 +00:00
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;
} ) ;
2023-02-10 00:46:04 +00:00
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 = [ " - - w i t h - c a - c e r t i f i c a t e s = / e t c / s s l / c e r t s / c a - c e r t i f i c a t e s . c r t " ] ;
} ) ;
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 = [ " o u t " " d e v " ]
++ lib . optionals ( prev . stdenv . buildPlatform == prev . stdenv . hostPlatform ) [ " d e v d o c " ] ;
mesonFlags = orig . mesonFlags ++ [
" - D g t k _ d o c = ${ lib . boolToString ( prev . stdenv . buildPlatform == prev . stdenv . hostPlatform ) } "
] ;
} ) ;
2023-02-11 00:50:46 +00:00
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 ];
2023-02-09 01:05:25 +00:00
# });
2023-02-22 06:47:31 +00:00
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 = [ " - - d i s a b l e - e x a m p l e s " ] ;
} ) ;
2023-02-22 06:03:14 +00:00
ncftp = prev . ncftp . overrideAttrs ( upstream : {
# fixes: "ar: command not found"
# `ar` is provided by bintools
nativeBuildInputs = upstream . nativeBuildInputs or [ ] ++ [ next . bintools ] ;
} ) ;
2023-02-10 00:46:04 +00:00
networkmanager-fortisslvpn = prev . networkmanager-fortisslvpn . overrideAttrs ( orig : {
# fixes "gdbus-codegen: command not found"
2023-02-11 00:50:46 +00:00
nativeBuildInputs = orig . nativeBuildInputs ++ [ next . glib ] ;
2023-02-10 00:46:04 +00:00
} ) ;
# networkmanager-iodine = prev.networkmanager-iodine.overrideAttrs (orig: {
# # fails to fix "configure.ac:58: error: possibly undefined macro: AM_GLIB_GNU_GETTEXT"
2023-02-11 00:50:46 +00:00
# nativeBuildInputs = orig.nativeBuildInputs ++ [ next.gettext ];
2023-02-10 00:46:04 +00:00
# });
2023-02-11 00:50:46 +00:00
networkmanager-iodine = prev . networkmanager-iodine . override {
# fixes "configure.ac:58: error: possibly undefined macro: AM_GLIB_GNU_GETTEXT"
inherit ( emulated ) stdenv ;
} ;
2023-02-10 00:46:04 +00:00
networkmanager-l2tp = prev . networkmanager-l2tp . overrideAttrs ( orig : {
# fixes "gdbus-codegen: command not found"
# fixes "gtk4-builder-tool: command not found"
2023-02-11 00:50:46 +00:00
nativeBuildInputs = orig . nativeBuildInputs ++ [ next . glib next . gtk4 ] ;
2023-02-10 00:46:04 +00:00
} ) ;
networkmanager-openconnect = prev . networkmanager-openconnect . overrideAttrs ( orig : {
# fixes "properties/gresource.xml: Permission denied"
# - by providing glib-compile-resources
2023-02-11 00:50:46 +00:00
nativeBuildInputs = orig . nativeBuildInputs ++ [ next . glib ] ;
2023-02-10 00:46:04 +00:00
} ) ;
networkmanager-openvpn = prev . networkmanager-openvpn . overrideAttrs ( orig : {
# fixes "properties/gresource.xml: Permission denied"
# - by providing glib-compile-resources
2023-02-11 00:50:46 +00:00
nativeBuildInputs = orig . nativeBuildInputs ++ [ next . glib ] ;
2023-02-10 00:46:04 +00:00
} ) ;
networkmanager-sstp = prev . networkmanager-sstp . overrideAttrs ( orig : {
# fixes "gdbus-codegen: command not found"
2023-02-11 00:50:46 +00:00
nativeBuildInputs = orig . nativeBuildInputs ++ [ next . glib ] ;
2023-02-10 00:46:04 +00:00
} ) ;
networkmanager-vpnc = prev . networkmanager-vpnc . overrideAttrs ( orig : {
# fixes "properties/gresource.xml: Permission denied"
# - by providing glib-compile-resources
2023-02-11 00:50:46 +00:00
nativeBuildInputs = orig . nativeBuildInputs ++ [ next . glib ] ;
2023-02-10 00:46:04 +00:00
} ) ;
nheko = prev . nheko . overrideAttrs ( orig : {
# fixes "fatal error: lmdb++.h: No such file or directory
buildInputs = orig . buildInputs ++ [ next . lmdbxx ] ;
} ) ;
2023-02-25 01:28:30 +00:00
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 " x a p i a n - c o n f i g " ''
exec $ { lib . getBin next . xapian } /bin/xapian-config $ @
'' ;
nativeBuildInputs = upstream . nativeBuildInputs ++ [ next . gnupg next . perl ] ;
} ) ;
2023-02-11 00:50:46 +00:00
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 ;
} ;
2023-02-10 00:46:04 +00:00
pam_mount = prev . pam_mount . overrideAttrs ( orig : {
# fixes: "perl: command not found"
nativeBuildInputs = orig . nativeBuildInputs ++ [ next . perl ] ;
} ) ;
2023-02-11 00:50:46 +00:00
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 ;
} ;
2023-02-07 09:46:13 +00:00
pipewire = prev . pipewire . overrideAttrs ( orig : {
# fix `spa/plugins/bluez5/meson.build:41:0: ERROR: Program 'gdbus-codegen' not found or not executable`
2023-02-11 00:50:46 +00:00
nativeBuildInputs = orig . nativeBuildInputs ++ [ next . glib ] ;
2023-02-07 09:46:13 +00:00
} ) ;
2023-02-11 00:50:46 +00:00
psqlodbc = prev . psqlodbc . override {
# fixes "configure: error: odbc_config not found (required for unixODBC build)"
inherit ( emulated ) stdenv ;
} ;
2023-02-09 01:05:25 +00:00
2023-02-07 09:46:13 +00:00
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"
" t e s t s / t e s t _ m a i n . p y "
] ;
} ) ;
# 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}";
# });
2023-02-14 10:19:32 +00:00
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 ++ [ " t e s t _ d e b u g _ m a g i c _ p a s s e s _ t h r o u g h _ g e n e r a t o r " ] ;
} ) ;
2023-02-07 09:46:13 +00:00
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 : {
2023-02-08 22:30:27 +00:00
# TODO: upstream (see tracking issue)
2023-02-07 09:46:13 +00:00
#
# 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 : {
2023-02-08 22:30:27 +00:00
# tests explicitly expect host CPU == build CPU
2023-02-07 09:46:13 +00:00
# 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"
" t e s t s / f u n c t i o n a l / t e s t _ p r o c e s s p o o l . p y "
# "tests/unit/test_compat.py::TestBaseManager::test_can_provide_signal_handler_initializers_to_start"
" t e s t s / u n i t / t e s t _ c o m p a t . p y "
] ;
} ) ;
2023-02-11 00:50:46 +00:00
# skia-pathops = ?
2023-02-07 09:46:13 +00:00
# it tries to call `cc` during the build, but can't find it.
} )
] ;
2023-02-11 00:50:46 +00:00
# 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;
# };
2023-02-10 00:46:04 +00:00
# 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}" ];
# });
2023-02-11 00:50:46 +00:00
# squeekboard = prev.squeekboard.override {
# # new error: "gcc: error: unrecognized command line option '-m64'"
# inherit (emulated) stdenv;
# };
2023-02-10 00:46:04 +00:00
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 ] ;
} ) ;
2023-02-11 00:50:46 +00:00
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;
# };
2023-02-06 22:41:32 +00:00
2023-02-21 12:19:49 +00:00
unar = prev . unar . overrideAttrs ( upstream : {
# fixes: "ar: command not found"
# `ar` is provided by bintools
nativeBuildInputs = upstream . nativeBuildInputs ++ [ next . bintools ] ;
} ) ;
2023-02-11 00:50:46 +00:00
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;
# });
} ;
2023-02-10 00:46:04 +00:00
2023-02-11 00:50:46 +00:00
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 } / b i n / ${ prev . stdenv . cc . targetPrefix } c c " ;
} ) ;
2023-02-10 00:46:04 +00:00
vpnc = prev . vpnc . overrideAttrs ( orig : {
# fixes "perl: command not found"
nativeBuildInputs = orig . nativeBuildInputs ++ [ next . perl ] ;
} ) ;
2023-02-25 01:29:21 +00:00
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 ] ;
} ) ;
2023-02-10 00:46:04 +00:00
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 ] ;
} ) ;
2023-02-11 00:50:46 +00:00
# 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;
# };
2023-02-21 00:05:37 +00:00
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 = " " ;
} ) ;
2023-02-06 22:41:32 +00:00
} )
] ;
} ;
2023-01-11 08:56:06 +00:00
}