diff options
Diffstat (limited to 'nixpkgs/pkgs/development/tools/selene/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/tools/selene/default.nix | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/tools/selene/default.nix b/nixpkgs/pkgs/development/tools/selene/default.nix new file mode 100644 index 000000000000..810eee56cd19 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/selene/default.nix @@ -0,0 +1,40 @@ +{ lib +, rustPlatform +, fetchFromGitHub +, robloxSupport ? true +, pkg-config +, openssl +, stdenv +, Security +}: + +rustPlatform.buildRustPackage rec { + pname = "selene"; + version = "0.14.0"; + + src = fetchFromGitHub { + owner = "kampfkarren"; + repo = pname; + rev = version; + sha256 = "0c228aakwf679wyxir0jwry3khv7phlaf77w675gn1wr4fxdg5gr"; + }; + + cargoSha256 = "sha256-5GODuqjVo3b1SzRgXVBIKec2tSS335EAUAmRlcpbClE="; + + nativeBuildInputs = lib.optional robloxSupport pkg-config; + + buildInputs = lib.optional robloxSupport openssl + ++ lib.optional (robloxSupport && stdenv.isDarwin) Security; + + cargoBuildFlags = lib.optional (!robloxSupport) "--no-default-features"; + + cargoTestFlags = cargoBuildFlags; + + meta = with lib; { + description = "A blazing-fast modern Lua linter written in Rust"; + homepage = "https://github.com/kampfkarren/selene"; + changelog = "https://github.com/kampfkarren/selene/blob/${version}/CHANGELOG.md"; + license = licenses.mpl20; + maintainers = with maintainers; [ figsoda ]; + }; +} |