Skip to content

Commit

Permalink
bustle: use gettext from nixpkgs
Browse files Browse the repository at this point in the history
The vendored gettext fails to build with clang 16 on Darwin. The gettext in nixpkgs works.
  • Loading branch information
reckenrode committed Jul 20, 2024
1 parent 82cbb28 commit 58b9659
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions pkgs/by-name/bu/bustle/package.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{ lib
, stdenv
, fetchFromGitLab
, buildPackages
, cargo
, meson
, ninja
Expand All @@ -9,9 +10,12 @@
, rustPlatform
, rustc
, wrapGAppsHook4
, darwin
, gettext
, glib
, gtk4
, libadwaita
, libiconv
}:

stdenv.mkDerivation (finalAttrs: {
Expand All @@ -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
Expand All @@ -48,6 +60,9 @@ stdenv.mkDerivation (finalAttrs: {
glib
gtk4
libadwaita
] ++ lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.Foundation
libiconv
];

meta = with lib; {
Expand Down

0 comments on commit 58b9659

Please sign in to comment.