567e8dfd8e
This commit was created by a combination of scripts and tools: - an ast-grep script to prefix things in meta with `lib.`, - a modified nixf-diagnose / nixf combination to remove unused `with lib;`, and - regular nixfmt. Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
41 lines
867 B
Nix
41 lines
867 B
Nix
{
|
|
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)
|
|
];
|
|
|
|
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 = {
|
|
license = lib.licenses.mit;
|
|
homepage = "https://www.gecode.org";
|
|
description = "Toolkit for developing constraint-based systems";
|
|
platforms = lib.platforms.all;
|
|
maintainers = [ lib.maintainers.manveru ];
|
|
};
|
|
}
|