Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
63 lines
1.4 KiB
Nix
63 lines
1.4 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
cmake,
|
|
fetchFromGitHub,
|
|
fixDarwinDylibNames,
|
|
}:
|
|
|
|
stdenv.mkDerivation {
|
|
pname = "btor2tools";
|
|
version = "0-unstable-2025-09-18";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "boolector";
|
|
repo = "btor2tools";
|
|
rev = "d33c73ff1d173f1bfac8ba6b1c6d68ba62c55f8e";
|
|
sha256 = "sha256-RVjZ5HM2yQ3eAICFuzwvNeQDXzWzzSiCCslIWMJi6U8=";
|
|
};
|
|
|
|
nativeBuildInputs = [ cmake ] ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
|
|
|
|
installPhase = ''
|
|
mkdir -p $out $dev/include/btor2parser/ $lib/lib
|
|
|
|
cp -vr bin $out
|
|
cp -v ../src/btor2parser/btor2parser.h $dev/include/btor2parser
|
|
cp -v lib/libbtor2parser.* $lib/lib
|
|
'';
|
|
|
|
doInstallCheck = true;
|
|
|
|
installCheckPhase = ''
|
|
runHook preInstallCheck
|
|
|
|
# make sure shared libraries are present and program can be executed
|
|
$out/bin/btorsim -h > /dev/null
|
|
|
|
runHook postInstallCheck
|
|
'';
|
|
|
|
outputs = [
|
|
"out"
|
|
"dev"
|
|
"lib"
|
|
];
|
|
|
|
cmakeFlags = [
|
|
# RPATH of binary /nix/store/.../bin/btorsim contains a forbidden reference to /build/
|
|
"-DCMAKE_SKIP_BUILD_RPATH=ON"
|
|
]
|
|
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
|
"-DCMAKE_BUILD_WITH_INSTALL_NAME_DIR=ON"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Generic parser and tool package for the BTOR2 format";
|
|
homepage = "https://github.com/Boolector/btor2tools";
|
|
license = licenses.mit;
|
|
platforms = platforms.unix;
|
|
maintainers = with maintainers; [ thoughtpolice ];
|
|
};
|
|
}
|