about summary refs log tree commit diff
path: root/pkgs/development/python-modules/attr/default.nix
blob: 5a6400d3e5e3a503cf21d0f38e98e3a4dce1a3ed (plain) (blame)
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
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  setuptools,
  python,
}:

buildPythonPackage rec {
  pname = "attr";
  version = "0.3.2";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "denis-ryzhkov";
    repo = "attr";
    rev = version;
    hash = "sha256-1gOAONDuZb7xEPFZJc00BRtFF06uX65S8b3RRRNGeSo=";
  };

  build-system = [ setuptools ];

  checkPhase = ''
    runHook preCheck
    ${python.interpreter} -c "import dry_attr; dry_attr.test()"
    runHook postCheck
  '';

  meta = {
    description = "Simple decorator to set attributes of target function or class in a DRY way.";
    homepage = "https://github.com/denis-ryzhkov/attr";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ pyrox0 ];
  };
}