Merge pull request #143064 from figsoda/statix

statix: init at 0.3.1; vimPlugins.statix: init at 0.1.0

authored by

Sandro and committed by
GitHub
216705ad c447f6ee

+46
+16
pkgs/misc/vim-plugins/overrides.nix
··· 30 30 , nodePackages 31 31 , skim 32 32 , sqlite 33 + , statix 33 34 , stylish-haskell 34 35 , tabnine 35 36 , vim ··· 526 527 --replace "path = vim.g.sqlite_clib_path" "path = vim.g.sqlite_clib_path or ${lib.escapeShellArg libsqlite}" 527 528 ''; 528 529 }); 530 + 531 + statix = buildVimPluginFrom2Nix rec { 532 + inherit (statix) pname src meta; 533 + version = "0.1.0"; 534 + dependencies = with self; [ statix ]; 535 + postPatch = '' 536 + # check that version is up to date 537 + grep 'pname = "statix-vim"' -A 1 flake.nix \ 538 + | grep -F 'version = "${version}"' flake.nix 539 + 540 + cd vim-plugin 541 + substituteInPlace ftplugin/nix.vim --replace statix ${statix}/bin/statix 542 + substituteInPlace plugin/statix.vim --replace statix ${statix}/bin/statix 543 + ''; 544 + }; 529 545 530 546 sved = 531 547 let
+28
pkgs/tools/nix/statix/default.nix
··· 1 + { lib, rustPlatform, fetchFromGitHub, withJson ? true }: 2 + 3 + rustPlatform.buildRustPackage rec { 4 + pname = "statix"; 5 + # also update version of the vim plugin in pkgs/misc/vim-plugins/overrides.nix 6 + # the version can be found in flake.nix of the source code 7 + version = "0.3.1"; 8 + 9 + src = fetchFromGitHub { 10 + owner = "nerdypepper"; 11 + repo = pname; 12 + rev = "v${version}"; 13 + sha256 = "sha256-Jh3ErzK8vqEdDtZP7O/PAmHQznUTB18nCQwfckFxyLA="; 14 + }; 15 + 16 + cargoSha256 = "sha256-y+vBHAHTe++tYOWWQ5ioFlprRfDximZE8KSGNNBSPAk="; 17 + 18 + cargoBuildFlags = lib.optionals withJson [ "--features" "json" ]; 19 + 20 + cargoCheckFlags = cargoBuildFlags; 21 + 22 + meta = with lib; { 23 + description = "Lints and suggestions for the nix programming language"; 24 + homepage = "https://github.com/nerdypepper/statix"; 25 + license = licenses.mit; 26 + maintainers = with maintainers; [ figsoda nerdypepper ]; 27 + }; 28 + }
+2
pkgs/top-level/all-packages.nix
··· 15183 15183 15184 15184 sselp = callPackage ../tools/X11/sselp{ }; 15185 15185 15186 + statix = callPackage ../tools/nix/statix { }; 15187 + 15186 15188 stm32cubemx = callPackage ../development/embedded/stm32/stm32cubemx { }; 15187 15189 15188 15190 stm32flash = callPackage ../development/embedded/stm32/stm32flash { };