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