From 803dee581de1e6e37edb2a74da2f6e63961bd235 Mon Sep 17 00:00:00 2001 From: Theodore Ni <3806110+tjni@users.noreply.github.com> Date: Wed, 30 Aug 2023 10:28:09 -0700 Subject: [PATCH] python311Packages.cookies: fetch patch to fix python 3.11 build --- .../python-modules/cookies/default.nix | 27 ++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/cookies/default.nix b/pkgs/development/python-modules/cookies/default.nix index a4e35dac346a..3f0d64c0c22d 100644 --- a/pkgs/development/python-modules/cookies/default.nix +++ b/pkgs/development/python-modules/cookies/default.nix @@ -1,15 +1,36 @@ -{ lib, buildPythonPackage, fetchPypi }: +{ lib +, buildPythonPackage +, fetchpatch +, fetchPypi +, pytestCheckHook +}: buildPythonPackage rec { pname = "cookies"; version = "2.2.1"; + format = "setuptools"; src = fetchPypi { inherit pname version; - sha256 = "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"; + hash = "sha256-1raYeIyuTPpOYu+GQ6nKMyt5vZbLMUKUuGSujX6z7o4="; }; - doCheck = false; + patches = [ + (fetchpatch { + name = "fix-deprecations.patch"; + url = "https://gitlab.com/sashahart/cookies/-/commit/22543d970568d577effe120c5a34636a38aa397b.patch"; + hash = "sha256-8e3haOnbSXlL/ZY4uv6P4+ABBKrsCjbEpsLHaulbIUk="; + }) + ]; + + nativeBuildInputs = [ + pytestCheckHook + ]; + + disabledTests = [ + # https://gitlab.com/sashahart/cookies/-/issues/6 + "test_encoding_assumptions" + ]; meta = with lib; { description = "Friendlier RFC 6265-compliant cookie parser/renderer";