cross: comment out/remove cross fixes for packages i don't plan to use anytime soon

This commit is contained in:
Colin 2024-02-27 16:20:55 +00:00
parent 4b014af4b1
commit 9710d55c6a
1 changed files with 40 additions and 118 deletions

View File

@ -75,23 +75,6 @@ let
pkg
);
needsBinfmt = pkg: (pkg.overrideAttrs or (updater: pkg // (updater pkg))) (upstream: {
# weird signature to support passing *either* a package, or an ordinary attrset
# "kvm" isn't precisely the right feature here.
# but the effect is that if you build a `needsBinfmt` package with `-j0`,
# then nix will try to find a builder that's been marked with `kvm` feature,
# and i don't mark my non-binfmt builders with `kvm`, hence it's guaranteed to
# be built on a binfmt-enabled builder (or not built, if no binfmt builders).
requiredSystemFeatures = (upstream.requiredSystemFeatures or []) ++ [ "kvm" ];
});
cantBinfmt = pkg: (pkg.overrideAttrs or (updater: pkg // (updater pkg))) (upstream: {
requiredSystemFeatures = (upstream.requiredSystemFeatures or []) ++ [ "no-binfmt" ];
});
# such packages could build with `needsBinfmt` *or* `buildInQemu`.
# - the former is [an order of magnitude] faster, but the latter gets me closer to a pure installation.
needsBinfmtOrQemu = buildInQemu {};
emulated = mkEmulated final prev;
linuxMinimal = final.linux.override {
@ -461,7 +444,6 @@ in with final; {
# '';
# NIX_DEBUG = "6";
# }));
# cinny-desktop = needsBinfmt prev.cinny-desktop;
# 2024/02/27: upstreaming is blocked on appstream, qtsvg
# clapper = prev.clapper.overrideAttrs (upstream: {
@ -490,56 +472,6 @@ in with final; {
# ];
# });
# used for cargo2nix rust projects (e.g. fractal, flare)
# defaultCrateOverrides = let
# crateNeedsBinfmt = cname: {
# "${cname}" = attrs: let
# baseAttrs = (prev.defaultCrateOverrides."${cname}" or (a: a)) attrs;
# in needsBinfmt baseAttrs;
# };
# crateCantBinfmt = cname: {
# "${cname}" = attrs: let
# baseAttrs = (prev.defaultCrateOverrides."${cname}" or (a: a)) attrs;
# in cantBinfmt baseAttrs;
# };
# in prev.defaultCrateOverrides
# # // (crateCantBinfmt "gdk-pixbuf-sys")
# # // (crateCantBinfmt "gdk4-sys")
# # // (crateCantBinfmt "glib-sys")
# # // (crateCantBinfmt "gstreamer-audio-sys")
# # // (crateCantBinfmt "gstreamer-base-sys")
# # // (crateCantBinfmt "gstreamer-pbutils-sys")
# # // (crateCantBinfmt "gstreamer-play-sys")
# # // (crateCantBinfmt "gstreamer-video-sys")
# # // (crateCantBinfmt "libadwaita-sys")
# # // (crateNeedsBinfmt "gdk-pixbuf-sys")
# # // (crateNeedsBinfmt "gdk-pixbuf")
# # // (crateNeedsBinfmt "gdk4-sys")
# # // (crateNeedsBinfmt "gdk4")
# # // (crateNeedsBinfmt "glib-sys")
# # // (crateNeedsBinfmt "glib")
# # // (crateNeedsBinfmt "gsk4")
# # // (crateNeedsBinfmt "gst-plugin-gtk4")
# # // (crateNeedsBinfmt "gstreamer")
# # // (crateNeedsBinfmt "gstreamer-audio")
# # // (crateNeedsBinfmt "gstreamer-audio-sys")
# # // (crateNeedsBinfmt "gstreamer-base")
# # // (crateNeedsBinfmt "gstreamer-base-sys")
# # // (crateNeedsBinfmt "gstreamer-pbutils")
# # // (crateNeedsBinfmt "gstreamer-pbutils-sys")
# # // (crateNeedsBinfmt "gstreamer-play")
# # // (crateNeedsBinfmt "gstreamer-play-sys")
# # // (crateNeedsBinfmt "gstreamer-sys")
# # // (crateNeedsBinfmt "gstreamer-video")
# # // (crateNeedsBinfmt "gstreamer-video-sys")
# # // (crateNeedsBinfmt "gtk4")
# # // (crateNeedsBinfmt "libadwaita")
# # // (crateNeedsBinfmt "libadwaita-sys")
# # // (crateNeedsBinfmt "libshumate")
# # // (crateNeedsBinfmt "sourceview5")
# ;
delfin = prev.delfin.overrideAttrs (upstream:
let
cargoEnvWrapper = buildPackages.writeShellScript "cargo-env-wrapper" ''
@ -601,7 +533,7 @@ in with final; {
# firefox-extensions = prev.firefox-extensions.overrideScope (self: super: {
# unwrapped = super.unwrapped // {
# browserpass-extension = super.unwrapped.browserpass-extension.override {
# mkYarnModules = args: needsBinfmtOrQemu {
# mkYarnModules = args: buildInQemu {
# override = { stdenv }: (
# (yarn2nix-moretea.override {
# pkgs = pkgs.__splicedPackages // { inherit stdenv; };
@ -674,16 +606,14 @@ in with final; {
};
});
flare-signal-nixified = cantBinfmt ((prev.flare-signal-nixified.override {
crateOverrideFn = cantBinfmt;
}).overrideAttrs (upstream: {
flare-signal-nixified = prev.flare-signal-nixified.overrideAttrs (upstream: {
# blueprint-compiler runs on the build machine, but tries to load gobject-introspection types meant for the host.
postPatch = (upstream.postPatch or "") + ''
substituteInPlace data/resources/meson.build --replace \
"find_program('blueprint-compiler')" \
"'env', 'GI_TYPELIB_PATH=${buildPackages.gdk-pixbuf.out}/lib/girepository-1.0:${buildPackages.harfbuzz.out}/lib/girepository-1.0:${buildPackages.gtk4.out}/lib/girepository-1.0:${buildPackages.graphene}/lib/girepository-1.0:${buildPackages.libadwaita}/lib/girepository-1.0:${buildPackages.pango.out}/lib/girepository-1.0', find_program('blueprint-compiler')"
'';
}));
});
# 2024/02/27: upstreaming is blocked on appstream
flatpak = prev.flatpak.overrideAttrs (upstream: {
@ -767,14 +697,6 @@ in with final; {
# # patching gst-plugin-gtk4 to not build cdylib fixes the issue in the `fractal-nixified` variant of this package
# });
# needs binfmt: "error[E0463]: can't find crate for `gtk4`" (and others)
# either one can build fractal and all its deps with binfmt,
# or build *none* of them with binfmt.
# but mixing non-binfmt deps with a binfmt top-level fractal fails
fractal-nixified = cantBinfmt (prev.fractal-nixified.override {
crateOverrideFn = cantBinfmt;
});
# 2024/02/27: upstreaming is unblocked -- if i can rework to not use emulation
# fwupd-efi = prev.fwupd-efi.override {
# # fwupd-efi queries meson host_machine to decide what arch to build for.
@ -861,7 +783,7 @@ in with final; {
# });
# });
# 2023/12/20: upstreaming is blocked on webp-pixbuf-loader
gthumb = mvInputs { nativeBuildInputs = [ glib ]; } prev.gthumb;
# gthumb = mvInputs { nativeBuildInputs = [ glib ]; } prev.gthumb;
# 2023/12/20: upstreaming is blocked on qtsvg (via pipewire)
gnome-frog = prev.gnome-frog.overrideAttrs (upstream: {
@ -1548,17 +1470,17 @@ in with final; {
# fixes "properties/gresource.xml: Permission denied"
# - by providing glib-compile-resources
# 2023/07/27: upstreaming is blocked on p11-kit, coeurl cross compilation
nheko = (prev.nheko.override {
gst_all_1 = gst_all_1 // {
# don't build gst-plugins-good with "qt5 support"
# alternative build fix is to remove `qtbase` from nativeBuildInputs:
# - that avoids the mixd qt5 deps, but forces a rebuild of gst-plugins-good and +20MB to closure
gst-plugins-good.override = attrs: gst_all_1.gst-plugins-good.override (builtins.removeAttrs attrs [ "qt5Support" ]);
};
}).overrideAttrs (orig: {
# fixes "fatal error: lmdb++.h: No such file or directory
buildInputs = orig.buildInputs ++ [ lmdbxx ];
});
# nheko = (prev.nheko.override {
# gst_all_1 = gst_all_1 // {
# # don't build gst-plugins-good with "qt5 support"
# # alternative build fix is to remove `qtbase` from nativeBuildInputs:
# # - that avoids the mixd qt5 deps, but forces a rebuild of gst-plugins-good and +20MB to closure
# gst-plugins-good.override = attrs: gst_all_1.gst-plugins-good.override (builtins.removeAttrs attrs [ "qt5Support" ]);
# };
# }).overrideAttrs (orig: {
# # fixes "fatal error: lmdb++.h: No such file or directory
# buildInputs = orig.buildInputs ++ [ lmdbxx ];
# });
# 2023/08/02: upstreaming in PR: <https://github.com/NixOS/nixpkgs/pull/225111/files>
# - needs (my) review
# notmuch = prev.notmuch.overrideAttrs (upstream: {
@ -1621,30 +1543,30 @@ in with final; {
# fixes (meson) "Program 'glib-mkenums mkenums' not found or not executable"
# 2023/07/27: upstreaming is blocked on p11-kit, argyllcms, libavif cross compilation
phoc = mvToNativeInputs [ wayland-scanner glib ] prev.phoc;
phosh = prev.phosh.overrideAttrs (upstream: {
buildInputs = upstream.buildInputs ++ [
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 = "${buildPackages.glib.dev}/bin/gio-querymodules" if True else :' build-aux/post_install.py
# '';
});
phosh-mobile-settings = mvInputs {
# fixes "meson.build:26:0: ERROR: Dependency "phosh-plugins" not found, tried pkgconfig"
# phosh is used only for its plugins; these are specified as a runtime dep in src.
# it's correct for them to be runtime dep: src/ms-lockscreen-panel.c loads stuff from
buildInputs = [ phosh ];
nativeBuildInputs = [
gettext # fixes "data/meson.build:1:0: ERROR: Program 'msgfmt' not found or not executable"
wayland-scanner # fixes "protocols/meson.build:7:0: ERROR: Program 'wayland-scanner' not found or not executable"
glib # fixes "src/meson.build:1:0: ERROR: Program 'glib-mkenums mkenums' not found or not executable"
desktop-file-utils # fixes "meson.build:116:8: ERROR: Program 'update-desktop-database' not found or not executable"
];
} prev.phosh-mobile-settings;
# phoc = mvToNativeInputs [ wayland-scanner glib ] prev.phoc;
# phosh = prev.phosh.overrideAttrs (upstream: {
# buildInputs = upstream.buildInputs ++ [
# 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 = "${buildPackages.glib.dev}/bin/gio-querymodules" if True else :' build-aux/post_install.py
# # '';
# });
# phosh-mobile-settings = mvInputs {
# # fixes "meson.build:26:0: ERROR: Dependency "phosh-plugins" not found, tried pkgconfig"
# # phosh is used only for its plugins; these are specified as a runtime dep in src.
# # it's correct for them to be runtime dep: src/ms-lockscreen-panel.c loads stuff from
# buildInputs = [ phosh ];
# nativeBuildInputs = [
# gettext # fixes "data/meson.build:1:0: ERROR: Program 'msgfmt' not found or not executable"
# wayland-scanner # fixes "protocols/meson.build:7:0: ERROR: Program 'wayland-scanner' not found or not executable"
# glib # fixes "src/meson.build:1:0: ERROR: Program 'glib-mkenums mkenums' not found or not executable"
# desktop-file-utils # fixes "meson.build:116:8: ERROR: Program 'update-desktop-database' not found or not executable"
# ];
# } prev.phosh-mobile-settings;
# pipewire = prev.pipewire.override {
# # avoid a dep on python3.10-PyQt5, which has mixed qt5 versions.
@ -2074,7 +1996,7 @@ in with final; {
# fixes "perl: command not found"
# 2023/07/30: upstreaming is unblocked, but requires alternative fix
# - i think the build script tries to run the generated binary?
vpnc = mvToNativeInputs [ perl ] prev.vpnc;
# vpnc = mvToNativeInputs [ perl ] prev.vpnc;
# 2023/11/21: upstreaming is blocked on flatpak
xdg-desktop-portal = prev.xdg-desktop-portal.overrideAttrs (upstream: {