From 8e709be9baa6f7071eea1d3ebc22f4004c5b42b9 Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Sun, 16 Jun 2019 14:09:59 +0100 Subject: [PATCH] pythonPackages.appconf: fix build, enable tests --- .../python-modules/django_appconf/default.nix | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/django_appconf/default.nix b/pkgs/development/python-modules/django_appconf/default.nix index 1ce86daf992..67345cd8d6a 100644 --- a/pkgs/development/python-modules/django_appconf/default.nix +++ b/pkgs/development/python-modules/django_appconf/default.nix @@ -1,17 +1,22 @@ -{ stdenv, buildPythonPackage, fetchPypi, six }: +{ stdenv, buildPythonPackage, fetchFromGitHub, six, django }: buildPythonPackage rec { pname = "django-appconf"; version = "1.0.3"; - src = fetchPypi { - inherit pname version; - sha256 = "35f13ca4d567f132b960e2cd4c832c2d03cb6543452d34e29b7ba10371ba80e3"; + src = fetchFromGitHub { + owner = "django-compressor"; + repo = "django-appconf"; + rev = version; + sha256 = "06hwbz7362y0la9np3df25mms235fcqgpd2vn0mnf8dri9spzy1h"; }; - # No tests in archive - doCheck = false; + propagatedBuildInputs = [ six django ]; - propagatedBuildInputs = [ six ]; + checkPhase = '' + # prove we're running tests against installed package, not build dir + rm -r appconf + python -m django test --settings="tests.test_settings" + ''; meta = with stdenv.lib; { description = "A helper class for handling configuration defaults of packaged apps gracefully";