nixpkgs-suyu/pkgs/applications/science/logic/opensmt/default.nix

39 lines
1 KiB
Nix
Raw Normal View History

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
}:
stdenv.mkDerivation rec {
pname = "opensmt";
2020-11-02 13:50:10 +01:00
version = "2.0.1";
2020-11-02 13:50:10 +01:00
src = fetchFromGitHub {
owner = "usi-verification-and-security";
repo = "opensmt";
rev = "v${version}";
sha256 = "uoIcXWsxxRsIuFsou3RcN9e48lc7cWMgRPVJLFVslDE=";
};
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; {
description = "A satisfiability modulo theory (SMT) solver";
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";
};
}