1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, lxml 5, poetry-core 6, pythonOlder 7, pytestCheckHook 8}: 9 10buildPythonPackage rec { 11 pname = "xpath-expressions"; 12 version = "1.1.0"; 13 disabled = pythonOlder "3.5"; 14 format = "pyproject"; 15 16 src = fetchFromGitHub { 17 owner = "orf"; 18 repo = pname; 19 rev = "v${version}"; 20 sha256 = "0l289iw2zmzxyfi3g2z7b917vmsaz47h5jp871zvykpmpigc632h"; 21 }; 22 23 nativeBuildInputs = [ 24 poetry-core 25 ]; 26 27 checkInputs = [ 28 lxml 29 pytestCheckHook 30 ]; 31 32 postPatch = '' 33 # Was fixed upstream but not released 34 substituteInPlace pyproject.toml \ 35 --replace "poetry.masonry.api" "poetry.core.masonry.api" 36 ''; 37 38 pythonImportsCheck = [ "xpath" ]; 39 40 meta = with lib; { 41 description = "Python module to handle XPath expressions"; 42 homepage = "https://github.com/orf/xpath-expressions"; 43 license = with licenses; [ mit ]; 44 maintainers = with maintainers; [ fab ]; 45 }; 46}