1{ enum-compat
2, lib
3, buildPythonPackage
4, fetchFromGitHub
5, nose
6, python
7}:
8
9buildPythonPackage rec {
10 pname = "bashlex";
11 version = "0.15";
12
13 src = fetchFromGitHub {
14 owner = "idank";
15 repo = pname;
16 rev = version;
17 sha256 = "sha256-kKVorAIKlyC9vUzLOlaZ/JrG1kBBRIvLwBmHNj9nx84=";
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 pythonImportsCheck = [ "bashlex" ];
33
34 meta = with lib; {
35 description = "Python parser for bash";
36 license = licenses.gpl3Plus;
37 homepage = "https://github.com/idank/bashlex";
38 maintainers = with maintainers; [ multun ];
39 };
40}