From 00b9fc64d8b8765731cdb2e93312b8cb5c89c517 Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Sat, 20 Jul 2024 00:35:17 -0400 Subject: [PATCH] gnome-obfuscate: use gettext from nixpkgs The vendored gettext fails to build with clang 16 on Darwin. The gettext in nixpkgs works. --- pkgs/applications/graphics/gnome-obfuscate/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/applications/graphics/gnome-obfuscate/default.nix b/pkgs/applications/graphics/gnome-obfuscate/default.nix index 1a091929b3e4..6d0a8a8436f3 100644 --- a/pkgs/applications/graphics/gnome-obfuscate/default.nix +++ b/pkgs/applications/graphics/gnome-obfuscate/default.nix @@ -1,6 +1,7 @@ { stdenv , lib , fetchFromGitLab +, buildPackages , cargo , gettext , meson @@ -36,6 +37,14 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-9lrxK2psdIPGsOC6p8T+3AGPrX6PjrK9mFirdJqBSMM="; }; + env = lib.optionalAttrs stdenv.isDarwin { + # Set the location to gettext to ensure the nixpkgs one on Darwin instead of the vendored one. + # The vendored gettext does not build with clang 16. + GETTEXT_BIN_DIR = "${lib.getBin buildPackages.gettext}/bin"; + GETTEXT_INCLUDE_DIR = "${lib.getDev gettext}/include"; + GETTEXT_LIB_DIR = "${lib.getLib gettext}/lib"; + }; + nativeBuildInputs = [ gettext meson