diff --git a/overlays/cross.nix b/overlays/cross.nix index d89f7bdcd..f30ae6132 100644 --- a/overlays/cross.nix +++ b/overlays/cross.nix @@ -562,6 +562,18 @@ in { }; }); + flare-signal-nixified = prev.flare-signal-nixified.override { + # N.B. blueprint-compiler is in nativeBuildInputs. + # the trick here is to force the aarch64 versions to be used during build (via emulation). + # blueprint-compiler override shared with tangram. + blueprint-compiler = buildInQemu (final.blueprint-compiler.overrideAttrs (_: { + # default is to propagate gobject-introspection *as a buildInput*, when it's supposed to be native. + propagatedBuildInputs = []; + # "Namespace Gtk not available" + doCheck = false; + })); + }; + # 2023/07/31: upstreaming is blocked on ostree dep flatpak = prev.flatpak.overrideAttrs (upstream: { # fixes "No package 'libxml-2.0' found" @@ -1958,8 +1970,9 @@ in { # }; tangram = (prev.tangram.override { # N.B. blueprint-compiler is in nativeBuildInputs. - # the trick here is to force the aarch64 versions to be used during build (via emulation), - blueprint-compiler = buildInQemu (final.blueprint-compiler.overrideAttrs (upstream: { + # the trick here is to force the aarch64 versions to be used during build (via emulation). + # blueprint-compiler override shared with flare-signal-nixified. + blueprint-compiler = buildInQemu (final.blueprint-compiler.overrideAttrs (_: { # default is to propagate gobject-introspection *as a buildInput*, when it's supposed to be native. propagatedBuildInputs = []; # "Namespace Gtk not available" diff --git a/pkgs/additional/flare-signal-nixified/default.nix b/pkgs/additional/flare-signal-nixified/default.nix index bc287c5f0..c12a5c9c4 100644 --- a/pkgs/additional/flare-signal-nixified/default.nix +++ b/pkgs/additional/flare-signal-nixified/default.nix @@ -3,7 +3,7 @@ # - `sed -i 's/target."curve25519_dalek_backend"/target."curve25519_dalek_backend" or ""/g' Cargo.nix` # # the generated Cargo.nix points to an impure source (~/ref/...), but that's resolved by overriding `src` below -{ stdenv +{ lib , appstream-glib , blueprint-compiler , desktop-file-utils @@ -11,6 +11,7 @@ , flare-signal , gdk-pixbuf , glib +, gobject-introspection , gst_all_1 , gtk4 , gtksourceview5 @@ -22,7 +23,10 @@ , pkg-config , pkgs , protobuf +, rust +, stdenv , wrapGAppsHook4 +, writeText }: let cargoNix = import ./Cargo.nix { @@ -87,6 +91,7 @@ let appstream-glib # for appstream-util blueprint-compiler desktop-file-utils # for update-desktop-database + gobject-introspection meson ninja pkg-config @@ -107,6 +112,18 @@ let gst_all_1.gst-plugins-bad ]; + mesonFlags = let + # this gets meson to shutup about rustc not producing executables. + # kinda silly though, since we patch out the actual cargo (rustc) invocations. + crossFile = writeText "cross-file.conf" '' + [binaries] + rust = [ 'rustc', '--target', '${rust.toRustTargetSpec stdenv.hostPlatform}' ] + ''; + in + lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ + "--cross-file=${crossFile}" + ]; + # patch so meson will invoke our `crate2nix_cmd.sh` instead of cargo postPatch = '' substituteInPlace src/meson.build \