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