7e47f3658e
GitOrigin-RevId: 1925c603f17fc89f4c8f6bf6f631a802ad85d784
39 lines
989 B
Nix
39 lines
989 B
Nix
{ lib
|
|
, rustPlatform
|
|
, fetchFromGitHub
|
|
, rust-jemalloc-sys
|
|
, stdenv
|
|
, darwin
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "oxlint";
|
|
version = "0.5.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "web-infra-dev";
|
|
repo = "oxc";
|
|
rev = "oxlint_v${version}";
|
|
hash = "sha256-rjp1k3cnDSr/hKXNru7XQ6n5Wz97j2EULnHwg3HAm3g=";
|
|
};
|
|
|
|
cargoHash = "sha256-3IebdIKw3lV+Qy6F7ZgWMchPLzrluGSeWTV9l5to8iM=";
|
|
|
|
buildInputs = [
|
|
rust-jemalloc-sys
|
|
] ++ lib.optionals stdenv.hostPlatform.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";
|
|
};
|
|
}
|