1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 fetchpatch, 6 lxml, 7 poetry-core, 8 pythonOlder, 9 pytestCheckHook, 10}: 11 12buildPythonPackage rec { 13 pname = "xpath-expressions"; 14 version = "1.1.0"; 15 format = "pyproject"; 16 disabled = pythonOlder "3.5"; 17 18 src = fetchFromGitHub { 19 owner = "orf"; 20 repo = "xpath-expressions"; 21 rev = "v${version}"; 22 hash = "sha256-UAzDXrz1Tr9/OOjKAg/5Std9Qlrnizei8/3XL3hMSFA="; 23 }; 24 25 patches = [ 26 # https://github.com/orf/xpath-expressions/pull/4 27 (fetchpatch { 28 name = "replace-poetry-with-poetry-core.patch"; 29 url = "https://github.com/orf/xpath-expressions/commit/3c5900fd6b2d08dd9468707f35ab42072cf75bd3.patch"; 30 hash = "sha256-IeV6ncJyt/w2s5TPpbM5a3pljNT6Bp5PIiqgTg2iTRA="; 31 }) 32 ]; 33 34 nativeBuildInputs = [ poetry-core ]; 35 36 nativeCheckInputs = [ 37 lxml 38 pytestCheckHook 39 ]; 40 41 pythonImportsCheck = [ "xpath" ]; 42 43 meta = with lib; { 44 description = "Python module to handle XPath expressions"; 45 homepage = "https://github.com/orf/xpath-expressions"; 46 license = with licenses; [ mit ]; 47 maintainers = with maintainers; [ fab ]; 48 }; 49}