stylua: init at 0.8.1
This commit is contained in:
parent
e075fef89f
commit
c3218e1ff7
35
pkgs/development/tools/stylua/default.nix
Normal file
35
pkgs/development/tools/stylua/default.nix
Normal file
@ -0,0 +1,35 @@
|
||||
{ fetchFromGitHub
|
||||
, lib
|
||||
, rustPlatform
|
||||
, stdenvNoCC
|
||||
, lua52Support ? true
|
||||
, luauSupport ? false
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "stylua";
|
||||
version = "0.8.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "johnnymorganz";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "0gjm9pvwfbwhd49pm5sw5plwhlhvbfkms44h67zgvy7xzqv8h3dw";
|
||||
};
|
||||
|
||||
cargoSha256 = "117m78naldp6yvwcccvsrbnx6x6287cvq0saa06pmiqv1rqm50m3";
|
||||
|
||||
cargoBuildFlags = lib.optionals lua52Support [ "--features" "lua52" ]
|
||||
++ lib.optionals luauSupport [ "--features" "luau" ];
|
||||
|
||||
# test_standard fails on darwin
|
||||
doCheck = !stdenvNoCC.isDarwin;
|
||||
|
||||
meta = with lib; {
|
||||
description = "An opinionated Lua code formatter";
|
||||
homepage = "https://github.com/johnnymorganz/stylua";
|
||||
changelog = "https://github.com/johnnymorganz/stylua/blob/v${version}/CHANGELOG.md";
|
||||
license = licenses.mpl20;
|
||||
maintainers = with maintainers; [ figsoda ];
|
||||
};
|
||||
}
|
@ -14002,6 +14002,8 @@ in
|
||||
|
||||
strace = callPackage ../development/tools/misc/strace { };
|
||||
|
||||
stylua = callPackage ../development/tools/stylua { };
|
||||
|
||||
summon = callPackage ../development/tools/summon { };
|
||||
|
||||
svlint = callPackage ../development/tools/analysis/svlint { };
|
||||
|
Loading…
Reference in New Issue
Block a user