depot/third_party/nixpkgs/pkgs/applications/science/logic/opensmt/default.nix
Default email 02cf88bb76 Project import generated by Copybara.
GitOrigin-RevId: c4a0efdd5a728e20791b8d8d2f26f90ac228ee8d
2022-08-12 15:06:08 +03:00

39 lines
1.1 KiB
Nix

{ stdenv, lib, fetchFromGitHub
, cmake, libedit, gmpxx, bison, flex
, enableReadline ? false, readline
, gtest
}:
stdenv.mkDerivation rec {
pname = "opensmt";
version = "2.4.1";
src = fetchFromGitHub {
owner = "usi-verification-and-security";
repo = "opensmt";
rev = "v${version}";
sha256 = "sha256-Hy+NCR0gbU06WnfIyKy6XTH94vd0CevwGbZ7KlXVvIQ=";
};
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; {
broken = (stdenv.isLinux && stdenv.isAarch64);
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";
};
}