summary refs log tree commit diff
path: root/pkgs/development/python-modules/django-pipeline/default.nix
blob: acb5587186dbc93dc75bf7a218e5d94bbb25fe0b (plain) (blame)
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
{ lib, buildPythonPackage, fetchFromGitHub, isPy3k
, django, futures, mock, jinja2, jsmin, slimit }:

buildPythonPackage rec {
  pname = "django-pipeline";
  version = "1.6.14";

  # no tests on PyPI
  src = fetchFromGitHub {
    owner = "jazzband";
    repo = pname;
    rev = version;
    sha256 = "1xf732bd17mgha75jfhlnms46ib2pffhpfa0ca7bmng9jhbvsl9j";
  };

  postPatch = ''
    substituteInPlace tests/tests/test_compiler.py \
      --replace "/usr/bin/env" ""
  '';

  propagatedBuildInputs = [ django ] ++ lib.optional (!isPy3k) futures;

  checkInputs = [ jinja2 jsmin slimit ] ++ lib.optional (!isPy3k) mock;

  checkPhase = ''
    export PYTHONPATH=.:$PYTHONPATH
    export DJANGO_SETTINGS_MODULE=tests.settings
    ${django}/bin/django-admin.py test tests
  '';

  meta = with lib; {
    description = "Pipeline is an asset packaging library for Django";
    homepage = https://github.com/cyberdelia/django-pipeline;
    license = licenses.mit;
    broken = true;
  };
}