nixpkgs/pkgs/development/tools/selene/default.nix
2022-09-17 12:59:08 -04:00

38 lines
966 B
Nix

{ lib
, rustPlatform
, fetchFromGitHub
, robloxSupport ? true
, pkg-config
, openssl
, stdenv
, Security
}:
rustPlatform.buildRustPackage rec {
pname = "selene";
version = "0.21.0";
src = fetchFromGitHub {
owner = "kampfkarren";
repo = pname;
rev = version;
sha256 = "sha256-iqPQD0oDPhhD7jgnbiJvUiaxj1YZeGkgQu6p1vr1Vlw=";
};
cargoSha256 = "sha256-gl4vgS/164eYP3MWRBaI3NrmlqbYZUHOwySUA7/42Qg=";
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 ];
};
}