2019-12-29 18:34:42 +00:00
|
|
|
{ enum-compat
|
|
|
|
, lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, nose
|
|
|
|
, python
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "bashlex";
|
2021-07-02 23:34:18 +01:00
|
|
|
version = "0.15";
|
2019-12-29 18:34:42 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "idank";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2021-07-02 23:34:18 +01:00
|
|
|
sha256 = "sha256-kKVorAIKlyC9vUzLOlaZ/JrG1kBBRIvLwBmHNj9nx84=";
|
2019-12-29 18:34:42 +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-02 23:34:18 +01:00
|
|
|
pythonImportsCheck = [ "bashlex" ];
|
|
|
|
|
2019-12-29 18:34:42 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Python parser for bash";
|
2021-07-02 23:34:18 +01:00
|
|
|
license = licenses.gpl3Plus;
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/idank/bashlex";
|
2019-12-29 18:34:42 +00:00
|
|
|
maintainers = with maintainers; [ multun ];
|
|
|
|
};
|
|
|
|
}
|