summary refs log tree commit diff
path: root/pkgs/development/libraries
diff options
context:
space:
mode:
authorWeijia Wang <9713184+wegank@users.noreply.github.com>2023-11-10 07:54:27 +0100
committerGitHub <noreply@github.com>2023-11-10 07:54:27 +0100
commitf02ad3afa0860995ec70b32de454d70922838b3e (patch)
tree707262ca2bf1c4cb76f24c6dc189a932a4b5969b /pkgs/development/libraries
parent107ad2184e74337161038567a5735501c833ddb7 (diff)
parentcf6ce7b7d4e25c11b4c3df0af22c1a3dfe8f740a (diff)
downloadnixpkgs-f02ad3afa0860995ec70b32de454d70922838b3e.tar
nixpkgs-f02ad3afa0860995ec70b32de454d70922838b3e.tar.gz
nixpkgs-f02ad3afa0860995ec70b32de454d70922838b3e.tar.bz2
nixpkgs-f02ad3afa0860995ec70b32de454d70922838b3e.tar.lz
nixpkgs-f02ad3afa0860995ec70b32de454d70922838b3e.tar.xz
nixpkgs-f02ad3afa0860995ec70b32de454d70922838b3e.tar.zst
nixpkgs-f02ad3afa0860995ec70b32de454d70922838b3e.zip
Merge pull request #266394 from wegank/gecode-clang-16
gecode_3: fix build with clang 16
Diffstat (limited to 'pkgs/development/libraries')
-rw-r--r--pkgs/development/libraries/gecode/3.nix7
1 files changed, 7 insertions, 0 deletions
diff --git a/pkgs/development/libraries/gecode/3.nix b/pkgs/development/libraries/gecode/3.nix
index 36c7120ac60..1d6f158b52f 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";