ruff: 0.1.13 -> 0.1.15

Changelog: https://github.com/astral-sh/ruff/releases/tag/v0.1.15
This commit is contained in:
Gaetan Lepage 2024-01-30 10:14:53 +01:00
parent fe79cac73b
commit da01901c0c

View File

@ -5,22 +5,29 @@
, stdenv , stdenv
, darwin , darwin
, rust-jemalloc-sys , rust-jemalloc-sys
# tests
, ruff-lsp , ruff-lsp
}: }:
rustPlatform.buildRustPackage rec { rustPlatform.buildRustPackage rec {
pname = "ruff"; pname = "ruff";
version = "0.1.13"; version = "0.1.15";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "astral-sh"; owner = "astral-sh";
repo = "ruff"; repo = "ruff";
rev = "refs/tags/v${version}"; rev = "refs/tags/v${version}";
hash = "sha256-cH/Vw04QQ3U7E1ZCwozjhPcn0KVljP976/p3okrBpEU="; hash = "sha256-DzdzMO9PEwf4HmpG8SxRJTmdrmkXuQ8RsIchvsKstH8=";
}; };
cargoHash = "sha256-tmoFnghHQEsyv0vO9fnWyTsxiIhmovhi/zHXOCi5u10="; # The following specific substitution is not working as the current directory is `/build/source` and thus has no mention of `ruff` in it.
# https://github.com/astral-sh/ruff/blob/866bea60a5de3c59d2537b0f3a634ae0ac9afd94/crates/ruff/tests/show_settings.rs#L12
# -> Just patch it so that it expects the actual current directory and not `"[BASEPATH]"`.
postPatch = ''
substituteInPlace crates/ruff/tests/snapshots/show_settings__display_default_settings.snap \
--replace '"[BASEPATH]"' '"'$PWD'"'
'';
cargoHash = "sha256-MpiWdNUs66OGYfOJo1kJQTCqjrk/DAYecaLf6GUUKew=";
nativeBuildInputs = [ nativeBuildInputs = [
installShellFiles installShellFiles
@ -32,9 +39,6 @@ rustPlatform.buildRustPackage rec {
darwin.apple_sdk.frameworks.CoreServices darwin.apple_sdk.frameworks.CoreServices
]; ];
cargoBuildFlags = [ "--package=ruff_cli" ];
cargoTestFlags = cargoBuildFlags;
# tests expect no colors # tests expect no colors
preCheck = '' preCheck = ''
export NO_COLOR=1 export NO_COLOR=1