Merge pull request #143064 from figsoda/statix
statix: init at 0.3.1; vimPlugins.statix: init at 0.1.0
This commit is contained in:
commit
216705ad7d
|
@ -30,6 +30,7 @@
|
|||
, nodePackages
|
||||
, skim
|
||||
, sqlite
|
||||
, statix
|
||||
, stylish-haskell
|
||||
, tabnine
|
||||
, vim
|
||||
|
@ -527,6 +528,21 @@ self: super: {
|
|||
'';
|
||||
});
|
||||
|
||||
statix = buildVimPluginFrom2Nix rec {
|
||||
inherit (statix) pname src meta;
|
||||
version = "0.1.0";
|
||||
dependencies = with self; [ statix ];
|
||||
postPatch = ''
|
||||
# check that version is up to date
|
||||
grep 'pname = "statix-vim"' -A 1 flake.nix \
|
||||
| grep -F 'version = "${version}"' flake.nix
|
||||
|
||||
cd vim-plugin
|
||||
substituteInPlace ftplugin/nix.vim --replace statix ${statix}/bin/statix
|
||||
substituteInPlace plugin/statix.vim --replace statix ${statix}/bin/statix
|
||||
'';
|
||||
};
|
||||
|
||||
sved =
|
||||
let
|
||||
# we put the script in its own derivation to benefit the magic of wrapGAppsHook
|
||||
|
|
28
pkgs/tools/nix/statix/default.nix
Normal file
28
pkgs/tools/nix/statix/default.nix
Normal file
|
@ -0,0 +1,28 @@
|
|||
{ 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
|
||||
version = "0.3.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "nerdypepper";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-Jh3ErzK8vqEdDtZP7O/PAmHQznUTB18nCQwfckFxyLA=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-y+vBHAHTe++tYOWWQ5ioFlprRfDximZE8KSGNNBSPAk=";
|
||||
|
||||
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 ];
|
||||
};
|
||||
}
|
|
@ -15183,6 +15183,8 @@ with pkgs;
|
|||
|
||||
sselp = callPackage ../tools/X11/sselp{ };
|
||||
|
||||
statix = callPackage ../tools/nix/statix { };
|
||||
|
||||
stm32cubemx = callPackage ../development/embedded/stm32/stm32cubemx { };
|
||||
|
||||
stm32flash = callPackage ../development/embedded/stm32/stm32flash { };
|
||||
|
|
Loading…
Reference in a new issue