From 1d41593ae29a531333b57600b2c86181424c3fd1 Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Tue, 19 Jan 2021 03:51:07 +0000 Subject: [PATCH] nix/pkgs: add newer version of django-allauth --- nix/pkgs/default.nix | 1 + nix/pkgs/django-allauth.nix | 31 +++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 nix/pkgs/django-allauth.nix diff --git a/nix/pkgs/default.nix b/nix/pkgs/default.nix index d83a5fc6c2..5f41a89840 100644 --- a/nix/pkgs/default.nix +++ b/nix/pkgs/default.nix @@ -20,5 +20,6 @@ grafana-plugins = import ./grafana-plugins args; unifiHacked = import ./unifi-hack args; tiny-remapper = import ./tiny-remapper.nix args; + django-allauth = pkgs.python3Packages.callPackage ./django-allauth.nix {}; } // (import ./heptapod-runner.nix args) // (import ./lightspeed args) diff --git a/nix/pkgs/django-allauth.nix b/nix/pkgs/django-allauth.nix new file mode 100644 index 0000000000..7d85e0cd3e --- /dev/null +++ b/nix/pkgs/django-allauth.nix @@ -0,0 +1,31 @@ +{ stdenv, buildPythonPackage, fetchFromGitHub, requests, requests_oauthlib +, django, python3-openid, mock, coverage, pyjwt }: + +buildPythonPackage rec { + pname = "django-allauth"; + version = "0.44.0"; + + # no tests on PyPI + src = fetchFromGitHub { + owner = "pennersr"; + repo = pname; + rev = version; + sha256 = "sha256:0fjaf6cnz08dvkribjjsmw0a0yyi6a9s3m1mmsrq2fmmdq6n031q"; + }; + + propagatedBuildInputs = [ requests requests_oauthlib django python3-openid pyjwt ]; + + checkInputs = [ coverage mock ]; + + doCheck = false; + checkPhase = '' + cd $NIX_BUILD_TOP/$sourceRoot + coverage run manage.py test allauth + ''; + + meta = with stdenv.lib; { + description = "Integrated set of Django applications addressing authentication, registration, account management as well as 3rd party (social) account authentication"; + homepage = "https://www.intenct.nl/projects/django-allauth"; + license = licenses.mit; + }; +}