nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 django,
6 setuptools,
7 docopt,
8 dj-database-url,
9 python,
10 django-filer,
11 six,
12 django-app-helper,
13}:
14
15buildPythonPackage rec {
16 pname = "django-app-helper";
17 version = "3.3.5";
18 pyproject = true;
19
20 src = fetchFromGitHub {
21 owner = "nephila";
22 repo = "django-app-helper";
23 tag = version;
24 hash = "sha256-gnTEzmQ4h4FWc2+s68VW/yVAkKFdj4U2VMkJKTAnQOM=";
25 };
26
27 build-system = [ setuptools ];
28
29 dependencies = [
30 dj-database-url
31 docopt
32 six
33 ];
34
35 checkInputs = [ django-filer ];
36
37 # Tests depend on django-filer, which depends on this package.
38 # To avoid infinite recursion, we only enable tests when building passthru.tests.
39 doCheck = false;
40
41 checkPhase = ''
42 ${python.interpreter} helper.py
43 '';
44
45 pythonImportsCheck = [ "app_helper" ];
46
47 passthru.tests = {
48 runTests = django-app-helper.overrideAttrs (_: {
49 doCheck = true;
50 });
51 };
52
53 meta = {
54 description = "Helper for Django applications development";
55 homepage = "https://django-app-helper.readthedocs.io";
56 changelog = "https://github.com/nephila/django-app-helper/releases/tag/${src.tag}";
57 license = lib.licenses.gpl2Only;
58 maintainers = [ lib.maintainers.onny ];
59 };
60}