2023-09-01 03:06:47 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
2023-11-19 01:12:16 +00:00
|
|
|
, rust-jemalloc-sys
|
2023-09-01 03:06:47 +00:00
|
|
|
, stdenv
|
|
|
|
, darwin
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "oxlint";
|
2023-11-29 01:08:11 +00:00
|
|
|
version = "0.0.18";
|
2023-09-01 03:06:47 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "web-infra-dev";
|
|
|
|
repo = "oxc";
|
|
|
|
rev = "oxlint_v${version}";
|
2023-11-29 01:08:11 +00:00
|
|
|
hash = "sha256-WvNPfEgeBBbzhyJsMPpqhhkZ8GRn3mCq7HVaoVrCm2U=";
|
2023-09-01 03:06:47 +00:00
|
|
|
};
|
|
|
|
|
2023-11-29 01:08:11 +00:00
|
|
|
cargoHash = "sha256-nWaa3JzACy6ftfm/qEfdBOxK3j4QJof7MtFI8GIpUxY=";
|
2023-09-01 03:06:47 +00:00
|
|
|
|
2023-11-19 01:12:16 +00:00
|
|
|
buildInputs = [
|
|
|
|
rust-jemalloc-sys
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
2023-09-01 03:06:47 +00:00
|
|
|
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";
|
|
|
|
};
|
|
|
|
}
|