2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
fetchpatch,
|
|
|
|
lxml,
|
|
|
|
poetry-core,
|
|
|
|
pythonOlder,
|
|
|
|
pytestCheckHook,
|
2021-04-05 15:23:46 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "xpath-expressions";
|
|
|
|
version = "1.1.0";
|
|
|
|
format = "pyproject";
|
2023-10-09 19:29:22 +00:00
|
|
|
disabled = pythonOlder "3.5";
|
2021-04-05 15:23:46 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "orf";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-UAzDXrz1Tr9/OOjKAg/5Std9Qlrnizei8/3XL3hMSFA=";
|
2021-04-05 15:23:46 +00:00
|
|
|
};
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
patches = [
|
|
|
|
# https://github.com/orf/xpath-expressions/pull/4
|
|
|
|
(fetchpatch {
|
|
|
|
name = "replace-poetry-with-poetry-core.patch";
|
|
|
|
url = "https://github.com/orf/xpath-expressions/commit/3c5900fd6b2d08dd9468707f35ab42072cf75bd3.patch";
|
|
|
|
hash = "sha256-IeV6ncJyt/w2s5TPpbM5a3pljNT6Bp5PIiqgTg2iTRA=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ poetry-core ];
|
2021-04-05 15:23:46 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-04-05 15:23:46 +00:00
|
|
|
lxml
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "xpath" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python module to handle XPath expressions";
|
|
|
|
homepage = "https://github.com/orf/xpath-expressions";
|
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|