From b7352212f8ce5de214da7c4296b7bcd59de37d43 Mon Sep 17 00:00:00 2001 From: Nathan Henrie Date: Thu, 16 Jan 2025 17:22:28 -0700 Subject: [PATCH] espanso: fix darwin build failure due to vendored wx Vendored wx has a libpng that refers to which breaks with clang-19 This patch changes it to use libpng from nixpkgs instead. See also: https://github.com/NixOS/nixpkgs/pull/362685 --- pkgs/by-name/es/espanso/package.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/es/espanso/package.nix b/pkgs/by-name/es/espanso/package.nix index 10d2f31bce25..35a4b7e71754 100644 --- a/pkgs/by-name/es/espanso/package.nix +++ b/pkgs/by-name/es/espanso/package.nix @@ -11,6 +11,7 @@ libXtst, libnotify, libxkbcommon, + libpng, openssl, xclip, xdotool, @@ -28,7 +29,7 @@ assert stdenv.hostPlatform.isLinux -> x11Support != waylandSupport; assert stdenv.hostPlatform.isDarwin -> !x11Support; assert stdenv.hostPlatform.isDarwin -> !waylandSupport; -rustPlatform.buildRustPackage rec { +rustPlatform.buildRustPackage { pname = "espanso"; version = "2.2-unstable-2024-05-14"; @@ -71,6 +72,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ + libpng wxGTK32 ] ++ lib.optionals stdenv.hostPlatform.isLinux [ @@ -99,6 +101,9 @@ rustPlatform.buildRustPackage rec { --replace-fail "espanso" "${placeholder "out"}/Applications/Espanso.app/Contents/MacOS/espanso" substituteInPlace espanso/src/path/macos.rs espanso/src/path/linux.rs \ --replace-fail '"/usr/local/bin/espanso"' '"${placeholder "out"}/bin/espanso"' + + substituteInPlace espanso-modulo/build.rs \ + --replace-fail '"--with-libpng=builtin"' '"--with-libpng=sys"' ''; # Some tests require networking