From 7a047702d5990ea3fe277563d0a2e514acc37a7b Mon Sep 17 00:00:00 2001 From: Colin Date: Tue, 13 Aug 2024 06:04:43 +0000 Subject: [PATCH] cross: flatpak: fix via nixpkgs patch instead of overlay --- overlays/cross.nix | 44 ++++++++++++++++---------------- pkgs/additional/nixpkgs/list.nix | 5 ++++ 2 files changed, 27 insertions(+), 22 deletions(-) diff --git a/overlays/cross.nix b/overlays/cross.nix index 120bac960..6ee20518e 100644 --- a/overlays/cross.nix +++ b/overlays/cross.nix @@ -339,29 +339,29 @@ in with final; { ''; }); - # 2024/08/12: upstreaming is unblocked - flatpak = prev.flatpak.overrideAttrs (upstream: { - # fixes "No package 'libxml-2.0' found" - buildInputs = upstream.buildInputs ++ [ 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" - ]; + # 2024/08/12: upstreaming is unblocked, implemented on `pr-flatpak-cross` + # flatpak = prev.flatpak.overrideAttrs (upstream: { + # # fixes "No package 'libxml-2.0' found" + # buildInputs = upstream.buildInputs ++ [ 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" + # ]; - postPatch = let - # copied from nixpkgs flatpak and modified to use buildPackages python - vsc-py = buildPackages.python3.withPackages (pp: [ - pp.pyparsing - ]); - in '' - patchShebangs buildutil - patchShebangs tests - PATH=${lib.makeBinPath [vsc-py]}:$PATH patchShebangs --build subprojects/variant-schema-compiler/variant-schema-compiler - '' + '' - sed -i s:'\$BWRAP --version:${stdenv.hostPlatform.emulator buildPackages} \$BWRAP --version:' configure.ac - sed -i s:'\$DBUS_PROXY --version:${stdenv.hostPlatform.emulator buildPackages} \$DBUS_PROXY --version:' configure.ac - ''; - }); + # postPatch = let + # # copied from nixpkgs flatpak and modified to use buildPackages python + # vsc-py = buildPackages.python3.withPackages (pp: [ + # pp.pyparsing + # ]); + # in '' + # patchShebangs buildutil + # patchShebangs tests + # PATH=${lib.makeBinPath [vsc-py]}:$PATH patchShebangs --build subprojects/variant-schema-compiler/variant-schema-compiler + # '' + '' + # sed -i s:'\$BWRAP --version:${stdenv.hostPlatform.emulator buildPackages} \$BWRAP --version:' configure.ac + # sed -i s:'\$DBUS_PROXY --version:${stdenv.hostPlatform.emulator buildPackages} \$DBUS_PROXY --version:' configure.ac + # ''; + # }); # 2024/08/12: upstreaming is blocked by xdg-desktop-portal fractal = prev.fractal.overrideAttrs (upstream: { diff --git a/pkgs/additional/nixpkgs/list.nix b/pkgs/additional/nixpkgs/list.nix index 6ed974bb2..586a3777b 100644 --- a/pkgs/additional/nixpkgs/list.nix +++ b/pkgs/additional/nixpkgs/list.nix @@ -39,6 +39,11 @@ in hash = "sha256-9UrJB/ijXL07H/SESquCCqI1boVoYpDcYqxD+Mx2Mwc="; }) + (fetchpatch' { + title = "flatpak: support cross compilation"; + saneCommit = "pr-flatpak-cross"; + }) + (fetchpatch' { title = "syshud: 0-unstable-2024-07-29 -> 0-unstable-2024-08-10"; prUrl = "https://github.com/NixOS/nixpkgs/pull/333975";