1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 python,
6 pytestCheckHook,
7}:
8
9buildPythonPackage rec {
10 pname = "bashlex";
11 version = "0.18";
12
13 format = "setuptools";
14
15 src = fetchFromGitHub {
16 owner = "idank";
17 repo = "bashlex";
18 rev = version;
19 hash = "sha256-ddZN91H95RiTLXx4lpES1Dmz7nNsSVUeuFuOEpJ7LQI=";
20 };
21
22 # workaround https://github.com/idank/bashlex/issues/51
23 preBuild = ''
24 ${python.pythonOnBuildForHost.interpreter} -c 'import bashlex'
25 '';
26
27 nativeCheckInputs = [ pytestCheckHook ];
28
29 pythonImportsCheck = [ "bashlex" ];
30
31 meta = with lib; {
32 description = "Python parser for bash";
33 license = licenses.gpl3Plus;
34 homepage = "https://github.com/idank/bashlex";
35 maintainers = with maintainers; [ multun ];
36 };
37}