Unverified Commit c4ecbb07 authored by Artturin's avatar Artturin Committed by GitHub
Browse files

btor2tools: fix on darwin (#346045)

parents ed0ddfe1 d6011f00
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -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; {