about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/garages-amsterdam/default.nix
blob: cc89020e443064da6b437ab2dc46d60d0b215a0b (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
41
42
43
44
45
46
47
48
49
{ lib
, aiohttp
, buildPythonPackage
, fetchFromGitHub
, poetry-core
, pythonOlder
}:

buildPythonPackage rec {
  pname = "garages-amsterdam";
  version = "4.0.0";
  format = "pyproject";

  disabled = pythonOlder "3.9";

  src = fetchFromGitHub {
    owner = "klaasnicolaas";
    repo = "garages_amsterdam";
    rev = "v${version}";
    sha256 = "sha256-3YSCf5sUnq2+Bt7LA30XeIMg4zsaPF3K5SVzGZ68SbY=";
  };

  postPatch = ''
    substituteInPlace pyproject.toml \
      --replace '"0.0.0"' '"${version}"'
  '';

  nativeBuildInputs = [
    poetry-core
  ];

  propagatedBuildInputs = [
    aiohttp
  ];

  # The only test requires network access
  doCheck = false;

  pythonImportsCheck = [
    "garages_amsterdam"
  ];

  meta = with lib; {
    description = "Python client for getting garage occupancy in Amsterdam";
    homepage = "https://github.com/klaasnicolaas/python-garages-amsterdam";
    license = licenses.mit;
    maintainers = with maintainers; [ fab ];
  };
}