Skip to content

Commit

Permalink
libgee, libgda, zile: fix compiling with clang
Browse files Browse the repository at this point in the history
-Wno-incompatible-function-pointer-types was removed from vala's setup
hook in b2d88d4. Without it, we're unable to compile libgee[1], libgda,
and zile on Darwin. The libgda and zile failures were masked by libgee
failing.

[1]: https://hydra.nixos.org/build/271035513
  • Loading branch information
joshheinrichs-shopify committed Sep 10, 2024
1 parent e13336b commit 77b1ada
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkgs/applications/editors/zile/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ stdenv.mkDerivation rec {
# fiddle with the terminal.
doCheck = false;

env.NIX_CFLAGS_COMPILE = lib.optionals stdenv.cc.isClang "-Wno-error=incompatible-function-pointer-types";

# XXX: Work around cross-compilation-unfriendly `gl_FUNC_FSTATAT' macro.
gl_cv_func_fstatat_zero_flag="yes";

Expand Down
2 changes: 2 additions & 0 deletions pkgs/development/libraries/libgda/6.x.nix
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ stdenv.mkDerivation rec {
postgresql
];

env.NIX_CFLAGS_COMPILE = lib.optionals stdenv.cc.isClang "-Wno-error=incompatible-function-pointer-types";

postPatch = ''
patchShebangs \
providers/raw_spec.py \
Expand Down
2 changes: 2 additions & 0 deletions pkgs/development/libraries/libgda/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ stdenv.mkDerivation rec {
"--enable-system-sqlite=${if stdenv.isDarwin then "no" else "yes"}"
];

env.NIX_CFLAGS_COMPILE = lib.optionals stdenv.cc.isClang "-Wno-error=incompatible-function-pointer-types";

enableParallelBuilding = true;

hardeningDisable = [ "format" ];
Expand Down
1 change: 1 addition & 0 deletions pkgs/development/libraries/libgee/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ stdenv.mkDerivation (finalAttrs: {
doCheck = true;

env = {
NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=incompatible-function-pointer-types";
PKG_CONFIG_GOBJECT_INTROSPECTION_1_0_GIRDIR = "${placeholder "dev"}/share/gir-1.0";
PKG_CONFIG_GOBJECT_INTROSPECTION_1_0_TYPELIBDIR = "${placeholder "out"}/lib/girepository-1.0";
};
Expand Down

0 comments on commit 77b1ada

Please sign in to comment.