depot/third_party/nixpkgs/pkgs/development/tools/oxlint/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

39 lines
977 B
Nix

{ lib
, rustPlatform
, fetchFromGitHub
, rust-jemalloc-sys
, stdenv
, darwin
}:
rustPlatform.buildRustPackage rec {
pname = "oxlint";
version = "0.2.15";
src = fetchFromGitHub {
owner = "web-infra-dev";
repo = "oxc";
rev = "oxlint_v${version}";
hash = "sha256-hEN9TLIeAfMGO/PL5OcT7+H0dmoCtH+dcIEafpQ45UU=";
};
cargoHash = "sha256-uChoDlU0tb52pBBEqmmwhCS83pykFRpXRFSuUGquHEQ=";
buildInputs = [
rust-jemalloc-sys
] ++ lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.Security
];
cargoBuildFlags = [ "--bin=oxlint" ];
cargoTestFlags = cargoBuildFlags;
meta = with lib; {
description = "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";
};
}