btor2tools: fix on darwin (#346045)

This commit is contained in:
Artturin 2024-10-04 01:54:17 +03:00 committed by GitHub
commit c4ecbb07b8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -21,11 +21,24 @@ stdenv.mkDerivation rec {
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; {