depot/third_party/nixpkgs/pkgs/development/tools/oxlint/default.nix
Default email 504525a148 Project import generated by Copybara.
GitOrigin-RevId: bd645e8668ec6612439a9ee7e71f7eac4099d4f6
2024-01-02 12:29:13 +01:00

39 lines
979 B
Nix

{ lib
, rustPlatform
, fetchFromGitHub
, rust-jemalloc-sys
, stdenv
, darwin
}:
rustPlatform.buildRustPackage rec {
pname = "oxlint";
version = "0.0.18";
src = fetchFromGitHub {
owner = "web-infra-dev";
repo = "oxc";
rev = "oxlint_v${version}";
hash = "sha256-WvNPfEgeBBbzhyJsMPpqhhkZ8GRn3mCq7HVaoVrCm2U=";
};
cargoHash = "sha256-nWaa3JzACy6ftfm/qEfdBOxK3j4QJof7MtFI8GIpUxY=";
buildInputs = [
rust-jemalloc-sys
] ++ lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.Security
];
cargoBuildFlags = [ "--bin=oxlint" ];
cargoTestFlags = cargoBuildFlags;
meta = with lib; {
description = "A suite of high-performance tools for JavaScript and TypeScript written in Rust";
homepage = "https://github.com/web-infra-dev/oxc";
changelog = "https://github.com/web-infra-dev/oxc/releases/tag/${src.rev}";
license = licenses.mit;
maintainers = with maintainers; [ figsoda ];
mainProgram = "oxlint";
};
}