1{ 2 lib, 3 stdenv, 4 buildPythonPackage, 5 build, 6 click, 7 fetchPypi, 8 pep517, 9 pip, 10 pytest-xdist, 11 pytestCheckHook, 12 pythonOlder, 13 setuptools, 14 setuptools-scm, 15 tomli, 16 tomli-w, 17 wheel, 18}: 19 20buildPythonPackage rec { 21 pname = "pip-tools"; 22 version = "7.4.1"; 23 format = "pyproject"; 24 25 disabled = pythonOlder "3.8"; 26 27 src = fetchPypi { 28 inherit pname version; 29 hash = "sha256-hkgm9Qc4ZEUOJNvuuFzjkgzfsJhIo9aev1N7Uh8UvMk="; 30 }; 31 32 patches = [ ./fix-setup-py-bad-syntax-detection.patch ]; 33 34 nativeBuildInputs = [ setuptools-scm ]; 35 36 propagatedBuildInputs = [ 37 build 38 click 39 pep517 40 pip 41 setuptools 42 wheel 43 ] ++ lib.optionals (pythonOlder "3.11") [ tomli ]; 44 45 __darwinAllowLocalNetworking = true; 46 47 nativeCheckInputs = [ 48 pytest-xdist 49 pytestCheckHook 50 tomli-w 51 ]; 52 53 preCheck = lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) '' 54 # https://github.com/python/cpython/issues/74570#issuecomment-1093748531 55 export no_proxy='*'; 56 ''; 57 58 disabledTests = [ 59 # Tests require network access 60 "network" 61 "test_direct_reference_with_extras" 62 "test_local_duplicate_subdependency_combined" 63 "test_bad_setup_file" 64 # Assertion error 65 "test_compile_recursive_extras" 66 "test_combine_different_extras_of_the_same_package" 67 "test_diff_should_not_uninstall" 68 "test_cli_compile_all_extras_with_multiple_packages" 69 # Deprecations 70 "test_error_in_pyproject_toml" 71 ]; 72 73 pythonImportsCheck = [ "piptools" ]; 74 75 meta = with lib; { 76 description = "Keeps your pinned dependencies fresh"; 77 homepage = "https://github.com/jazzband/pip-tools/"; 78 changelog = "https://github.com/jazzband/pip-tools/releases/tag/${version}"; 79 license = licenses.bsd3; 80 maintainers = with maintainers; [ zimbatm ]; 81 }; 82}