Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 cached-property, 5 click, 6 fetchFromGitHub, 7 packaging, 8 pytest-timeout, 9 pytestCheckHook, 10 pythonOlder, 11 setuptools, 12}: 13 14buildPythonPackage rec { 15 pname = "pythonfinder"; 16 version = "2.1.0"; 17 pyproject = true; 18 19 disabled = pythonOlder "3.7"; 20 21 src = fetchFromGitHub { 22 owner = "sarugaku"; 23 repo = "pythonfinder"; 24 rev = "refs/tags/${version}"; 25 hash = "sha256-CbaKXD7Sde8euRqvc/IHoXoSMF+dNd7vT9LkLWq4/IU="; 26 }; 27 28 postPatch = '' 29 substituteInPlace pyproject.toml \ 30 --replace " --cov" "" 31 ''; 32 33 nativeBuildInputs = [ setuptools ]; 34 35 propagatedBuildInputs = [ packaging ] ++ lib.optionals (pythonOlder "3.8") [ cached-property ]; 36 37 passthru.optional-dependencies = { 38 cli = [ click ]; 39 }; 40 41 nativeCheckInputs = [ 42 pytest-timeout 43 pytestCheckHook 44 ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies); 45 46 pythonImportsCheck = [ "pythonfinder" ]; 47 48 meta = with lib; { 49 description = "Cross platform search tool for finding Python"; 50 mainProgram = "pyfinder"; 51 homepage = "https://github.com/sarugaku/pythonfinder"; 52 changelog = "https://github.com/sarugaku/pythonfinder/blob/v${version}/CHANGELOG.rst"; 53 license = licenses.mit; 54 maintainers = with maintainers; [ cpcloud ]; 55 }; 56}