Unverified Commit fbb82430 authored by OTABI Tomoya's avatar OTABI Tomoya Committed by GitHub
Browse files

oxfmt: 0.18.0 -> 0.23.0, oxlint: 1.35.0 -> 1.38.0 (#477508)

parents d93db127 c86476be
Loading
Loading
Loading
Loading
+11 −5
Original line number Diff line number Diff line
@@ -6,12 +6,14 @@
  cargo,
  cmake,
  makeBinaryWrapper,
  nodejs_24,
  nodejs-slim,
  pnpmConfigHook,
  pnpm_10,
  rustPlatform,
  rustc,
  versionCheckHook,
  nix-update-script,
}:

# Build with pnpm instead of buildRustPackage because Prettier integration
@@ -19,13 +21,13 @@
# A pure Rust build would lack the Prettier plugin functionality.
stdenv.mkDerivation (finalAttrs: {
  pname = "oxfmt";
  version = "0.18.0";
  version = "0.23.0";

  src = fetchFromGitHub {
    owner = "oxc-project";
    repo = "oxc";
    tag = "oxfmt_v${finalAttrs.version}";
    hash = "sha256-AatmbW8UE8UbV533I2nhijHNlqIsgvtlE7X98uT7aTA=";
    hash = "sha256-kMCGKbc7qaY0KUOR+67mLvKW4J5CuvYUmC6Aj9xlzSk=";
  };

  # Remove patchedDependencies from both workspace and lockfile
@@ -37,14 +39,14 @@ stdenv.mkDerivation (finalAttrs: {

  cargoDeps = rustPlatform.fetchCargoVendor {
    inherit (finalAttrs) pname version src;
    hash = "sha256-4G52/8WZgNFM/vcHXBbtWabBZwWo3ZBVadFjOI2SmUk=";
    hash = "sha256-cesj9jwWHIFxpFV62QDgYl22EUE8qVjIbb2nRObAyLo=";
  };

  pnpmDeps = fetchPnpmDeps {
    inherit (finalAttrs) pname version src;
    pnpm = pnpm_10;
    fetcherVersion = 2;
    hash = "sha256-Do2sFEK/8Axj9B9M/W9zqMboPrAo5Zm/zdrMXZvmFg0=";
    hash = "sha256-cPswWCksQ5TyR9M2Maj5mg9I+UltR0WN3U4ClBvwG68=";
    prePnpmInstall = finalAttrs.postPatch;
  };

@@ -52,7 +54,7 @@ stdenv.mkDerivation (finalAttrs: {
    cargo
    cmake
    makeBinaryWrapper
    nodejs-slim
    nodejs_24
    pnpmConfigHook
    pnpm_10
    rustPlatform.cargoSetupHook
@@ -95,6 +97,10 @@ stdenv.mkDerivation (finalAttrs: {
  doInstallCheck = true;
  nativeInstallCheckInputs = [ versionCheckHook ];

  passthru.updateScript = nix-update-script {
    extraArgs = [ "--version-regex=^oxfmt_v([0-9.]+)$" ];
  };

  meta = {
    description = "JavaScript formatter with Prettier integration";
    homepage = "https://github.com/oxc-project/oxc";
+3 −4
Original line number Diff line number Diff line
@@ -10,16 +10,16 @@

rustPlatform.buildRustPackage (finalAttrs: {
  pname = "oxlint";
  version = "1.35.0";
  version = "1.38.0";

  src = fetchFromGitHub {
    owner = "oxc-project";
    repo = "oxc";
    tag = "oxlint_v${finalAttrs.version}";
    hash = "sha256-WHSdT4IMl/TUnMJycL3sYfA8aVLtag54dOYSXrDuN9g=";
    hash = "sha256-kMCGKbc7qaY0KUOR+67mLvKW4J5CuvYUmC6Aj9xlzSk=";
  };

  cargoHash = "sha256-OTxSxDjNDN8MZV7hVg914xQDl199+yjAMukN9jTmQsU=";
  cargoHash = "sha256-cesj9jwWHIFxpFV62QDgYl22EUE8qVjIbb2nRObAyLo=";

  nativeBuildInputs = [ cmake ];
  buildInputs = [
@@ -30,7 +30,6 @@ rustPlatform.buildRustPackage (finalAttrs: {

  cargoBuildFlags = [
    "--bin=oxlint"
    "--bin=oxc_language_server"
  ];
  cargoTestFlags = finalAttrs.cargoBuildFlags;