nixpkgs/pkgs/development/python-modules/pip-tools/default.nix
Profpatsch 4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
Part of: https://github.com/NixOS/nixpkgs/issues/108938

meta = with stdenv.lib;

is a widely used pattern. We want to slowly remove
the `stdenv.lib` indirection and encourage people
to use `lib` directly. Thus let’s start with the meta
field.

This used a rewriting script to mostly automatically
replace all occurances of this pattern, and add the
`lib` argument to the package header if it doesn’t
exist yet.

The script in its current form is available at
https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
2021-01-11 10:38:22 +01:00

52 lines
1.7 KiB
Nix

{ lib, stdenv, fetchPypi, buildPythonPackage, pip, pytest, click, six
, setuptools_scm, git, glibcLocales, mock }:
buildPythonPackage rec {
pname = "pip-tools";
version = "5.4.0";
src = fetchPypi {
inherit pname version;
sha256 = "a4d3990df2d65961af8b41dacc242e600fdc8a65a2e155ed3d2fc18a5c209f20";
};
LC_ALL = "en_US.UTF-8";
checkInputs = [ pytest git glibcLocales mock ];
propagatedBuildInputs = [ pip click six setuptools_scm ];
disabledTests = stdenv.lib.concatMapStringsSep " and " (s: "not " + s) [
# Depend on network tests:
"test_allow_unsafe_option" #paramaterized, but all fail
"test_annotate_option" #paramaterized, but all fail
"test_editable_package_vcs"
"test_editable_top_level_deps_preserved" # can't figure out how to select only one parameter to ignore
"test_filter_pip_markers"
"test_filter_pip_markes"
"test_generate_hashes_all_platforms"
"test_generate_hashes_verbose"
"test_generate_hashes_with_editable"
"test_generate_hashes_with_url"
"test_generate_hashes_without_interfering_with_each_other"
"test_get_file_hash_without_interfering_with_each_other"
"test_get_hashes_local_repository_cache_miss"
"test_realistic_complex_sub_dependencies"
"test_stdin"
"test_upgrade_packages_option"
"test_url_package"
"test_editable_package"
"test_locally_available_editable_package_is_not_archived_in_cache_dir"
];
checkPhase = ''
export HOME=$(mktemp -d) VIRTUAL_ENV=1
py.test -k "${disabledTests}"
'';
meta = with lib; {
description = "Keeps your pinned dependencies fresh";
homepage = "https://github.com/jazzband/pip-tools/";
license = licenses.bsd3;
maintainers = with maintainers; [ zimbatm ];
};
}