2022-12-17 10:02:37 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, python
|
2022-12-17 10:02:37 +00:00
|
|
|
, pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "bashlex";
|
2023-04-29 16:46:19 +00:00
|
|
|
version = "0.18";
|
2022-12-17 10:02:37 +00:00
|
|
|
|
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "idank";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2023-04-29 16:46:19 +00:00
|
|
|
hash = "sha256-ddZN91H95RiTLXx4lpES1Dmz7nNsSVUeuFuOEpJ7LQI=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# workaround https://github.com/idank/bashlex/issues/51
|
|
|
|
preBuild = ''
|
2023-03-04 12:14:45 +00:00
|
|
|
${python.pythonForBuild.interpreter} -c 'import bashlex'
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-12-17 10:02:37 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-07-04 02:40:35 +00:00
|
|
|
pythonImportsCheck = [ "bashlex" ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Python parser for bash";
|
2021-07-04 02:40:35 +00:00
|
|
|
license = licenses.gpl3Plus;
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/idank/bashlex";
|
|
|
|
maintainers = with maintainers; [ multun ];
|
|
|
|
};
|
|
|
|
}
|