2021-12-06 19:02:23 +00:00
|
|
|
{ lib, rustPlatform, fetchFromGitHub, withJson ? true, stdenv }:
|
2021-10-27 01:58:26 +01:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "statix";
|
2022-02-16 14:55:43 +00:00
|
|
|
# also update version of the vim plugin in
|
|
|
|
# pkgs/applications/editors/vim/plugins/overrides.nix
|
2021-10-29 15:02:36 +01:00
|
|
|
# the version can be found in flake.nix of the source code
|
2022-02-21 00:16:42 +00:00
|
|
|
version = "0.5.4";
|
2021-10-27 01:58:26 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "nerdypepper";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-02-21 00:16:42 +00:00
|
|
|
sha256 = "sha256-9208bR3awxXR1MSh9HbsKeen5V4r4hPuJFkK/CMJRfg=";
|
2021-10-27 01:58:26 +01:00
|
|
|
};
|
|
|
|
|
2022-02-21 00:16:42 +00:00
|
|
|
cargoSha256 = "sha256-f1/PMbXUiqjFI8Y0mvgEyNqGGYqGq3nV094mg1aZIHM=";
|
2021-10-27 01:58:26 +01:00
|
|
|
|
2021-11-16 00:39:14 +00:00
|
|
|
buildFeatures = lib.optional withJson "json";
|
2021-10-27 01:58:26 +01:00
|
|
|
|
2021-12-06 19:02:23 +00:00
|
|
|
# tests are failing on darwin
|
|
|
|
doCheck = !stdenv.isDarwin;
|
|
|
|
|
2021-10-27 01:58:26 +01:00
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|