forgejo-lts: 7.0.10 -> 7.0.11
[NixPkgs.git] / pkgs / development / libraries / gecode / 3.nix
blob1d6f158b52f2bfd37de14582d8f8e2c153c913ff
1 { lib
2 , stdenv
3 , fetchurl
4 , fetchpatch
5 , perl
6 }:
8 stdenv.mkDerivation rec {
9   pname = "gecode";
10   version = "3.7.3";
12   src = fetchurl {
13     url = "http://www.gecode.org/download/${pname}-${version}.tar.gz";
14     sha256 = "0k45jas6p3cyldgyir1314ja3174sayn2h2ly3z9b4dl3368pk77";
15   };
17   patches = [
18     (import ./fix-const-weights-clang-patch.nix fetchpatch)
19   ];
21   postPatch = ''
22     substituteInPlace gecode/flatzinc/lexer.yy.cpp \
23       --replace "register " ""
24   '';
26   nativeBuildInputs = [ perl ];
28   preConfigure = "patchShebangs configure";
30   env.CXXFLAGS = lib.optionalString stdenv.cc.isClang "-std=c++14";
32   meta = with lib; {
33     license = licenses.mit;
34     homepage = "https://www.gecode.org";
35     description = "Toolkit for developing constraint-based systems";
36     platforms = platforms.all;
37     maintainers = [ maintainers.manveru ];
38   };