mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-03 03:23:17 +00:00
4d85cedf5a
Per https://bodhi.fedoraproject.org/updates/FEDORA-2022-dc47174c36: This update fixes a failure to build with source with bash 5.2. Bash's `patsub_replacement` feature makes ampersand a special character when doing variable substitution, which was not previously the case. This update instructs bash to turn off the new behavior. We exclude the unrelated change in that Fedora update (i.e. using Python 3.11's `tomllib` instead of the PyPI `toml` package) since: - we package cvc4 with Python versions earlier than 3.11; and - since cvc4 is no longer being updated, sticking with the PyPI `toml` package causes no extra work in the future.
50 lines
1.3 KiB
Nix
50 lines
1.3 KiB
Nix
{ lib, stdenv, fetchFromGitHub, cmake, cln, gmp, git, swig, pkg-config
|
|
, readline, libantlr3c, boost, jdk, python3, antlr3_4
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "cvc4";
|
|
version = "1.8";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "cvc4";
|
|
repo = "cvc4";
|
|
rev = version;
|
|
sha256 = "1rhs4pvzaa1wk00czrczp58b2cxfghpsnq534m0l3snnya2958jp";
|
|
};
|
|
|
|
nativeBuildInputs = [ pkg-config cmake ];
|
|
buildInputs = [ gmp git python3.pkgs.toml readline swig libantlr3c antlr3_4 boost jdk python3 ]
|
|
++ lib.optionals (!stdenv.isDarwin) [ cln ];
|
|
configureFlags = [
|
|
"--enable-language-bindings=c,c++,java"
|
|
"--enable-gpl"
|
|
"--with-readline"
|
|
"--with-boost=${boost.dev}"
|
|
] ++ lib.optionals (!stdenv.isDarwin) [ "--with-cln" ];
|
|
|
|
prePatch = ''
|
|
patch -p1 -i ${./minisat-fenv.patch} -d src/prop/minisat
|
|
patch -p1 -i ${./minisat-fenv.patch} -d src/prop/bvminisat
|
|
'';
|
|
|
|
patches = [
|
|
./cvc4-bash-patsub-replacement.patch
|
|
];
|
|
|
|
preConfigure = ''
|
|
patchShebangs ./src/
|
|
'';
|
|
cmakeFlags = [
|
|
"-DCMAKE_BUILD_TYPE=Production"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "A high-performance theorem prover and SMT solver";
|
|
homepage = "http://cvc4.cs.stanford.edu/web/";
|
|
license = licenses.gpl3;
|
|
platforms = platforms.unix;
|
|
maintainers = with maintainers; [ vbgl thoughtpolice gebner ];
|
|
};
|
|
}
|