summary refs log tree commit diff
path: root/pkgs/development/python-modules/nose3/default.nix
blob: f9966b246602de485fb205e241893dcc8f834d80 (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
36
37
38
39
40
{ lib
, buildPythonPackage
, coverage
, fetchPypi
, isPyPy
, isPy311
, python
, pythonAtLeast
, stdenv
}:

buildPythonPackage rec {
  pname = "nose3";
  version = "1.3.8";

  # https://github.com/jayvdb/nose3/issues/5
  disabled = pythonAtLeast "3.12";

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-diquIsrbiYsAudT0u7n46H+ODd5sSaiM0MVU9OWSW3Y=";
  };

  propagatedBuildInputs = [ coverage ];

  # PyPy hangs for unknwon reason
  # Darwin and python 3.11 fail at various assertions and I didn't find an easy way to find skip those tests
  doCheck = !isPyPy && !stdenv.isDarwin && !isPy311;

  checkPhase = ''
    ${python.pythonOnBuildForHost.interpreter} selftest.py
  '';

  meta = with lib; {
    description = "Fork of nose v1 not using lib2to3 for compatibility with Python 3";
    homepage = "https://github.com/jayvdb/nose3";
    license = licenses.lgpl3;
    maintainers = with maintainers; [ SuperSandro2000 ];
  };
}