Commit f75cb3c5 authored by Sergei Zimmerman's avatar Sergei Zimmerman
Browse files

cbmc: use versionCheckHook instead of testers.testVersion

There's no reason to use passthru.tests for this and manual
<doc/stdenv/passthru.chapter.md> recommends to do this by default.
parent 8d5481ae
Loading
Loading
Loading
Loading
+7 −6
Original line number Diff line number Diff line
@@ -2,10 +2,8 @@
  lib,
  stdenv,
  fetchFromGitHub,
  testers,
  bison,
  cadical,
  cbmc,
  cmake,
  flex,
  makeWrapper,
@@ -14,6 +12,7 @@
  cudd,
  nix-update-script,
  fetchpatch,
  versionCheckHook,
}:

stdenv.mkDerivation (finalAttrs: {
@@ -109,10 +108,12 @@ stdenv.mkDerivation (finalAttrs: {
    "-Dsat_impl=cadical"
  ];

  passthru.tests.version = testers.testVersion {
    package = cbmc;
    command = "cbmc --version";
  };
  nativeInstallCheckInputs = [
    versionCheckHook
  ];
  doInstallCheck = true;
  versionCheckProgram = "${placeholder "out"}/bin/cbmc";
  versionCheckProgramArg = "--version";

  passthru.updateScript = nix-update-script {
    extraArgs = [