aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/development/python-modules/PyRMVtransport/default.nix
blob: 86fb75f14548c0a12a15ab8bb687dea2775cb8fa (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
46
47
48
49
50
51
{ lib, buildPythonPackage, fetchFromGitHub
, flit
, lxml, httpx
, pytest, pytestcov, pytest-asyncio, pytest-mock, aresponses
, pythonOlder
}:

buildPythonPackage rec {
  pname = "PyRMVtransport";
  version = "0.2.10";
  format = "pyproject";
  disabled = pythonOlder "3.6";

  src = fetchFromGitHub {
    owner = "cgtobi";
    repo = pname;
    rev = "v${version}";
    sha256 = "03qrylidb1d6zw6a22d1drdf73cvfxqcqaa8qi8x4pli1axcfh5w";
  };

  nativeBuildInputs = [
    flit
  ];

  propagatedBuildInputs = [
    httpx
    lxml
  ];

  # requires pytest-httpx
  doCheck = false;

  checkInputs = [
    pytest
    pytestcov
    pytest-asyncio
    pytest-mock
    # pytest-httpx is missing
    aresponses
  ];
  checkPhase = ''
    pytest --cov=RMVtransport tests
  '';

  meta = with lib; {
    homepage = "https://github.com/cgtobi/PyRMVtransport";
    description = "Get transport information from opendata.rmv.de";
    license = licenses.mit;
    maintainers = with maintainers; [ hexa ];
  };
}