diff --git a/pkgs/development/libraries/gecode/3.nix b/pkgs/development/libraries/gecode/3.nix index 3cf5d590fa83..36c7120ac609 100644 --- a/pkgs/development/libraries/gecode/3.nix +++ b/pkgs/development/libraries/gecode/3.nix @@ -1,4 +1,9 @@ -{ lib, stdenv, fetchurl, perl }: +{ lib +, stdenv +, fetchurl +, fetchpatch +, perl +}: stdenv.mkDerivation rec { pname = "gecode"; @@ -9,6 +14,10 @@ stdenv.mkDerivation rec { sha256 = "0k45jas6p3cyldgyir1314ja3174sayn2h2ly3z9b4dl3368pk77"; }; + patches = [ + (import ./fix-const-weights-clang-patch.nix fetchpatch) + ]; + nativeBuildInputs = [ perl ]; preConfigure = "patchShebangs configure"; diff --git a/pkgs/development/libraries/gecode/default.nix b/pkgs/development/libraries/gecode/default.nix index fe13c893480c..57bac2295139 100644 --- a/pkgs/development/libraries/gecode/default.nix +++ b/pkgs/development/libraries/gecode/default.nix @@ -23,12 +23,7 @@ stdenv.mkDerivation rec { }; patches = [ - # 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"; - }) + (import ./fix-const-weights-clang-patch.nix fetchpatch) ]; enableParallelBuilding = true; diff --git a/pkgs/development/libraries/gecode/fix-const-weights-clang-patch.nix b/pkgs/development/libraries/gecode/fix-const-weights-clang-patch.nix new file mode 100644 index 000000000000..77160283afee --- /dev/null +++ b/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"; +})