diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/gecode')
3 files changed, 82 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/gecode/3.nix b/nixpkgs/pkgs/development/libraries/gecode/3.nix new file mode 100644 index 000000000000..685baea4a4ca --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/gecode/3.nix @@ -0,0 +1,33 @@ +{ lib +, stdenv +, fetchurl +, fetchpatch +, perl +}: + +stdenv.mkDerivation rec { + pname = "gecode"; + version = "3.7.3"; + + src = fetchurl { + url = "http://www.gecode.org/download/${pname}-${version}.tar.gz"; + sha256 = "0k45jas6p3cyldgyir1314ja3174sayn2h2ly3z9b4dl3368pk77"; + }; + + 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"; + platforms = platforms.all; + maintainers = [ maintainers.manveru ]; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/gecode/default.nix b/nixpkgs/pkgs/development/libraries/gecode/default.nix new file mode 100644 index 000000000000..57bac2295139 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/gecode/default.nix @@ -0,0 +1,42 @@ +{ lib +, stdenv +, fetchFromGitHub +, fetchpatch +, bison +, flex +, perl +, gmp +, mpfr +, qtbase +, enableGist ? true +}: + +stdenv.mkDerivation rec { + pname = "gecode"; + version = "6.2.0"; + + src = fetchFromGitHub { + owner = "Gecode"; + repo = "gecode"; + rev = "release-${version}"; + sha256 = "0b1cq0c810j1xr2x9y9996p894571sdxng5h74py17c6nr8c6dmk"; + }; + + patches = [ + (import ./fix-const-weights-clang-patch.nix fetchpatch) + ]; + + enableParallelBuilding = true; + dontWrapQtApps = true; + nativeBuildInputs = [ bison flex ]; + buildInputs = [ perl gmp mpfr ] + ++ lib.optional enableGist qtbase; + + meta = with lib; { + license = licenses.mit; + homepage = "https://www.gecode.org"; + description = "Toolkit for developing constraint-based systems"; + platforms = platforms.all; + maintainers = [ ]; + }; +} 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"; +}) |