From 58b9659b655cf540a66e25bcaa0ba4b0e89cf428 Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Fri, 19 Jul 2024 23:15:40 -0400 Subject: [PATCH] bustle: use gettext from nixpkgs The vendored gettext fails to build with clang 16 on Darwin. The gettext in nixpkgs works. --- pkgs/by-name/bu/bustle/package.nix | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/pkgs/by-name/bu/bustle/package.nix b/pkgs/by-name/bu/bustle/package.nix index 1e57c9122f8a5..a6e3e6474729c 100644 --- a/pkgs/by-name/bu/bustle/package.nix +++ b/pkgs/by-name/bu/bustle/package.nix @@ -1,6 +1,7 @@ { lib , stdenv , fetchFromGitLab +, buildPackages , cargo , meson , ninja @@ -9,9 +10,12 @@ , rustPlatform , rustc , wrapGAppsHook4 +, darwin +, gettext , glib , gtk4 , libadwaita +, libiconv }: stdenv.mkDerivation (finalAttrs: { @@ -32,6 +36,14 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-r29Z+6P+yuCpOBUE3vkESd15lcGXs5+ZTBiQ9nW6DJ4="; }; + 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 = [ cargo meson @@ -48,6 +60,9 @@ stdenv.mkDerivation (finalAttrs: { glib gtk4 libadwaita + ] ++ lib.optionals stdenv.isDarwin [ + darwin.apple_sdk.frameworks.Foundation + libiconv ]; meta = with lib; {