From f96f2ec96028921fa5260680d052cc3dd5f0e5fe Mon Sep 17 00:00:00 2001 From: Colin Date: Sat, 4 Mar 2023 07:14:24 +0000 Subject: [PATCH] cross compilation: emulate less in dconf --- hosts/common/cross/default.nix | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/hosts/common/cross/default.nix b/hosts/common/cross/default.nix index f413a32b..16c66ff6 100644 --- a/hosts/common/cross/default.nix +++ b/hosts/common/cross/default.nix @@ -391,12 +391,19 @@ in inherit (emulated) stdenv; }; - dconf = (prev.dconf.override { + # 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; + # }); + dconf = prev.dconf.overrideAttrs (upstream: { # 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; + # upstream nixpkgs explicitly disables that on cross compilation, but in fact, it works. + # so just undo upstream's mods. + buildInputs = upstream.buildInputs ++ [ next.vala ]; + mesonFlags = lib.remove "-Dvapi=false" upstream.mesonFlags; }); emacs = prev.emacs.override {