Unverified Commit 716ad130 authored by Philip Taron's avatar Philip Taron Committed by GitHub
Browse files

jq: use testers.testVersion instead of versionCheckHook (#414140)

parents 437ad124 c3ffb489
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -8,8 +8,8 @@
  onigurumaSupport ? true,
  oniguruma,
  tzdata,
  versionCheckHook,
  nix-update-script,
  testers,
}:

stdenv.mkDerivation (finalAttrs: {
@@ -85,7 +85,6 @@ stdenv.mkDerivation (finalAttrs: {

  doInstallCheck = true;
  installCheckTarget = "check";
  nativeInstallCheckInputs = [ versionCheckHook ];

  preInstallCheck = ''
    substituteInPlace tests/shtest \
@@ -98,6 +97,11 @@ stdenv.mkDerivation (finalAttrs: {

  passthru = {
    inherit onigurumaSupport;
    tests.version = testers.testVersion {
      package = lib.getBin finalAttrs.finalPackage;
      command = "jq --version";
    };

    updateScript = nix-update-script {
      extraArgs = [
        "--version-regex"