sqruff: 0.17.0 → 0.20.2 (#353394)

This commit is contained in:
Atemu 2024-11-06 01:22:18 +01:00 committed by GitHub
commit 376703b676
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2,7 +2,6 @@
lib,
rustPlatform,
fetchFromGitHub,
installShellFiles,
stdenv,
darwin,
rust-jemalloc-sys,
@ -11,21 +10,16 @@
}:
rustPlatform.buildRustPackage rec {
pname = "sqruff";
version = "0.17.0";
version = "0.20.2";
src = fetchFromGitHub {
owner = "quarylabs";
repo = "sqruff";
rev = "refs/tags/v${version}";
hash = "sha256-uUtbVf4U59jne5uORXpyzpqhFQoviKi2O9KQ5s1CfhU=";
hash = "sha256-Vlre3D1ydDqFdysf5no2rW2V2U/BimhCeV1vWZ2JPSM=";
};
cargoHash = "sha256-kIBjPh+rL4vzIAqGNYMpw39A0vADbHxi/PkhoG+QL6c=";
# Requires nightly features (feature(let_chains) and feature(trait_upcasting))
RUSTC_BOOTSTRAP = true;
nativeBuildInputs = [ installShellFiles ];
cargoHash = "sha256-WqkHZcA4FBm8zubAnDrJGH+fgLVIxsNNm3B+mdj5Sxw=";
buildInputs = [
rust-jemalloc-sys
@ -35,8 +29,8 @@ rustPlatform.buildRustPackage rec {
postPatch = ''
substituteInPlace crates/cli/tests/ui.rs \
--replace-fail \
'config.program.program = format!("../../target/{profile}/sqruff").into();' \
'config.program.program = "../../target/${stdenv.hostPlatform.rust.cargoShortTarget}/release/sqruff".into();'
'sqruff_path.push(format!("../../target/{}/sqruff", profile));' \
'sqruff_path.push(format!("../../target/${stdenv.hostPlatform.rust.cargoShortTarget}/{}/sqruff", profile));'
'';
nativeCheckInputs = [ versionCheckHook ];