2021-10-27 01:58:26 +01:00
|
|
|
{ lib, rustPlatform, fetchFromGitHub, withJson ? true }:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "statix";
|
2021-10-29 15:02:36 +01:00
|
|
|
# also update version of the vim plugin in pkgs/misc/vim-plugins/overrides.nix
|
|
|
|
# the version can be found in flake.nix of the source code
|
2021-11-01 15:59:54 +00:00
|
|
|
version = "0.3.5";
|
2021-10-27 01:58:26 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "nerdypepper";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-11-01 15:59:54 +00:00
|
|
|
sha256 = "sha256-vJvHmg6X/B6wQYjeX1FZC4MDGo0HkKbTmQH+l4tZAwg=";
|
2021-10-27 01:58:26 +01:00
|
|
|
};
|
|
|
|
|
2021-11-01 15:59:54 +00:00
|
|
|
cargoSha256 = "sha256-OfLpnVe1QIjpjpD4ticG/7AxPGFMMjBWN3DdLZq6pA8=";
|
2021-10-27 01:58:26 +01:00
|
|
|
|
|
|
|
cargoBuildFlags = lib.optionals withJson [ "--features" "json" ];
|
|
|
|
|
|
|
|
cargoCheckFlags = cargoBuildFlags;
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Lints and suggestions for the nix programming language";
|
|
|
|
homepage = "https://github.com/nerdypepper/statix";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ figsoda nerdypepper ];
|
|
|
|
};
|
|
|
|
}
|