nixpkgs/pkgs/tools/nix/statix/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

32 lines
937 B
Nix
Raw Normal View History

2021-12-06 19:02:23 +00:00
{ lib, rustPlatform, fetchFromGitHub, withJson ? true, stdenv }:
2021-10-27 00:58:26 +00:00
rustPlatform.buildRustPackage rec {
pname = "statix";
# also update version of the vim plugin in
# pkgs/applications/editors/vim/plugins/overrides.nix
# the version can be found in flake.nix of the source code
2023-09-09 11:42:23 +00:00
version = "0.5.8";
2021-10-27 00:58:26 +00:00
src = fetchFromGitHub {
owner = "nerdypepper";
repo = pname;
rev = "v${version}";
2023-09-09 11:42:23 +00:00
sha256 = "sha256-bMs3XMiGP6sXCqdjna4xoV6CANOIWuISSzCaL5LYY4c=";
2021-10-27 00:58:26 +00:00
};
2023-09-09 11:42:23 +00:00
cargoSha256 = "sha256-QF7P0CWlKfBzVQC//eKhf/u1qV9AfLIJDxWDDWzMG8g=";
2021-10-27 00:58:26 +00:00
2021-11-16 00:39:14 +00:00
buildFeatures = lib.optional withJson "json";
2021-10-27 00:58:26 +00:00
2021-12-06 19:02:23 +00:00
# tests are failing on darwin
doCheck = !stdenv.isDarwin;
2021-10-27 00:58:26 +00:00
meta = with lib; {
description = "Lints and suggestions for the nix programming language";
homepage = "https://github.com/nerdypepper/statix";
license = licenses.mit;
2023-08-05 01:57:14 +00:00
mainProgram = "statix";
2021-10-27 00:58:26 +00:00
maintainers = with maintainers; [ figsoda nerdypepper ];
};
}