From cf6ce7b7d4e25c11b4c3df0af22c1a3dfe8f740a Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Thu, 9 Nov 2023 06:42:52 +0100 Subject: [PATCH 1/5] gecode_3: fix build with clang 16 --- pkgs/development/libraries/gecode/3.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/development/libraries/gecode/3.nix b/pkgs/development/libraries/gecode/3.nix index 36c7120ac609..1d6f158b52f2 100644 --- a/pkgs/development/libraries/gecode/3.nix +++ b/pkgs/development/libraries/gecode/3.nix @@ -18,10 +18,17 @@ stdenv.mkDerivation rec { (import ./fix-const-weights-clang-patch.nix fetchpatch) ]; + postPatch = '' + substituteInPlace gecode/flatzinc/lexer.yy.cpp \ + --replace "register " "" + ''; + nativeBuildInputs = [ perl ]; preConfigure = "patchShebangs configure"; + env.CXXFLAGS = lib.optionalString stdenv.cc.isClang "-std=c++14"; + meta = with lib; { license = licenses.mit; homepage = "https://www.gecode.org"; From a42220320aaef034d50c097896a15fd45137b2d9 Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Fri, 10 Nov 2023 03:23:10 +0100 Subject: [PATCH 2/5] texlive.dvisvgm.pkgs: fix build with clang 16 --- pkgs/tools/typesetting/tex/texlive/bin.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/typesetting/tex/texlive/bin.nix b/pkgs/tools/typesetting/tex/texlive/bin.nix index 402c0c247e95..2d7f859c809c 100644 --- a/pkgs/tools/typesetting/tex/texlive/bin.nix +++ b/pkgs/tools/typesetting/tex/texlive/bin.nix @@ -310,12 +310,21 @@ chktex = stdenv.mkDerivation { }; -dvisvgm = stdenv.mkDerivation rec { +dvisvgm = stdenv.mkDerivation { pname = "texlive-dvisvgm.bin"; inherit version; inherit (common) src; + patches = [ + (fetchpatch { + url = "https://github.com/mgieseki/dvisvgm/commit/629544928877362d0c6d64f20695f7df3073c5eb.patch"; + stripLen = 1; + extraPrefix = "texk/dvisvgm/dvisvgm-src/"; + hash = "sha256-CBCbc/woaFeLw7aBG/kSVYc3a5Q56zbAB64kK6mRy4g="; + }) + ]; + preConfigure = "cd texk/dvisvgm"; configureFlags = common.configureFlags From 8a05519cead638df8f9168e311ea69d8b33ebfd7 Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Fri, 10 Nov 2023 04:47:54 +0100 Subject: [PATCH 3/5] blahtexml: fix build with clang 16 --- pkgs/tools/typesetting/tex/blahtexml/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/tools/typesetting/tex/blahtexml/default.nix b/pkgs/tools/typesetting/tex/blahtexml/default.nix index ce071c7006f2..43981eb2ae92 100644 --- a/pkgs/tools/typesetting/tex/blahtexml/default.nix +++ b/pkgs/tools/typesetting/tex/blahtexml/default.nix @@ -11,6 +11,11 @@ stdenv.mkDerivation rec { hash = "sha256-DL5DyfARHHbwWBVHSa/VwHzNaAx/v7EDdnw1GLOk+y0="; }; + postPatch = lib.optionalString stdenv.cc.isClang '' + substituteInPlace makefile \ + --replace "\$(CXX)" "\$(CXX) -std=c++98" + ''; + outputs = [ "out" "doc" ]; nativeBuildInputs = [ texliveFull ]; # scheme-full needed for ucs package From bed269ffa57f7100ffbd7cda65f3a7b0fd7e9db3 Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Fri, 10 Nov 2023 05:02:01 +0100 Subject: [PATCH 4/5] vorbis-tools: fix build with clang 16 --- pkgs/applications/audio/vorbis-tools/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/applications/audio/vorbis-tools/default.nix b/pkgs/applications/audio/vorbis-tools/default.nix index 865d82a73562..46e67c7dc33e 100644 --- a/pkgs/applications/audio/vorbis-tools/default.nix +++ b/pkgs/applications/audio/vorbis-tools/default.nix @@ -14,6 +14,10 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook pkg-config ]; buildInputs = [ libogg libvorbis libao curl speex flac ]; + env = lib.optionalAttrs stdenv.cc.isClang { + NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration"; + }; + meta = with lib; { description = "Extra tools for Ogg-Vorbis audio codec"; longDescription = '' From 4f9710285899663149e00b90a7777f09be630bd1 Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Fri, 10 Nov 2023 08:34:39 +0100 Subject: [PATCH 5/5] python311Packages.udatetime: fix build --- pkgs/development/python-modules/udatetime/default.nix | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/pkgs/development/python-modules/udatetime/default.nix b/pkgs/development/python-modules/udatetime/default.nix index 17011e1b9073..9eef1512490d 100644 --- a/pkgs/development/python-modules/udatetime/default.nix +++ b/pkgs/development/python-modules/udatetime/default.nix @@ -1,7 +1,6 @@ { lib , buildPythonPackage , fetchPypi -, fetchpatch }: buildPythonPackage rec { @@ -13,16 +12,6 @@ buildPythonPackage rec { hash = "sha256-sQvFVwaZpDinLitaZOdr2MKO4779FvIJOHpVB/oLgwE="; }; - patches = [ - # fix build with python 3.9 - # https://github.com/freach/udatetime/pull/33 - (fetchpatch { - name = "freach-udatetime-pull-33.patch"; - url = "https://github.com/freach/udatetime/compare/75a07891426364f8bf0b44305b00bb1dd90534ae...2cfbc92cb274a80476a45c6c0d387c19e77a9f6e.patch"; - sha256 = "pPskJnie+9H3qKqf8X37sxB+CH3lpkj7IYl8HfiuV/4="; - }) - ]; - # tests not included on pypi doCheck = false;