depot/third_party/nixpkgs/pkgs/applications/science/logic/opensmt/default.nix
Default email a5adf1ddd8 Project import generated by Copybara.
GitOrigin-RevId: b3616bd96400ce0252c241d76fcafb64389defc6
2021-01-15 23:18:51 +01:00

38 lines
1 KiB
Nix

{ stdenv, lib, fetchFromGitHub
, cmake, libedit, gmpxx, bison, flex
, enableReadline ? false, readline
, gtest
}:
stdenv.mkDerivation rec {
pname = "opensmt";
version = "2.0.1";
src = fetchFromGitHub {
owner = "usi-verification-and-security";
repo = "opensmt";
rev = "v${version}";
sha256 = "uoIcXWsxxRsIuFsou3RcN9e48lc7cWMgRPVJLFVslDE=";
};
nativeBuildInputs = [ cmake bison flex ];
buildInputs = [ libedit gmpxx ]
++ lib.optional enableReadline readline;
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;
license = if enableReadline then licenses.gpl2Plus else licenses.mit;
homepage = "https://github.com/usi-verification-and-security/opensmt";
};
}