diff --git a/pkgs/by-name/js/jsonfmt/package.nix b/pkgs/by-name/js/jsonfmt/package.nix index b44ada35049d..327028453c66 100644 --- a/pkgs/by-name/js/jsonfmt/package.nix +++ b/pkgs/by-name/js/jsonfmt/package.nix @@ -2,8 +2,7 @@ lib, buildGoModule, fetchFromGitHub, - testers, - jsonfmt, + versionCheckHook, }: buildGoModule rec { @@ -19,17 +18,15 @@ buildGoModule rec { vendorHash = "sha256-QcljmDsz5LsXfHaXNVBU7IIVVgkm3Vfnirchx5ZOMSg="; + nativeInstallCheckInputs = [ versionCheckHook ]; + ldflags = [ "-s" "-w" "-X=main.version=${version}" ]; - passthru.tests = { - version = testers.testVersion { - package = jsonfmt; - }; - }; + doInstallCheck = true; meta = { description = "Formatter for JSON files";