@@ -1,31 +1,40 @@
1−{ lib, buildPythonPackage, fetchPypi, django }:
1+{ lib
2+, buildPythonPackage
3+, fetchFromGitHub
4+, django
5+, django-jinja
6+, python
7+}:
28
39buildPythonPackage rec {
410 pname = "django-sites";
511 version = "0.11";
612
7− src = fetchPypi {
8− inherit pname version;
9− sha256 = "1cbee714fdf2bfbe92e4f5055de4e6c41b64ebb32e1f96b1016c0748210928b8";
13+ src = fetchFromGitHub {
14+ owner = "niwinz";
15+ repo = "django-sites";
16+ rev = version;
17+ sha256 = "sha256-MQtQC+9DyS1ICXXovbqPpkKIQ5wpuJDgq3Lcd/1kORU=";
1018 };
11− # LICENSE file appears to be missing from pypi package, but expected by the installer
12− # https://github.com/niwinz/django-sites/issues/11
13− postPatch = ''
14− touch LICENSE
15− '';
1619
17− propagatedBuildInputs = [ django ];
20+ propagatedBuildInputs = [
21+ django
22+ ];
23+
24+ checkInputs = [
25+ django-jinja
26+ ];
27+
28+ checkPhase = ''
29+ runHook preCheck
1830
19− # required files for test don't seem to be included in pypi package, full source for 0.10
20− # version doesn't appear to be present on github
21− # https://github.com/niwinz/django-sites/issues/9
22− doCheck = false;
31+ ${python.interpreter} runtests.py
32+
33+ runHook postCheck
34+ '';
2335
2436 meta = {
25− description = ''
26− Alternative implementation of django "sites" framework
27− based on settings instead of models.
28− '';
37+ description = "Alternative implementation of django sites framework";
2938 homepage = "https://github.com/niwinz/django-sites";
3039 license = lib.licenses.bsd3;
3140 };