2021-01-14 15:26:10 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub
|
2020-11-02 12:50:10 +00:00
|
|
|
, cmake, libedit, gmpxx, bison, flex
|
|
|
|
, enableReadline ? false, readline
|
|
|
|
, gtest
|
2015-07-16 02:33:19 +01:00
|
|
|
}:
|
2010-12-05 18:22:14 +00:00
|
|
|
|
2015-07-16 02:33:19 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "opensmt";
|
2021-11-03 18:03:12 +00:00
|
|
|
version = "2.2.0";
|
2010-12-05 18:22:14 +00:00
|
|
|
|
2020-11-02 12:50:10 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "usi-verification-and-security";
|
|
|
|
repo = "opensmt";
|
|
|
|
rev = "v${version}";
|
2021-11-03 18:03:12 +00:00
|
|
|
sha256 = "sha256-6VkBGDzqG3mplpvFh5DIR0I1I2/J0Pi7xYk/yVn04Kg=";
|
2015-07-16 02:33:19 +01:00
|
|
|
};
|
2010-12-05 18:22:14 +00:00
|
|
|
|
2020-11-02 12:50:10 +00:00
|
|
|
nativeBuildInputs = [ cmake bison flex ];
|
|
|
|
buildInputs = [ libedit gmpxx ]
|
|
|
|
++ lib.optional enableReadline readline;
|
2014-07-28 10:43:20 +01:00
|
|
|
|
2020-11-02 12:50:10 +00:00
|
|
|
preConfigure = ''
|
|
|
|
substituteInPlace test/CMakeLists.txt \
|
|
|
|
--replace 'FetchContent_Populate' '#FetchContent_Populate'
|
|
|
|
'';
|
|
|
|
cmakeFlags = [
|
|
|
|
"-Dgoogletest_SOURCE_DIR=${gtest.src}"
|
|
|
|
"-Dgoogletest_BINARY_DIR=./gtest-build"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2010-12-05 18:22:14 +00:00
|
|
|
description = "A satisfiability modulo theory (SMT) solver";
|
2015-07-16 02:33:19 +01:00
|
|
|
maintainers = [ maintainers.raskin ];
|
|
|
|
platforms = platforms.linux;
|
2020-11-02 12:50:10 +00:00
|
|
|
license = if enableReadline then licenses.gpl2Plus else licenses.mit;
|
|
|
|
homepage = "https://github.com/usi-verification-and-security/opensmt";
|
2010-12-05 18:22:14 +00:00
|
|
|
};
|
2015-07-16 02:33:19 +01:00
|
|
|
}
|