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

29 lines
876 B
Nix
Raw Normal View History

2021-10-27 02:58:26 +02:00
{ lib, rustPlatform, fetchFromGitHub, withJson ? true }:
rustPlatform.buildRustPackage rec {
pname = "statix";
# 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-06 16:04:21 +01:00
version = "0.4.0";
2021-10-27 02:58:26 +02:00
src = fetchFromGitHub {
owner = "nerdypepper";
repo = pname;
rev = "v${version}";
2021-11-06 16:04:21 +01:00
sha256 = "sha256-wqkhtAOO6pKLjUUnDbVFwzm6mbXhP/4iJU7ZKtDKrE8=";
2021-10-27 02:58:26 +02:00
};
2021-11-06 16:04:21 +01:00
cargoSha256 = "sha256-e20POz9ZvuT0S+YG+9x7hcudhXQpOR4rVSFJbz76OI0=";
2021-10-27 02:58:26 +02: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 ];
};
}