diff --git a/pkgs/by-name/st/statix/package.nix b/pkgs/by-name/st/statix/package.nix index e3feff3d0bc7..1a68543c2586 100644 --- a/pkgs/by-name/st/statix/package.nix +++ b/pkgs/by-name/st/statix/package.nix @@ -4,9 +4,10 @@ fetchFromGitHub, withJson ? true, stdenv, + versionCheckHook, }: -rustPlatform.buildRustPackage rec { +rustPlatform.buildRustPackage (finalAttrs: { pname = "statix"; # also update version of the vim plugin in # pkgs/applications/editors/vim/plugins/overrides.nix @@ -16,7 +17,7 @@ rustPlatform.buildRustPackage rec { src = fetchFromGitHub { owner = "oppiliappan"; repo = "statix"; - rev = "v${version}"; + tag = "v${finalAttrs.version}"; sha256 = "sha256-bMs3XMiGP6sXCqdjna4xoV6CANOIWuISSzCaL5LYY4c="; }; @@ -27,14 +28,18 @@ rustPlatform.buildRustPackage rec { # tests are failing on darwin doCheck = !stdenv.hostPlatform.isDarwin; - meta = with lib; { + doInstallCheck = true; + nativeInstallCheckInputs = [ versionCheckHook ]; + versionCheckProgramArg = "--version"; + + meta = { description = "Lints and suggestions for the nix programming language"; homepage = "https://github.com/oppiliappan/statix"; - license = licenses.mit; + license = lib.licenses.mit; mainProgram = "statix"; - maintainers = with maintainers; [ + maintainers = with lib.maintainers; [ nerdypepper progrm_jarvis ]; }; -} +})