Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, buildPythonPackage 3, fetchPypi 4, setuptools_scm 5, isPy3k 6, pytest 7, pytest-black 8, pytest-flake8 9, pytestcov 10}: 11 12buildPythonPackage rec { 13 pname = "backports.functools_lru_cache"; 14 version = "1.6.1"; 15 16 src = fetchPypi { 17 inherit pname version; 18 sha256 = "8fde5f188da2d593bd5bc0be98d9abc46c95bb8a9dde93429570192ee6cc2d4a"; 19 }; 20 21 nativeBuildInputs = [ setuptools_scm ]; 22 23 checkInputs = [ pytest pytest-flake8 pytest-black pytestcov ]; 24 # ironically, they fail a linting test, and pytest.ini forces that test suite 25 checkPhase = '' 26 rm backports/functools_lru_cache.py 27 pytest -k 'not format' 28 ''; 29 30 # Test fail on Python 2 31 doCheck = isPy3k; 32 33 meta = { 34 description = "Backport of functools.lru_cache"; 35 homepage = "https://github.com/jaraco/backports.functools_lru_cache"; 36 license = lib.licenses.mit; 37 }; 38}