From aab3c48aef2260867272bf6797a980e32ccedbe0 Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Thu, 22 Jul 2021 10:21:20 -0400 Subject: awscli2: fixup python 3.9 fallout from the applied patch: Replace use of deprecated base64.encodestring() Replace the uses of deprecated base64.encodestring() in favor of botocore.compat.encodebytes(). This fixes incompatibility with Python 3.9 where the former function has finally been removed. --- pkgs/tools/admin/awscli2/default.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'pkgs/tools/admin/awscli2') diff --git a/pkgs/tools/admin/awscli2/default.nix b/pkgs/tools/admin/awscli2/default.nix index 1ce3cb452b8ce..d84c1816fec46 100644 --- a/pkgs/tools/admin/awscli2/default.nix +++ b/pkgs/tools/admin/awscli2/default.nix @@ -1,4 +1,4 @@ -{ lib, python3, groff, less, fetchFromGitHub }: +{ lib, python3, groff, less, fetchFromGitHub, fetchpatch }: let py = python3.override { packageOverrides = self: super: { @@ -33,6 +33,13 @@ with py.pkgs; buildPythonApplication rec { sha256 = "sha256-LU9Tqzdi8ULZ5y3FbfSXdrip4NcxFkXRCTpVGo05LcM="; }; + patches = [ + (fetchpatch { + url = "https://github.com/mgorny/aws-cli/commit/85361123d2fa12eaedf912c046ffe39aebdd2bad.patch"; + sha256 = "sha256-1Rb+/CY7ze1/DbJ6TfqHF01cfI2vixZ1dT91bmHTg/A="; + }) + ]; + postPatch = '' substituteInPlace setup.py \ --replace "awscrt==0.11.13" "awscrt" \ -- cgit 1.4.1