diff --git a/pkgs/development/ruby-modules/gem-config/default.nix b/pkgs/development/ruby-modules/gem-config/default.nix index 0c34601fd725..b6542ebeccc2 100644 --- a/pkgs/development/ruby-modules/gem-config/default.nix +++ b/pkgs/development/ruby-modules/gem-config/default.nix @@ -17,7 +17,7 @@ # This separates "what to build" (the exact gem versions) from "how to build" # (to make gems behave if necessary). -{ lib, fetchurl, fetchpatch2, writeScript, ruby, libkrb5, libxml2, libxslt, python2, stdenv, which +{ lib, fetchurl, fetchpatch, fetchpatch2, writeScript, ruby, libkrb5, libxml2, libxslt, python2, stdenv, which , libiconv, postgresql, nodejs, clang, sqlite, zlib, imagemagick, lasem , pkg-config , ncurses, xapian, gpgme, util-linux, tzdata, icu, libffi , cmake, libssh2, openssl, openssl_1_1, libmysqlclient, git, perl, pcre2, gecode_3, curl @@ -407,15 +407,16 @@ in ++ lib.optional (lib.versionAtLeast attrs.version "1.53.0" && stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) autoSignDarwinBinariesHook; buildInputs = [ openssl ]; hardeningDisable = [ "format" ]; - env.NIX_CFLAGS_COMPILE = toString [ - "-Wno-error=stringop-overflow" - "-Wno-error=implicit-fallthrough" - "-Wno-error=sizeof-pointer-memaccess" - "-Wno-error=cast-function-type" - "-Wno-error=class-memaccess" - "-Wno-error=ignored-qualifiers" - "-Wno-error=tautological-compare" - "-Wno-error=stringop-truncation" + env.NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types"; + patches = [ + (fetchpatch { + name = "gcc-14-fixes.patch"; + url = "https://boringssl.googlesource.com/boringssl/+/c70190368c7040c37c1d655f0690bcde2b109a0d%5E%21/?format=TEXT"; + decode = "base64 -d"; + stripLen=1; + extraPrefix = "third_party/boringssl-with-bazel/src/"; + hash = "sha256-1QyQm5s55op268r72dfExNGV+UyV5Ty6boHa9DQq40U="; + }) ]; dontBuild = false; postPatch = '' diff --git a/pkgs/development/ruby-modules/gem/default.nix b/pkgs/development/ruby-modules/gem/default.nix index 5d7379cf56c7..f819173867c0 100644 --- a/pkgs/development/ruby-modules/gem/default.nix +++ b/pkgs/development/ruby-modules/gem/default.nix @@ -169,13 +169,16 @@ lib.makeOverridable ( # As of ruby 3.0, ruby headers require -fdeclspec when building with clang # Introduced in https://github.com/ruby/ruby/commit/0958e19ffb047781fe1506760c7cbd8d7fe74e57 - env.NIX_CFLAGS_COMPILE = toString ( - lib.optionals - (ruby.rubyEngine == "ruby" && stdenv.cc.isClang && lib.versionAtLeast ruby.version.major "3") - [ - "-fdeclspec" - ] - ); + env = lib.optionalAttrs (attrs ? env) attrs.env // { + NIX_CFLAGS_COMPILE = toString ( + lib.optionals + (ruby.rubyEngine == "ruby" && stdenv.cc.isClang && lib.versionAtLeast ruby.version.major "3") + [ + "-fdeclspec" + ] + ++ lib.optional (attrs.env.NIX_CFLAGS_COMPILE or "" != "") attrs.env.NIX_CFLAGS_COMPILE + ); + }; buildPhase = attrs.buildPhase or ''