From 1c4234f3809a04df101d9e5ea149b013787f4b59 Mon Sep 17 00:00:00 2001 From: critbase <12738442+critbase@users.noreply.github.com> Date: Tue, 27 Apr 2021 19:40:29 -0400 Subject: [PATCH] djangorestframework-jwt: fix building error This package depends on an older version of 'pyjwt' than is packaged in nixpkgs. --- .../djangorestframework-jwt/default.nix | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/djangorestframework-jwt/default.nix b/pkgs/development/python-modules/djangorestframework-jwt/default.nix index 643218242d798..21f08e30814e4 100644 --- a/pkgs/development/python-modules/djangorestframework-jwt/default.nix +++ b/pkgs/development/python-modules/djangorestframework-jwt/default.nix @@ -6,6 +6,18 @@ , buildPythonPackage }: +let + + pyjwt' = pyjwt.overridePythonAttrs (oldAttrs: rec { + version = "1.7.1"; + src = oldAttrs.src.override { + inherit version; + sha256 = "jVmpdvt3Pz5qOchWNjV8Tw4kJwc5TK2t2YFPXLqiDpY="; + }; + }); + +in + buildPythonPackage rec { pname = "djangorestframework-jwt"; version = "1.11.0"; @@ -15,7 +27,7 @@ buildPythonPackage rec { sha256 = "19rng6v1sw14mbjp5cplnrgxjnhlj8faalfw02iihi9s5w1k7zjy"; }; - propagatedBuildInputs = [ pyjwt django djangorestframework ]; + propagatedBuildInputs = [ pyjwt' django djangorestframework ]; # ./runtests.py fails because the project must be tested against a django # installation, there are missing database tables for User, that don't exist.