about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/gecode
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2022-12-06 19:57:55 +0000
committerAlyssa Ross <hi@alyssa.is>2023-02-08 13:48:30 +0000
commitbf3aadfdd39aa197e18bade671fab6726349ffa4 (patch)
tree698567af766ed441d757b57a7b21e68d4a342a2b /nixpkgs/pkgs/development/libraries/gecode
parentf4afc5a01d9539ce09e47494e679c51f80723d07 (diff)
parent99665eb45f58d959d2cb9e49ddb960c79d596f33 (diff)
downloadnixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar
nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.gz
nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.bz2
nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.lz
nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.xz
nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.zst
nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.zip
Merge commit '99665eb45f58d959d2cb9e49ddb960c79d596f33'
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/gecode')
-rw-r--r--nixpkgs/pkgs/development/libraries/gecode/3.nix14
-rw-r--r--nixpkgs/pkgs/development/libraries/gecode/default.nix17
-rw-r--r--nixpkgs/pkgs/development/libraries/gecode/fix-const-weights-clang-patch.nix7
3 files changed, 35 insertions, 3 deletions
diff --git a/nixpkgs/pkgs/development/libraries/gecode/3.nix b/nixpkgs/pkgs/development/libraries/gecode/3.nix
index 5c660a99ef84..685baea4a4ca 100644
--- a/nixpkgs/pkgs/development/libraries/gecode/3.nix
+++ b/nixpkgs/pkgs/development/libraries/gecode/3.nix
@@ -1,4 +1,9 @@
-{ lib, stdenv, fetchurl, bash, perl }:
+{ lib
+, stdenv
+, fetchurl
+, fetchpatch
+, perl
+}:
 
 stdenv.mkDerivation rec {
   pname = "gecode";
@@ -9,11 +14,16 @@ stdenv.mkDerivation rec {
     sha256 = "0k45jas6p3cyldgyir1314ja3174sayn2h2ly3z9b4dl3368pk77";
   };
 
-  nativeBuildInputs = [ bash perl ];
+  patches = [
+    (import ./fix-const-weights-clang-patch.nix fetchpatch)
+  ];
+
+  nativeBuildInputs = [ perl ];
 
   preConfigure = "patchShebangs configure";
 
   meta = with lib; {
+    broken = stdenv.isDarwin;
     license = licenses.mit;
     homepage = "https://www.gecode.org";
     description = "Toolkit for developing constraint-based systems";
diff --git a/nixpkgs/pkgs/development/libraries/gecode/default.nix b/nixpkgs/pkgs/development/libraries/gecode/default.nix
index fc9835d85db5..57bac2295139 100644
--- a/nixpkgs/pkgs/development/libraries/gecode/default.nix
+++ b/nixpkgs/pkgs/development/libraries/gecode/default.nix
@@ -1,4 +1,15 @@
-{ lib, stdenv, fetchFromGitHub, bison, flex, perl, gmp, mpfr, enableGist ? true, qtbase }:
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, bison
+, flex
+, perl
+, gmp
+, mpfr
+, qtbase
+, enableGist ? true
+}:
 
 stdenv.mkDerivation rec {
   pname = "gecode";
@@ -11,6 +22,10 @@ stdenv.mkDerivation rec {
     sha256 = "0b1cq0c810j1xr2x9y9996p894571sdxng5h74py17c6nr8c6dmk";
   };
 
+  patches = [
+    (import ./fix-const-weights-clang-patch.nix fetchpatch)
+  ];
+
   enableParallelBuilding = true;
   dontWrapQtApps = true;
   nativeBuildInputs = [ bison flex ];
diff --git a/nixpkgs/pkgs/development/libraries/gecode/fix-const-weights-clang-patch.nix b/nixpkgs/pkgs/development/libraries/gecode/fix-const-weights-clang-patch.nix
new file mode 100644
index 000000000000..77160283afee
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gecode/fix-const-weights-clang-patch.nix
@@ -0,0 +1,7 @@
+fetchpatch:
+# https://github.com/Gecode/gecode/pull/74
+(fetchpatch {
+  name = "fix-const-weights-clang.patch";
+  url = "https://github.com/Gecode/gecode/commit/c810c96b1ce5d3692e93439f76c4fa7d3daf9fbb.patch";
+  sha256 = "0270msm22q5g5sqbdh8kmrihlxnnxqrxszk9a49hdxd72736p4fc";
+})