summary refs log tree commit diff
path: root/pkgs/development/python-modules/bashlex/default.nix
blob: c575dc516ffee818ee682b87640995b590ae16ff (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
38
{ enum-compat
, lib
, buildPythonPackage
, fetchFromGitHub
, nose
, python
}:

buildPythonPackage rec {
  pname = "bashlex";
  version = "0.14";

  src = fetchFromGitHub {
    owner = "idank";
    repo = pname;
    rev = version;
    sha256 = "070spmbf53y18miky5chgky4x5h8kp9czkp7dm173klv9pi2cn0k";
  };

  checkInputs = [ nose ];
  propagatedBuildInputs = [ enum-compat ];

  # workaround https://github.com/idank/bashlex/issues/51
  preBuild = ''
    ${python.interpreter} -c 'import bashlex'
  '';

  checkPhase = ''
    ${python.interpreter} -m nose --with-doctest
  '';

  meta = with lib; {
    description = "Python parser for bash";
    license = licenses.gpl3;
    homepage = https://github.com/idank/bashlex;
    maintainers = with maintainers; [ multun ];
  };
}