From 3777863672bd52bfe9d561764152612a4dd0eaad Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Tue, 1 Jun 2021 13:00:01 +0100 Subject: [PATCH] python3Packages.starlette: fix build newer python 3.8+ releases expose this breakage https://github.com/encode/starlette/issues/1131, fixed upstream in https://github.com/encode/starlette/pull/1132 --- pkgs/development/python-modules/starlette/default.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkgs/development/python-modules/starlette/default.nix b/pkgs/development/python-modules/starlette/default.nix index ff8a93d335ea9..7fedb3f3ed114 100644 --- a/pkgs/development/python-modules/starlette/default.nix +++ b/pkgs/development/python-modules/starlette/default.nix @@ -2,6 +2,7 @@ , stdenv , buildPythonPackage , fetchFromGitHub +, fetchpatch , aiofiles , graphene , itsdangerous @@ -31,6 +32,16 @@ buildPythonPackage rec { sha256 = "11i0yd8cqwscixajl734g11vf8pghki11c81chzfh8ifmj6mf9jk"; }; + patches = [ + # a fix for https://github.com/encode/starlette/issues/1131 exposed + # by newer python 3.8+ versions + (fetchpatch { + name = "dont-use-undocumented-tracebackexception-attr.patch"; + url = "https://github.com/encode/starlette/pull/1132/commits/aa97f30c73e1c830e0952f7a97d08bc5fad03dea.patch"; + sha256 = "0clf8l4606y1g585dg4gvx250s2djskji8jaim4s90l9xzjag8sb"; + }) + ]; + propagatedBuildInputs = [ aiofiles graphene