From 248d82d48e5b99650c0aa357260de83b5290dc6f Mon Sep 17 00:00:00 2001 From: Theodore Ni <3806110+tjni@users.noreply.github.com> Date: Tue, 6 Dec 2022 12:12:20 -0800 Subject: [PATCH] sqlx-cli: fix for rust 1.65 --- .../tools/rust/sqlx-cli/default.nix | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/pkgs/development/tools/rust/sqlx-cli/default.nix b/pkgs/development/tools/rust/sqlx-cli/default.nix index df451e863481..7883e8841b0a 100644 --- a/pkgs/development/tools/rust/sqlx-cli/default.nix +++ b/pkgs/development/tools/rust/sqlx-cli/default.nix @@ -1,4 +1,17 @@ -{ stdenv, lib, rustPlatform, fetchFromGitHub, pkg-config, openssl, SystemConfiguration, CoreFoundation, Security, libiconv, testers, sqlx-cli }: +{ stdenv +, lib +, rustPlatform +, fetchFromGitHub +, fetchpatch +, pkg-config +, openssl +, SystemConfiguration +, CoreFoundation +, Security +, libiconv +, testers +, sqlx-cli +}: rustPlatform.buildRustPackage rec { pname = "sqlx-cli"; @@ -11,6 +24,15 @@ rustPlatform.buildRustPackage rec { sha256 = "sha256-pQlrKjhOJfjNEmLxqnFmmBY1naheZUsaq2tGdLKGxjg="; }; + patches = [ + # https://github.com/launchbadge/sqlx/pull/2228 + (fetchpatch { + name = "fix-rust-1.65-compile.patch"; + url = "https://github.com/launchbadge/sqlx/commit/2fdf85b212332647dc4ac47e087df946151feedf.patch"; + hash = "sha256-5BCuIwmECe9qQrdYll7T+UOGwuTBolWEhKNE7GcZqJw="; + }) + ]; + cargoSha256 = "sha256-AbA8L7rkyZfKW0vvjyrcW5eU6jGD+zAqIcEUOJmeqJs="; doCheck = false;