cross: remove unused qt stuff

This commit is contained in:
2023-08-01 22:44:53 +00:00
parent a7b71979f9
commit 8efad09cf4
2 changed files with 104 additions and 126 deletions

View File

@@ -87,9 +87,6 @@ in [
# upgrade to 22.3.6 instead
# ./2023-02-28-mesa-22.3.6.patch
# fix qt6.qtbase and qt6.qtModule to cross-compile.
# unfortunately there's some tangle that makes that difficult to do via the normal `override` facilities
./2023-03-03-qtbase-cross-compile.patch
# let ccache cross-compile
# TODO: why doesn't this apply?
@@ -173,12 +170,6 @@ in [
# make alsa-project members overridable
./2023-05-31-toplevel-alsa.patch
# qt6 qtwebengine: specify `python` as buildPackages
./2023-06-02-qt6-qtwebengine-cross.patch
# Jellyfin: don't build via `libsForQt5.callPackage`
./2023-06-06-jellyfin-no-libsForQt5-callPackage.patch
# pin to a pre-0.17.3 release
# removing this and using stock 0.17.3 (also 0.17.4) causes:
# INFO lemmy_server::code_migrations: No Local Site found, creating it.
@@ -365,4 +356,14 @@ in [
./02-rpi4-uboot.patch
# ./07-duplicity-rich-url.patch
# fix qt6.qtbase and qt6.qtModule to cross-compile.
# unfortunately there's some tangle that makes that difficult to do via the normal `override` facilities
# ./2023-03-03-qtbase-cross-compile.patch
# qt6 qtwebengine: specify `python` as buildPackages
# ./2023-06-02-qt6-qtwebengine-cross.patch
# Jellyfin: don't build via `libsForQt5.callPackage`
# ./2023-06-06-jellyfin-no-libsForQt5-callPackage.patch
]

View File

@@ -907,7 +907,7 @@ in {
# });
# fixes (meson) "Program 'glib-mkenums mkenums' not found or not executable"
# 2023/07/27: upstreaming is blocked on p11-kit cross compilation
# 2023/07/27: upstreaming is blocked on p11-kit, argyllcms, libavif cross compilation
phoc = mvToNativeInputs [ final.wayland-scanner final.glib ] prev.phoc;
phosh = prev.phosh.overrideAttrs (upstream: {
buildInputs = upstream.buildInputs ++ [
@@ -1048,129 +1048,106 @@ in {
inherit (emulated) stdenv;
};
});
# qt5 = prev.qt5.overrideScope' (self: super: {
# inherit (emulated) stdenv;
# # mkDerivation = self.mkDerivationWith final.stdenv.mkDerivation;
# # callPackage = self.newScope {
# # inherit (self) qtCompatVersion qtModule srcs;
# # inherit (final) stdenv;
# # mkDerivation = self.mkDerivationWith final.stdenv.mkDerivation;
# # };
# # qtbase = super.qtbase.override {
# # inherit (emulated) stdenv;
# # };
# # qtModule = super.qtModule.override {
# # inherit (emulated) stdenv;
# # };
# # qtimageformats = useEmulatedStdenv super.qtimageformats;
# # qtsvg = useEmulatedStdenv super.qtsvg;
# # 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;
# # inherit (emulated) stdenv;
# # };
# });
# qt5 = emulated.qt5.overrideScope (self: super: {
# # emulate all the qt5 packages, but rework `libsForQt5.callPackage` and `mkDerivation`
# # to use non-emulated stdenv by default.
# mkDerivation = self.mkDerivationWith final.stdenv.mkDerivation;
# callPackage = self.newScope { inherit (self) qtCompatVersion qtModule srcs; inherit (final) stdenv; };
# });
qt6 = prev.qt6.overrideScope' (self: super: {
# # inherit (emulated.qt6) qtModule;
# qtbase = super.qtbase.overrideAttrs (upstream: {
# # cmakeFlags = upstream.cmakeFlags ++ lib.optionals (final.stdenv.buildPlatform != final.stdenv.hostPlatform) [
# cmakeFlags = upstream.cmakeFlags ++ lib.optionals (final.stdenv.buildPlatform != final.stdenv.hostPlatform) [
# # "-DCMAKE_CROSSCOMPILING=True" # fails to solve QT_HOST_PATH error
# "-DQT_HOST_PATH=${final.buildPackages.qt6.full}"
# ];
# });
# qtModule = args: (super.qtModule args).overrideAttrs (upstream: {
# # the nixpkgs comment about libexec seems to be outdated:
# # it's just that cross-compiled syncqt.pl doesn't get its #!/usr/bin/env shebang replaced.
# preConfigure = lib.replaceStrings
# ["${lib.getDev self.qtbase}/libexec/syncqt.pl"]
# ["perl ${lib.getDev self.qtbase}/libexec/syncqt.pl"]
# upstream.preConfigure;
# });
# # qtwayland = super.qtwayland.overrideAttrs (upstream: {
# # preConfigure = "fixQtBuiltinPaths . '*.pr?'";
# # });
# # qtwayland = super.qtwayland.override {
# # inherit (self) qtbase;
# # };
# # qtbase = super.qtbase.override {
# # # fixes: "You need to set QT_HOST_PATH to cross compile Qt."
# # inherit (emulated) stdenv;
# # };
# qt6 = prev.qt6.overrideScope' (self: super: {
# # # inherit (emulated.qt6) qtModule;
# # qtbase = super.qtbase.overrideAttrs (upstream: {
# # # cmakeFlags = upstream.cmakeFlags ++ lib.optionals (final.stdenv.buildPlatform != final.stdenv.hostPlatform) [
# # cmakeFlags = upstream.cmakeFlags ++ lib.optionals (final.stdenv.buildPlatform != final.stdenv.hostPlatform) [
# # # "-DCMAKE_CROSSCOMPILING=True" # fails to solve QT_HOST_PATH error
# # "-DQT_HOST_PATH=${final.buildPackages.qt6.full}"
# # ];
# # });
# # qtModule = args: (super.qtModule args).overrideAttrs (upstream: {
# # # the nixpkgs comment about libexec seems to be outdated:
# # # it's just that cross-compiled syncqt.pl doesn't get its #!/usr/bin/env shebang replaced.
# # preConfigure = lib.replaceStrings
# # ["${lib.getDev self.qtbase}/libexec/syncqt.pl"]
# # ["perl ${lib.getDev self.qtbase}/libexec/syncqt.pl"]
# # upstream.preConfigure;
# # });
# # # qtwayland = super.qtwayland.overrideAttrs (upstream: {
# # # preConfigure = "fixQtBuiltinPaths . '*.pr?'";
# # # });
# # # qtwayland = super.qtwayland.override {
# # # inherit (self) qtbase;
# # # };
# # # qtbase = super.qtbase.override {
# # # # fixes: "You need to set QT_HOST_PATH to cross compile Qt."
# # # inherit (emulated) stdenv;
# # # };
qtwebengine = super.qtwebengine.overrideAttrs (upstream: {
# depsBuildBuild = upstream.depsBuildBuild or [] ++ [ final.pkg-config ];
# XXX: qt seems to use its own terminology for "host" and "target":
# - <https://www.qt.io/blog/qt6-development-hosts-and-targets>
# - "host" = machine invoking the compiler
# - "target" = machine on which the resulting qtwebengine.so binaries will run
# XXX: NIX_CFLAGS_COMPILE_<machine> is how we get the `-isystem <dir>` flags.
# probably we shouldn't blindly copy these from host machine to build machine,
# as the headers could reasonably make different assumptions.
preConfigure = upstream.preConfigure + ''
# export PKG_CONFIG_HOST="$PKG_CONFIG"
export PKG_CONFIG_HOST="$PKG_CONFIG_FOR_BUILD"
# expose -isystem <zlib> to x86 builds
export NIX_CFLAGS_COMPILE_x86_64_unknown_linux_gnu="$NIX_CFLAGS_COMPILE"
export NIX_LDFLAGS_x86_64_unknown_linux_gnu="-L${final.buildPackages.zlib}/lib"
'';
patches = upstream.patches or [] ++ [
# ./qtwebengine-host-pkg-config.patch
# alternatively, look at dlopenBuildInputs
./qtwebengine-host-cc.patch
];
# patch the qt pkg-config script to show us more debug info
postPatch = upstream.postPatch or "" + ''
sed -i s/options.debug/True/g src/3rdparty/chromium/build/config/linux/pkg-config.py
'';
nativeBuildInputs = upstream.nativeBuildInputs ++ [
final.bintools-unwrapped # for readelf
final.buildPackages.cups # for cups-config
final.buildPackages.fontconfig
final.buildPackages.glib
final.buildPackages.harfbuzz
final.buildPackages.icu
final.buildPackages.libjpeg
final.buildPackages.libpng
final.buildPackages.libwebp
final.buildPackages.nss
# final.gcc-unwrapped.libgcc # for libgcc_s.so
final.buildPackages.zlib
];
depsBuildBuild = upstream.depsBuildBuild or [] ++ [ final.pkg-config ];
# buildInputs = upstream.buildInputs ++ [
# final.gcc-unwrapped.libgcc # for libgcc_s.so. this gets loaded during build, suggesting i surely messed something up
# ];
# buildInputs = upstream.buildInputs ++ [
# final.gcc-unwrapped.libgcc
# ];
# nativeBuildInputs = upstream.nativeBuildInputs ++ [
# final.icu
# ];
# buildInputs = upstream.buildInputs ++ [
# final.icu
# ];
# env.NIX_DEBUG="1";
# env.NIX_DEBUG="7";
# cmakeFlags = lib.remove "-DQT_FEATURE_webengine_system_icu=ON" upstream.cmakeFlags;
cmakeFlags = upstream.cmakeFlags ++ lib.optionals (final.stdenv.hostPlatform != final.stdenv.buildPlatform) [
# "--host-cc=${final.buildPackages.stdenv.cc}/bin/cc"
# "--host-cxx=${final.buildPackages.stdenv.cc}/bin/c++"
# these are my own vars, used by my own patch
"-DCMAKE_HOST_C_COMPILER=${final.buildPackages.stdenv.cc}/bin/gcc"
"-DCMAKE_HOST_CXX_COMPILER=${final.buildPackages.stdenv.cc}/bin/g++"
"-DCMAKE_HOST_AR=${final.buildPackages.stdenv.cc}/bin/ar"
"-DCMAKE_HOST_NM=${final.buildPackages.stdenv.cc}/bin/nm"
];
});
});
# qtwebengine = super.qtwebengine.overrideAttrs (upstream: {
# # depsBuildBuild = upstream.depsBuildBuild or [] ++ [ final.pkg-config ];
# # XXX: qt seems to use its own terminology for "host" and "target":
# # - <https://www.qt.io/blog/qt6-development-hosts-and-targets>
# # - "host" = machine invoking the compiler
# # - "target" = machine on which the resulting qtwebengine.so binaries will run
# # XXX: NIX_CFLAGS_COMPILE_<machine> is how we get the `-isystem <dir>` flags.
# # probably we shouldn't blindly copy these from host machine to build machine,
# # as the headers could reasonably make different assumptions.
# preConfigure = upstream.preConfigure + ''
# # export PKG_CONFIG_HOST="$PKG_CONFIG"
# export PKG_CONFIG_HOST="$PKG_CONFIG_FOR_BUILD"
# # expose -isystem <zlib> to x86 builds
# export NIX_CFLAGS_COMPILE_x86_64_unknown_linux_gnu="$NIX_CFLAGS_COMPILE"
# export NIX_LDFLAGS_x86_64_unknown_linux_gnu="-L${final.buildPackages.zlib}/lib"
# '';
# patches = upstream.patches or [] ++ [
# # ./qtwebengine-host-pkg-config.patch
# # alternatively, look at dlopenBuildInputs
# ./qtwebengine-host-cc.patch
# ];
# # patch the qt pkg-config script to show us more debug info
# postPatch = upstream.postPatch or "" + ''
# sed -i s/options.debug/True/g src/3rdparty/chromium/build/config/linux/pkg-config.py
# '';
# nativeBuildInputs = upstream.nativeBuildInputs ++ [
# final.bintools-unwrapped # for readelf
# final.buildPackages.cups # for cups-config
# final.buildPackages.fontconfig
# final.buildPackages.glib
# final.buildPackages.harfbuzz
# final.buildPackages.icu
# final.buildPackages.libjpeg
# final.buildPackages.libpng
# final.buildPackages.libwebp
# final.buildPackages.nss
# # final.gcc-unwrapped.libgcc # for libgcc_s.so
# final.buildPackages.zlib
# ];
# depsBuildBuild = upstream.depsBuildBuild or [] ++ [ final.pkg-config ];
# # buildInputs = upstream.buildInputs ++ [
# # final.gcc-unwrapped.libgcc # for libgcc_s.so. this gets loaded during build, suggesting i surely messed something up
# # ];
# # buildInputs = upstream.buildInputs ++ [
# # final.gcc-unwrapped.libgcc
# # ];
# # nativeBuildInputs = upstream.nativeBuildInputs ++ [
# # final.icu
# # ];
# # buildInputs = upstream.buildInputs ++ [
# # final.icu
# # ];
# # env.NIX_DEBUG="1";
# # env.NIX_DEBUG="7";
# # cmakeFlags = lib.remove "-DQT_FEATURE_webengine_system_icu=ON" upstream.cmakeFlags;
# cmakeFlags = upstream.cmakeFlags ++ lib.optionals (final.stdenv.hostPlatform != final.stdenv.buildPlatform) [
# # "--host-cc=${final.buildPackages.stdenv.cc}/bin/cc"
# # "--host-cxx=${final.buildPackages.stdenv.cc}/bin/c++"
# # these are my own vars, used by my own patch
# "-DCMAKE_HOST_C_COMPILER=${final.buildPackages.stdenv.cc}/bin/gcc"
# "-DCMAKE_HOST_CXX_COMPILER=${final.buildPackages.stdenv.cc}/bin/g++"
# "-DCMAKE_HOST_AR=${final.buildPackages.stdenv.cc}/bin/ar"
# "-DCMAKE_HOST_NM=${final.buildPackages.stdenv.cc}/bin/nm"
# ];
# });
# });
# rmlint = prev.rmlint.override {
# # fixes "Checking whether the C compiler works... no"