From d7f41d45ac17dcbf9d53314906bac32263a4ab10 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sat, 25 Mar 2023 04:20:00 +0000 Subject: [PATCH] squawk: 0.21.0 -> 0.22.0 https://github.com/sbdchd/squawk/releases/tag/v0.22.0 --- .../tools/squawk/correct-Cargo.lock.patch | 13 -------- pkgs/development/tools/squawk/default.nix | 30 ++++--------------- ...-postgresql-version-in-snapshot-test.patch | 13 -------- 3 files changed, 5 insertions(+), 51 deletions(-) delete mode 100644 pkgs/development/tools/squawk/correct-Cargo.lock.patch delete mode 100644 pkgs/development/tools/squawk/fix-postgresql-version-in-snapshot-test.patch diff --git a/pkgs/development/tools/squawk/correct-Cargo.lock.patch b/pkgs/development/tools/squawk/correct-Cargo.lock.patch deleted file mode 100644 index 410c92a1c3b2..000000000000 --- a/pkgs/development/tools/squawk/correct-Cargo.lock.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/Cargo.lock b/Cargo.lock -index d5803a8..384224d 100644 ---- a/Cargo.lock -+++ b/Cargo.lock -@@ -1585,7 +1585,7 @@ checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" - - [[package]] - name = "squawk" --version = "0.20.0" -+version = "0.21.0" - dependencies = [ - "atty", - "base64 0.12.3", diff --git a/pkgs/development/tools/squawk/default.nix b/pkgs/development/tools/squawk/default.nix index 9d3526ee9d53..ddd663cf165f 100644 --- a/pkgs/development/tools/squawk/default.nix +++ b/pkgs/development/tools/squawk/default.nix @@ -8,39 +8,19 @@ , rustPlatform , stdenv }: -let - # The query parser produces a slightly different AST between major versions - # and Squawk is not capable of handling >=14 correctly yet. - libpg_query13 = libpg_query.overrideAttrs (_: rec { - version = "13-2.2.0"; - src = fetchFromGitHub { - owner = "pganalyze"; - repo = "libpg_query"; - rev = version; - hash = "sha256-gEkcv/j8ySUYmM9lx1hRF/SmuQMYVHwZAIYOaCQWAFs="; - }; - }); -in + rustPlatform.buildRustPackage rec { pname = "squawk"; - version = "0.21.0"; + version = "0.22.0"; src = fetchFromGitHub { owner = "sbdchd"; repo = pname; rev = "v${version}"; - hash = "sha256-ObaYGGTAGGLOAji86Q5R9fqbCGg6GP0A3iheNLgzezY="; + hash = "sha256-nJOeGZFeMfjqtuZID325bKKsKzVwAYTKeGPEVi2oy3s="; }; - cargoHash = "sha256-VOGgwBKcJK7x+PwvzvuVu9Zd1G8t9UoC/Me3G6bdtrk="; - - cargoPatches = [ - ./correct-Cargo.lock.patch - ]; - - patches = [ - ./fix-postgresql-version-in-snapshot-test.patch - ]; + cargoHash = "sha256-CupmmfLqoBm+rK/mLEjfCWSNS2LCRKWIETBek0nUcv8="; nativeBuildInputs = [ pkg-config @@ -57,7 +37,7 @@ rustPlatform.buildRustPackage rec { OPENSSL_NO_VENDOR = 1; - LIBPG_QUERY_PATH = libpg_query13; + LIBPG_QUERY_PATH = libpg_query; meta = with lib; { description = "Linter for PostgreSQL, focused on migrations"; diff --git a/pkgs/development/tools/squawk/fix-postgresql-version-in-snapshot-test.patch b/pkgs/development/tools/squawk/fix-postgresql-version-in-snapshot-test.patch deleted file mode 100644 index 205fd3dba973..000000000000 --- a/pkgs/development/tools/squawk/fix-postgresql-version-in-snapshot-test.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/parser/src/snapshots/squawk_parser__parse__tests__parse_sql_query_json.snap b/parser/src/snapshots/squawk_parser__parse__tests__parse_sql_query_json.snap -index 7273b74..ae94927 100644 ---- a/parser/src/snapshots/squawk_parser__parse__tests__parse_sql_query_json.snap -+++ b/parser/src/snapshots/squawk_parser__parse__tests__parse_sql_query_json.snap -@@ -133,7 +133,7 @@ Ok( - }), - ]), - "version": Number( -- 130003, -+ 130008, - ), - }), - )