stylua: 0.14.3 -> 0.15.0 (#192279)

This commit is contained in:
figsoda 2022-09-22 00:50:19 -04:00 committed by GitHub
parent f586d35a11
commit 2bf91a6157
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 23 additions and 17 deletions

View file

@ -563,6 +563,15 @@
option, and it is enabled by default, for servers.
</para>
</listitem>
<listitem>
<para>
<literal>stylua</literal> no longer accepts
<literal>lua52Support</literal> and
<literal>luauSupport</literal> overrides, use
<literal>features</literal> instead, which defaults to
<literal>[ &quot;lua54&quot; &quot;luau&quot; ]</literal>.
</para>
</listitem>
</itemizedlist>
</section>
<section xml:id="sec-release-22.11-notable-changes">

View file

@ -192,6 +192,8 @@ Available as [services.patroni](options.html#opt-services.patroni.enable).
- `k3s` supports `clusterInit` option, and it is enabled by default, for servers.
- `stylua` no longer accepts `lua52Support` and `luauSupport` overrides, use `features` instead, which defaults to `[ "lua54" "luau" ]`.
<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
## Other Notable Changes {#sec-release-22.11-notable-changes}

View file

@ -1,34 +1,29 @@
{ fetchFromGitHub
, lib
{ lib
, rustPlatform
, lua52Support ? true
, luauSupport ? false
, fetchpatch
, fetchFromGitHub
# lua54 implies lua52/lua53
, features ? [ "lua54" "luau" ]
}:
rustPlatform.buildRustPackage rec {
pname = "stylua";
version = "0.14.3";
version = "0.15.0";
src = fetchFromGitHub {
owner = "johnnymorganz";
repo = pname;
rev = "v${version}";
sha256 = "sha256-l4q6Qlgdxgm4K5+NkWMZI3Hhtx6m/0DG9PE4gvo/ylo=";
sha256 = "sha256-x4/DmFi/6bIQVn8sfSFEOJIv4Zd/3oHKXbrd6yIsSYU=";
};
cargoSha256 = "sha256-zlk9KdiSKWknyuJTTqpzCeSJUXJGDK2A0g1ss8AHoYs=";
cargoSha256 = "sha256-lY18so+uG3yri18zd29B479nl0l1C0F1mw+sPrccRQs=";
cargoPatches = [
# fixes broken 0.14.3 lockfile
(fetchpatch {
url = "https://github.com/JohnnyMorganz/StyLua/commit/834f632f67af6425e7773eaade8d23a880946843.patch";
sha256 = "sha256-oM2gaILwiNMqTGFRQBw6/fxbjljNWxeIb0lcXcAJR3w=";
})
];
# remove cargo config so it can find the linker on aarch64-unknown-linux-gnu
postPatch = ''
rm .cargo/config.toml
'';
buildFeatures = lib.optional lua52Support "lua52"
++ lib.optional luauSupport "luau";
buildFeatures = features;
meta = with lib; {
description = "An opinionated Lua code formatter";