statix: use finalAttrs

This commit is contained in:
Petr Portnov
2025-12-08 21:18:54 +03:00
parent 1b0fe557b8
commit c7bc3f06ee
+11 -6
View File
@@ -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
];
};
}
})