2022-12-11 20:56:55 -08:00
|
|
|
{
|
|
|
|
lib,
|
2019-12-29 19:34:42 +01:00
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
python,
|
2022-12-11 20:56:55 -08:00
|
|
|
pytestCheckHook,
|
2019-12-29 19:34:42 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "bashlex";
|
2023-04-28 10:24:57 +02:00
|
|
|
version = "0.18";
|
2022-12-11 20:56:55 -08:00
|
|
|
|
|
|
|
format = "setuptools";
|
2019-12-29 19:34:42 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "idank";
|
2025-05-25 03:41:48 +02:00
|
|
|
repo = "bashlex";
|
2025-04-08 02:51:45 -04:00
|
|
|
rev = version;
|
2023-04-28 10:24:57 +02:00
|
|
|
hash = "sha256-ddZN91H95RiTLXx4lpES1Dmz7nNsSVUeuFuOEpJ7LQI=";
|
2019-12-29 19:34:42 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
# workaround https://github.com/idank/bashlex/issues/51
|
|
|
|
preBuild = ''
|
2023-11-05 17:38:24 -08:00
|
|
|
${python.pythonOnBuildForHost.interpreter} -c 'import bashlex'
|
2019-12-29 19:34:42 +01:00
|
|
|
'';
|
|
|
|
|
2023-01-21 12:00:00 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2019-12-29 19:34:42 +01:00
|
|
|
|
2021-07-03 00:34:18 +02:00
|
|
|
pythonImportsCheck = [ "bashlex" ];
|
|
|
|
|
2019-12-29 19:34:42 +01:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Python parser for bash";
|
2021-07-03 00:34:18 +02:00
|
|
|
license = licenses.gpl3Plus;
|
2020-03-31 21:11:51 -04:00
|
|
|
homepage = "https://github.com/idank/bashlex";
|
2019-12-29 19:34:42 +01:00
|
|
|
maintainers = with maintainers; [ multun ];
|
|
|
|
};
|
|
|
|
}
|