Unverified Commit 58b9659b authored by Randy Eckenrode's avatar Randy Eckenrode
Browse files

bustle: use gettext from nixpkgs

The vendored gettext fails to build with clang 16 on Darwin. The gettext in nixpkgs works.
parent 82cbb284
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
{ 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; {