1{ stdenv, fetchurl, buildPythonPackage, pip, pytest, click, six, first 2, setuptools_scm, git, glibcLocales, mock }: 3 4buildPythonPackage rec { 5 pname = "pip-tools"; 6 version = "1.11.0"; 7 name = pname + "-" + version; 8 9 src = fetchurl { 10 url = "mirror://pypi/p/pip-tools/${name}.tar.gz"; 11 sha256 = "ba427b68443466c389e3b0b0ef55f537ab39344190ea980dfebb333d0e6a50a3"; 12 }; 13 14 LC_ALL = "en_US.UTF-8"; 15 checkInputs = [ pytest git glibcLocales mock ]; 16 propagatedBuildInputs = [ pip click six first setuptools_scm ]; 17 18 disabledTests = stdenv.lib.concatMapStringsSep " and " (s: "not " + s) [ 19 # Depend on network tests: 20 "test_editable_package_vcs" 21 "test_generate_hashes_all_platforms" 22 "test_generate_hashes_without_interfering_with_each_other" 23 "test_realistic_complex_sub_dependencies" 24 "test_generate_hashes_with_editable" 25 # Expect specific version of "six": 26 "test_editable_package" 27 "test_input_file_without_extension" 28 "test_locally_available_editable_package_is_not_archived_in_cache_dir" 29 ]; 30 31 checkPhase = '' 32 export HOME=$(mktemp -d) VIRTUAL_ENV=1 33 tests_without_network_access=" 34 not test_realistic_complex_sub_dependencies 35 and not test_editable_package_vcs 36 and not test_generate_hashes_all_platforms 37 and not test_generate_hashes_without_interfering_with_each_other 38 " 39 py.test -k "${disabledTests}" 40 ''; 41 42 meta = with stdenv.lib; { 43 description = "Keeps your pinned dependencies fresh"; 44 homepage = https://github.com/jazzband/pip-tools/; 45 license = licenses.bsd3; 46 maintainers = with maintainers; [ zimbatm ]; 47 }; 48}