summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/click-configfile/default.nix
blob: f116862157d369106f95ead69264c3a46f78e5db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
{
  lib,
  buildPythonPackage,
  fetchPypi,
  click,
  six,
  pytestCheckHook,
}:

buildPythonPackage rec {
  pname = "click-configfile";
  version = "0.2.3";
  format = "setuptools";

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-lb7sE77pUOmPQ8gdzavvT2RAkVWepmKY+drfWTUdkNE=";
  };

  propagatedBuildInputs = [
    click
    six
  ];

  nativeCheckInputs = [ pytestCheckHook ];

  postPatch = ''
    substituteInPlace setup.py \
      --replace "install_requires=install_requires," 'install_requires=["click >= 6.6", "six >= 1.10"],'
  '';

  pythonImportsCheck = [ "click_configfile" ];

  disabledTests = [
    "test_configfile__with_unbound_section"
    "test_matches_section__with_bad_arg"
  ];

  meta = {
    description = "Add support for commands that use configuration files to Click";
    homepage = "https://github.com/click-contrib/click-configfile";
    license = lib.licenses.bsd3;
    maintainers = [ ];
  };
}