oxlint, oxfmt: fix tsgolint dependency
tsgolint provides type-aware linting for oxlint, so it should be a dependency of oxlint, not oxfmt. This commit: - Removes tsgolint from oxfmt (formatter doesn't need type-aware linting) - Adds tsgolint to oxlint via PATH wrapper
This commit is contained in:
@@ -14,7 +14,6 @@
|
||||
rustc,
|
||||
versionCheckHook,
|
||||
nix-update-script,
|
||||
tsgolint,
|
||||
}:
|
||||
|
||||
# Build with pnpm instead of buildRustPackage because Prettier integration
|
||||
@@ -90,7 +89,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
cp npm/oxfmt/configuration_schema.json $outPath/
|
||||
|
||||
makeWrapper ${lib.getExe nodejs-slim} $out/bin/oxfmt \
|
||||
--prefix PATH : "${lib.makeBinPath [ tsgolint ]}" \
|
||||
--add-flags $outPath/dist/cli.js
|
||||
|
||||
runHook postInstall
|
||||
|
||||
@@ -3,8 +3,10 @@
|
||||
rustPlatform,
|
||||
fetchFromGitHub,
|
||||
cmake,
|
||||
makeBinaryWrapper,
|
||||
nix-update-script,
|
||||
rust-jemalloc-sys,
|
||||
tsgolint,
|
||||
versionCheckHook,
|
||||
}:
|
||||
|
||||
@@ -21,7 +23,10 @@ rustPlatform.buildRustPackage (finalAttrs: {
|
||||
|
||||
cargoHash = "sha256-cesj9jwWHIFxpFV62QDgYl22EUE8qVjIbb2nRObAyLo=";
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
makeBinaryWrapper
|
||||
];
|
||||
buildInputs = [
|
||||
rust-jemalloc-sys
|
||||
];
|
||||
@@ -33,6 +38,11 @@ rustPlatform.buildRustPackage (finalAttrs: {
|
||||
];
|
||||
cargoTestFlags = finalAttrs.cargoBuildFlags;
|
||||
|
||||
postFixup = ''
|
||||
wrapProgram $out/bin/oxlint \
|
||||
--prefix PATH : "${lib.makeBinPath [ tsgolint ]}"
|
||||
'';
|
||||
|
||||
nativeInstallCheckInputs = [ versionCheckHook ];
|
||||
doInstallCheck = true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user