2021-10-04 12:37:57 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, robloxSupport ? true
|
|
|
|
, pkg-config
|
|
|
|
, openssl
|
|
|
|
, stdenv
|
|
|
|
, Security
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "selene";
|
2022-02-10 20:34:41 +00:00
|
|
|
version = "0.16.0";
|
2021-10-04 12:37:57 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "kampfkarren";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2022-02-10 20:34:41 +00:00
|
|
|
sha256 = "sha256-S0EeFJS90bzQ7C+hN4CyZ7l9wmizT2d3P6utshI5JWs=";
|
2021-10-04 12:37:57 +00:00
|
|
|
};
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
cargoSha256 = "sha256-3J1Q595LxAI0LBP4/cLHDrMbZBnoA2+OSr8/erQcN+0=";
|
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 ];
|
|
|
|
};
|
|
|
|
}
|