depot/third_party/nixpkgs/pkgs/development/python-modules/bashlex/default.nix
Default email c7e6337bd0 Project import generated by Copybara.
GitOrigin-RevId: 08e4dc3a907a6dfec8bb3bbf1540d8abbffea22b
2023-04-29 12:46:19 -04:00

38 lines
760 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, python
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "bashlex";
version = "0.18";
format = "setuptools";
src = fetchFromGitHub {
owner = "idank";
repo = pname;
rev = version;
hash = "sha256-ddZN91H95RiTLXx4lpES1Dmz7nNsSVUeuFuOEpJ7LQI=";
};
# workaround https://github.com/idank/bashlex/issues/51
preBuild = ''
${python.pythonForBuild.interpreter} -c 'import bashlex'
'';
nativeCheckInputs = [
pytestCheckHook
];
pythonImportsCheck = [ "bashlex" ];
meta = with lib; {
description = "Python parser for bash";
license = licenses.gpl3Plus;
homepage = "https://github.com/idank/bashlex";
maintainers = with maintainers; [ multun ];
};
}