nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, rustPlatform
3, fetchFromGitHub
4, robloxSupport ? true
5, pkg-config
6, openssl
7, stdenv
8, Security
9}:
10
11rustPlatform.buildRustPackage rec {
12 pname = "selene";
13 version = "0.15.0";
14
15 src = fetchFromGitHub {
16 owner = "kampfkarren";
17 repo = pname;
18 rev = version;
19 sha256 = "sha256-tA1exZ97N2tAagAljt+MOSGh6objOiqbZXUaBZ62Sls=";
20 };
21
22 cargoSha256 = "sha256-4vCKiTWwnibNK6/S1GOYRurgm2Aq1e9o4rAmp0hqGeA=";
23
24 nativeBuildInputs = lib.optional robloxSupport pkg-config;
25
26 buildInputs = lib.optional robloxSupport openssl
27 ++ lib.optional (robloxSupport && stdenv.isDarwin) Security;
28
29 buildNoDefaultFeatures = !robloxSupport;
30
31 meta = with lib; {
32 description = "A blazing-fast modern Lua linter written in Rust";
33 homepage = "https://github.com/kampfkarren/selene";
34 changelog = "https://github.com/kampfkarren/selene/blob/${version}/CHANGELOG.md";
35 license = licenses.mpl20;
36 maintainers = with maintainers; [ figsoda ];
37 };
38}