diebahn: fix build on Darwin

* Include required frameworks; and
* Use gettext from nixpkgs (required for building with newer clangs).

+14 -3
+14 -3
pkgs/applications/misc/diebahn/default.nix
··· 15 15 , gtk4 16 16 , libadwaita 17 17 , pango 18 + , gettext 18 19 , darwin 19 20 }: 20 21 ··· 54 55 gtk4 55 56 libadwaita 56 57 pango 57 - ] ++ lib.optionals stdenv.isDarwin [ 58 - darwin.apple_sdk.frameworks.Security 59 - ]; 58 + ] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ 59 + CoreFoundation 60 + Foundation 61 + Security 62 + ]); 63 + 64 + # Darwin needs to link against gettext from nixpkgs instead of the one vendored by gettext-sys 65 + # because the vendored copy does not build with newer versions of clang. 66 + env = lib.optionalAttrs stdenv.isDarwin { 67 + GETTEXT_BIN_DIR = "${lib.getBin gettext}/bin"; 68 + GETTEXT_INCLUDE_DIR = "${lib.getDev gettext}/include"; 69 + GETTEXT_LIB_DIR = "${lib.getLib gettext}/lib"; 70 + }; 60 71 61 72 meta = { 62 73 description = "GTK4 frontend for the travel information of the german railway";