2020-04-24 23:36:52 +00:00
|
|
|
{ enum-compat
|
|
|
|
, lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, nose
|
|
|
|
, python
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "bashlex";
|
2021-07-04 02:40:35 +00:00
|
|
|
version = "0.15";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "idank";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2021-07-04 02:40:35 +00:00
|
|
|
sha256 = "sha256-kKVorAIKlyC9vUzLOlaZ/JrG1kBBRIvLwBmHNj9nx84=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
checkInputs = [ nose ];
|
|
|
|
propagatedBuildInputs = [ enum-compat ];
|
|
|
|
|
|
|
|
# workaround https://github.com/idank/bashlex/issues/51
|
|
|
|
preBuild = ''
|
|
|
|
${python.interpreter} -c 'import bashlex'
|
|
|
|
'';
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
${python.interpreter} -m nose --with-doctest
|
|
|
|
'';
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|