Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
42 lines
947 B
Nix
42 lines
947 B
Nix
{
|
|
lib,
|
|
rustPlatform,
|
|
fetchFromGitHub,
|
|
# lua54 implies lua52/lua53
|
|
features ? [
|
|
"lua54"
|
|
"luajit"
|
|
"luau"
|
|
],
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "stylua";
|
|
version = "2.3.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "johnnymorganz";
|
|
repo = "stylua";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-iyZ30Gc32TQsQyMLwArfIRtM0NkbXkqmca46nI0526M=";
|
|
};
|
|
|
|
cargoHash = "sha256-H50/e/XyFvXHhwrKUbKZFZwSHfwAkAtddEvFiOr5220=";
|
|
|
|
# remove cargo config so it can find the linker on aarch64-unknown-linux-gnu
|
|
postPatch = ''
|
|
rm .cargo/config.toml
|
|
'';
|
|
|
|
buildFeatures = features;
|
|
|
|
meta = {
|
|
description = "Opinionated Lua code formatter";
|
|
homepage = "https://github.com/johnnymorganz/stylua";
|
|
changelog = "https://github.com/johnnymorganz/stylua/blob/v${version}/CHANGELOG.md";
|
|
license = lib.licenses.mpl20;
|
|
maintainers = with lib.maintainers; [ figsoda ];
|
|
mainProgram = "stylua";
|
|
};
|
|
}
|