about summary refs log tree commit diff
path: root/pkgs/development/python-modules/django_appconf
diff options
context:
space:
mode:
authorRobert Scott <code@humanleg.org.uk>2019-06-16 14:09:59 +0100
committerFrederik Rietdijk <freddyrietdijk@fridh.nl>2019-07-20 13:00:06 +0200
commit8e709be9baa6f7071eea1d3ebc22f4004c5b42b9 (patch)
treeb9bd62edbd667eecd2488e3809fc7a84c5ae670f /pkgs/development/python-modules/django_appconf
parent0890e9432152173827b089015fc0a1f72df3b4a3 (diff)
pythonPackages.appconf: fix build, enable tests
Diffstat (limited to 'pkgs/development/python-modules/django_appconf')
-rw-r--r--pkgs/development/python-modules/django_appconf/default.nix19
1 files 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 1ce86daf9925e..67345cd8d6af5 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";