mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-21 03:25:36 +00:00
ruff: 0.1.13 -> 0.1.15
Changelog: https://github.com/astral-sh/ruff/releases/tag/v0.1.15
This commit is contained in:
parent
fe79cac73b
commit
da01901c0c
@ -5,22 +5,29 @@
|
||||
, stdenv
|
||||
, darwin
|
||||
, rust-jemalloc-sys
|
||||
# tests
|
||||
, ruff-lsp
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "ruff";
|
||||
version = "0.1.13";
|
||||
version = "0.1.15";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "astral-sh";
|
||||
repo = "ruff";
|
||||
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 = [
|
||||
installShellFiles
|
||||
@ -32,9 +39,6 @@ rustPlatform.buildRustPackage rec {
|
||||
darwin.apple_sdk.frameworks.CoreServices
|
||||
];
|
||||
|
||||
cargoBuildFlags = [ "--package=ruff_cli" ];
|
||||
cargoTestFlags = cargoBuildFlags;
|
||||
|
||||
# tests expect no colors
|
||||
preCheck = ''
|
||||
export NO_COLOR=1
|
||||
|
Loading…
Reference in New Issue
Block a user