mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-25 22:33:43 +00:00
2bfa93e01c
It won't be enough to fix cross in all cases, but it is in at least one: pywayland. I've only made the change in cases I'm confident it's correct, as it would be wrong to change this when python.interpreter is used in wrappers, and possibly when it's used for running tests.
39 lines
760 B
Nix
39 lines
760 B
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, python
|
|
, pytestCheckHook
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "bashlex";
|
|
version = "0.16";
|
|
|
|
format = "setuptools";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "idank";
|
|
repo = pname;
|
|
rev = version;
|
|
hash = "sha256-vpcru/ax872WK3XuRQWTmTD9zRdObn2Bit6kY9ZIQaI=";
|
|
};
|
|
|
|
# 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 ];
|
|
};
|
|
}
|