summary refs log tree commit diff
diff options
context:
space:
mode:
authorfigsoda <figsoda@pm.me>2023-09-03 10:32:30 -0400
committerGitHub <noreply@github.com>2023-09-03 10:32:30 -0400
commitc9956c110efd3465baac083aa4506daaef0678ce (patch)
tree76683cdf78f8103194ef87e5390c1c22c9ce9d7d
parentbe871dd218a62813361c16dcc7c1f115ff4e53c0 (diff)
parentd7b95d8e1860fc6c6bbebf4cc68b0ce33a626a55 (diff)
downloadnixpkgs-c9956c110efd3465baac083aa4506daaef0678ce.tar
nixpkgs-c9956c110efd3465baac083aa4506daaef0678ce.tar.gz
nixpkgs-c9956c110efd3465baac083aa4506daaef0678ce.tar.bz2
nixpkgs-c9956c110efd3465baac083aa4506daaef0678ce.tar.lz
nixpkgs-c9956c110efd3465baac083aa4506daaef0678ce.tar.xz
nixpkgs-c9956c110efd3465baac083aa4506daaef0678ce.tar.zst
nixpkgs-c9956c110efd3465baac083aa4506daaef0678ce.zip
Merge pull request #252681 from figsoda/oxlint
-rw-r--r--pkgs/development/tools/oxlint/default.nix36
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 38 insertions, 0 deletions
diff --git a/pkgs/development/tools/oxlint/default.nix b/pkgs/development/tools/oxlint/default.nix
new file mode 100644
index 00000000000..35ccf837030
--- /dev/null
+++ b/pkgs/development/tools/oxlint/default.nix
@@ -0,0 +1,36 @@
+{ lib
+, rustPlatform
+, fetchFromGitHub
+, stdenv
+, darwin
+}:
+
+rustPlatform.buildRustPackage rec {
+  pname = "oxlint";
+  version = "0.0.11";
+
+  src = fetchFromGitHub {
+    owner = "web-infra-dev";
+    repo = "oxc";
+    rev = "oxlint_v${version}";
+    hash = "sha256-di+uCLZJNJMETMSUxQwlFaZPJps0+HIL7h+EvudP5II=";
+  };
+
+  cargoHash = "sha256-r+HRm9JNFKFL78VP/Yz87b1nQDLwbNuhHd0JkXeuCC0=";
+
+  buildInputs = 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";
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 94a02024a07..6424ab15b95 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -11720,6 +11720,8 @@ with pkgs;
 
   oxker = callPackage ../applications/misc/oxker { };
 
+  oxlint = callPackage ../development/tools/oxlint { };
+
   ovh-ttyrec = callPackage ../tools/misc/ovh-ttyrec { };
 
   ovito = libsForQt5.callPackage ../applications/graphics/ovito {