2024-01-29 20:26:07 +00:00
|
|
|
{ lib, stdenv, cmake, fetchFromGitHub, fetchpatch, fixDarwinDylibNames }:
|
2018-08-15 20:46:37 +00:00
|
|
|
|
2020-05-24 13:01:08 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "btor2tools";
|
2024-08-22 11:06:26 +00:00
|
|
|
version = "unstable-2024-08-07";
|
2018-08-15 20:46:37 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "boolector";
|
|
|
|
repo = "btor2tools";
|
2024-08-22 11:06:26 +00:00
|
|
|
rev = "44bcadbfede292ff4c4a4a8962cc18130de522fb";
|
|
|
|
sha256 = "0ncl4xwms8d656x95ga8v8zjybx4cmdl5hlcml7dpcgm3p8qj4ks";
|
2018-08-15 20:46:37 +00:00
|
|
|
};
|
|
|
|
|
2024-09-24 15:50:49 +00:00
|
|
|
nativeBuildInputs = [ cmake ] ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
|
2018-08-15 20:46:37 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out $dev/include/btor2parser/ $lib/lib
|
|
|
|
|
|
|
|
cp -vr bin $out
|
2020-05-24 13:01:08 +00:00
|
|
|
cp -v ../src/btor2parser/btor2parser.h $dev/include/btor2parser
|
|
|
|
cp -v lib/libbtor2parser.* $lib/lib
|
2018-08-15 20:46:37 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
outputs = [ "out" "dev" "lib" ];
|
|
|
|
|
2022-07-12 15:20:45 +00:00
|
|
|
cmakeFlags = [
|
|
|
|
# RPATH of binary /nix/store/.../bin/btorsim contains a forbidden reference to /build/
|
|
|
|
"-DCMAKE_SKIP_BUILD_RPATH=ON"
|
|
|
|
];
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-12-08 16:46:29 +00:00
|
|
|
description = "Generic parser and tool package for the BTOR2 format";
|
|
|
|
homepage = "https://github.com/Boolector/btor2tools";
|
2018-08-15 20:46:37 +00:00
|
|
|
license = licenses.mit;
|
2020-10-16 17:38:48 +00:00
|
|
|
platforms = platforms.unix;
|
2018-08-15 20:46:37 +00:00
|
|
|
maintainers = with maintainers; [ thoughtpolice ];
|
|
|
|
};
|
|
|
|
}
|