2021-01-14 16:26:10 +01:00
|
|
|
{ stdenv, lib, fetchFromGitHub
|
2020-11-02 13:50:10 +01:00
|
|
|
, cmake, libedit, gmpxx, bison, flex
|
|
|
|
, enableReadline ? false, readline
|
|
|
|
, gtest
|
2015-07-16 03:33:19 +02:00
|
|
|
}:
|
2010-12-05 19:22:14 +01:00
|
|
|
|
2015-07-16 03:33:19 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "opensmt";
|
2020-11-02 13:50:10 +01:00
|
|
|
version = "2.0.1";
|
2010-12-05 19:22:14 +01:00
|
|
|
|
2020-11-02 13:50:10 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "usi-verification-and-security";
|
|
|
|
repo = "opensmt";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "uoIcXWsxxRsIuFsou3RcN9e48lc7cWMgRPVJLFVslDE=";
|
2015-07-16 03:33:19 +02:00
|
|
|
};
|
2010-12-05 19:22:14 +01:00
|
|
|
|
2020-11-02 13:50:10 +01:00
|
|
|
nativeBuildInputs = [ cmake bison flex ];
|
|
|
|
buildInputs = [ libedit gmpxx ]
|
|
|
|
++ lib.optional enableReadline readline;
|
2014-07-28 11:43:20 +02:00
|
|
|
|
2020-11-02 13:50:10 +01: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 19:22:14 +01:00
|
|
|
description = "A satisfiability modulo theory (SMT) solver";
|
2015-07-16 03:33:19 +02:00
|
|
|
maintainers = [ maintainers.raskin ];
|
|
|
|
platforms = platforms.linux;
|
2020-11-02 13:50:10 +01:00
|
|
|
license = if enableReadline then licenses.gpl2Plus else licenses.mit;
|
|
|
|
homepage = "https://github.com/usi-verification-and-security/opensmt";
|
2010-12-05 19:22:14 +01:00
|
|
|
};
|
2015-07-16 03:33:19 +02:00
|
|
|
}
|