summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/djangorestframework-csv/default.nix
blob: f93ae596f427b01f884b7a63a39b4bf21775cf23 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  django,
  djangorestframework,
  pytestCheckHook,
  pytest-django,
  python,
}:

buildPythonPackage rec {
  pname = "djangorestframework-csv";
  version = "3.0.2";
  format = "setuptools";

  src = fetchFromGitHub {
    owner = "mjumbewu";
    repo = "django-rest-framework-csv";
    tag = version;
    hash = "sha256-XtMkSucB7+foRpTaRfGF1Co0n3ONNGyzex6MXR4xM5c=";
  };

  dependencies = [
    django
    djangorestframework
  ];

  checkInputs = [
    pytestCheckHook
    pytest-django
  ];

  checkPhase = ''
    runHook preCheck
    ${python.interpreter} manage.py test
    runHook postCheck
  '';

  pythonImportsCheck = [ "rest_framework_csv" ];

  meta = {
    description = "CSV Tools for Django REST Framework";
    homepage = "https://github.com/mjumbewu/django-rest-framework-csv";
    changelog = "https://github.com/mjumbewu/django-rest-framework-csv/releases/tag/${version}";
    license = lib.licenses.bsd2;
    maintainers = [ lib.maintainers.onny ];
  };
}