stylua: init at 0.8.1

This commit is contained in:
figsoda 2021-06-13 22:47:06 -04:00
parent e075fef89f
commit c3218e1ff7
2 changed files with 37 additions and 0 deletions

View 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 ];
};
}

View file

@ -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 { };