jq: use testers.testVersion instead of versionCheckHook

The version of `env` that's in the bootstrap -- and used here -- doesn't support `--argv0=`.
This commit is contained in:
Philip Taron
2025-06-04 21:56:10 -07:00
parent 02821c6a4d
commit c3ffb48991

View File

@@ -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"