From 41ab77f3147b315ef10c0fcd8c68540ac03a829b Mon Sep 17 00:00:00 2001 From: David McFarland Date: Fri, 3 Jan 2025 16:31:02 -0400 Subject: [PATCH 1/3] gtk-sharp-3_0: fix compile error on gcc 14 --- pkgs/development/libraries/gtk-sharp/3.0.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/libraries/gtk-sharp/3.0.nix b/pkgs/development/libraries/gtk-sharp/3.0.nix index 98ccf2a111de..89121db3b5d4 100644 --- a/pkgs/development/libraries/gtk-sharp/3.0.nix +++ b/pkgs/development/libraries/gtk-sharp/3.0.nix @@ -31,6 +31,8 @@ stdenv.mkDerivation rec { libxml2 ]; + env.NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration"; + patches = [ # Fixes MONO_PROFILE_ENTER_LEAVE undeclared when compiling against newer versions of mono. # @see https://github.com/mono/gtk-sharp/pull/266 From c84a2088ee08f980f9e2fb15f9d6605a84a0e864 Mon Sep 17 00:00:00 2001 From: David McFarland Date: Fri, 3 Jan 2025 16:31:02 -0400 Subject: [PATCH 2/3] gtk-sharp-2_0: fix compile error on gcc 14 --- pkgs/development/libraries/gtk-sharp/2.0.nix | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pkgs/development/libraries/gtk-sharp/2.0.nix b/pkgs/development/libraries/gtk-sharp/2.0.nix index 120b39ced22a..8981e4df3981 100644 --- a/pkgs/development/libraries/gtk-sharp/2.0.nix +++ b/pkgs/development/libraries/gtk-sharp/2.0.nix @@ -64,11 +64,7 @@ stdenv.mkDerivation rec { ./bootstrap-${lib.versions.majorMinor version} ''; - env.NIX_CFLAGS_COMPILE = toString ( - lib.optionals stdenv.cc.isClang [ - "-Wno-error=int-conversion" - ] - ); + env.NIX_CFLAGS_COMPILE = "-Wno-error=int-conversion"; dontStrip = true; From 32c543575bf9c59ac499179ada7249c86c764451 Mon Sep 17 00:00:00 2001 From: David McFarland Date: Mon, 6 Jan 2025 09:39:47 -0400 Subject: [PATCH 3/3] mono{4,5}: fix build on gcc 14 --- pkgs/development/compilers/mono/4.nix | 7 +++++++ pkgs/development/compilers/mono/5.nix | 1 + pkgs/development/compilers/mono/generic.nix | 3 ++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/pkgs/development/compilers/mono/4.nix b/pkgs/development/compilers/mono/4.nix index 0bbf90767d48..66d8ff8a010a 100644 --- a/pkgs/development/compilers/mono/4.nix +++ b/pkgs/development/compilers/mono/4.nix @@ -12,4 +12,11 @@ callPackage ./generic.nix ({ sha256 = "1vyvp2g28ihcgxgxr8nhzyzdmzicsh5djzk8dk1hj5p5f2k3ijqq"; enableParallelBuilding = false; # #32386, https://hydra.nixos.org/build/65600645 extraPatches = lib.optionals stdenv.hostPlatform.isLinux [ ./mono4-glibc.patch ]; + env.NIX_CFLAGS_COMPILE = toString [ + "-Wno-error=implicit-function-declaration" + "-Wno-error=implicit-int" + "-Wno-error=incompatible-pointer-types" + "-Wno-error=int-conversion" + "-Wno-error=return-mismatch" + ]; }) diff --git a/pkgs/development/compilers/mono/5.nix b/pkgs/development/compilers/mono/5.nix index 18daf8e641a5..4cf7252dcc35 100644 --- a/pkgs/development/compilers/mono/5.nix +++ b/pkgs/development/compilers/mono/5.nix @@ -9,4 +9,5 @@ callPackage ./generic.nix ({ version = "5.20.1.34"; sha256 = "12vw5dkhmp1vk9l658pil8jiqirkpdsc5z8dm5mpj595yr6d94fd"; enableParallelBuilding = true; + env.NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types -Wno-error=implicit-function-declaration"; }) diff --git a/pkgs/development/compilers/mono/generic.nix b/pkgs/development/compilers/mono/generic.nix index d9e34223771c..ffa2d78bab18 100644 --- a/pkgs/development/compilers/mono/generic.nix +++ b/pkgs/development/compilers/mono/generic.nix @@ -29,6 +29,7 @@ enableParallelBuilding ? true, srcArchiveSuffix ? "tar.bz2", extraPatches ? [ ], + env ? { }, }: let @@ -36,7 +37,7 @@ let in stdenv.mkDerivation rec { pname = "mono"; - inherit version; + inherit version env; src = fetchurl { inherit sha256;