1{ enum-compat
2, lib
3, buildPythonPackage
4, fetchFromGitHub
5, nose
6, python
7}:
8
9buildPythonPackage rec {
10 pname = "bashlex";
11 version = "0.14";
12
13 src = fetchFromGitHub {
14 owner = "idank";
15 repo = pname;
16 rev = version;
17 sha256 = "070spmbf53y18miky5chgky4x5h8kp9czkp7dm173klv9pi2cn0k";
18 };
19
20 checkInputs = [ nose ];
21 propagatedBuildInputs = [ enum-compat ];
22
23 # workaround https://github.com/idank/bashlex/issues/51
24 preBuild = ''
25 ${python.interpreter} -c 'import bashlex'
26 '';
27
28 checkPhase = ''
29 ${python.interpreter} -m nose --with-doctest
30 '';
31
32 meta = with lib; {
33 description = "Python parser for bash";
34 license = licenses.gpl3;
35 homepage = "https://github.com/idank/bashlex";
36 maintainers = with maintainers; [ multun ];
37 };
38}