2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
2021-12-30 13:39:12 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, fetchpatch
|
|
|
|
, poetry-core
|
2020-04-24 23:36:52 +00:00
|
|
|
, python
|
2021-12-30 13:39:12 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2022-04-27 09:35:20 +00:00
|
|
|
, six
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "funcparserlib";
|
2021-12-30 13:39:12 +00:00
|
|
|
version = "1.0.0a0";
|
|
|
|
format = "pyproject";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-30 13:39:12 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "vlasovskikh";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
|
|
|
sha256 = "sha256-YfcboKjyc5ASzrp0duu2R6psf51MGZIeZ0owo5QNSnU=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-12-30 13:39:12 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
2022-04-27 09:35:20 +00:00
|
|
|
six
|
2021-12-30 13:39:12 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-30 13:39:12 +00:00
|
|
|
patches = [
|
|
|
|
# Support for poetry-core, https://github.com/vlasovskikh/funcparserlib/pull/73
|
|
|
|
(fetchpatch {
|
|
|
|
name = "support-poetry-core.patch";
|
|
|
|
url = "https://github.com/vlasovskikh/funcparserlib/commit/61ed558fc146b7a30879919325dfa8aae77be556.patch";
|
|
|
|
sha256 = "sha256-tqdR3r4/t7RWBYZeAabaN7oYf6VxkVVz006XICX9rYI=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"funcparserlib"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Recursive descent parsing library based on functional combinators";
|
|
|
|
homepage = "https://github.com/vlasovskikh/funcparserlib";
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|