depot/third_party/nixpkgs/pkgs/development/tools/selene/default.nix
Default email 02cf88bb76 Project import generated by Copybara.
GitOrigin-RevId: c4a0efdd5a728e20791b8d8d2f26f90ac228ee8d
2022-08-12 15:06:08 +03:00

38 lines
966 B
Nix

{ lib
, rustPlatform
, fetchFromGitHub
, robloxSupport ? true
, pkg-config
, openssl
, stdenv
, Security
}:
rustPlatform.buildRustPackage rec {
pname = "selene";
version = "0.20.0";
src = fetchFromGitHub {
owner = "kampfkarren";
repo = pname;
rev = version;
sha256 = "sha256-ScO2ih+Y8R1OrazSmLlz9QtTUjQ6tIPf5F5juj2nc7Y=";
};
cargoSha256 = "sha256-pJZrNjgtYjribIKo4DWR47dnyoSuy9sSRPd+ginDlOU=";
nativeBuildInputs = lib.optional robloxSupport pkg-config;
buildInputs = lib.optional robloxSupport openssl
++ lib.optional (robloxSupport && stdenv.isDarwin) Security;
buildNoDefaultFeatures = !robloxSupport;
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 ];
};
}