nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 31 lines 812 B view raw
1{ fetchFromGitHub 2, lib 3, rustPlatform 4, lua52Support ? true 5, luauSupport ? false 6}: 7 8rustPlatform.buildRustPackage rec { 9 pname = "stylua"; 10 version = "0.13.1"; 11 12 src = fetchFromGitHub { 13 owner = "johnnymorganz"; 14 repo = pname; 15 rev = "v${version}"; 16 sha256 = "sha256-0Pl8SogCSZcboLHVAI45JqCLojAqIWBFuoZAK4gTzrs="; 17 }; 18 19 cargoSha256 = "sha256-VFgA5kOwUJG0GgKU4AUYCB/psAPM2GdTz5oRFgkrNi8="; 20 21 buildFeatures = lib.optional lua52Support "lua52" 22 ++ lib.optional luauSupport "luau"; 23 24 meta = with lib; { 25 description = "An opinionated Lua code formatter"; 26 homepage = "https://github.com/johnnymorganz/stylua"; 27 changelog = "https://github.com/johnnymorganz/stylua/blob/v${version}/CHANGELOG.md"; 28 license = licenses.mpl20; 29 maintainers = with maintainers; [ figsoda ]; 30 }; 31}