summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/pynintendoauth/default.nix
blob: c235e38e9f30d3a4b6a301cbec123c470b3f32bc (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
{
  aiohttp,
  buildPythonPackage,
  fetchFromGitHub,
  lib,
  setuptools,
}:

buildPythonPackage rec {
  pname = "pynintendoauth";
  version = "1.0.2";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "pantherale0";
    repo = "pynintendoauth";
    tag = version;
    hash = "sha256-1GCeFaHHdU98ar6QLwyBI7Smzlj5XvyqPhC7Ev8uvmE=";
  };

  postPatch = ''
    substituteInPlace pynintendoauth/_version.py \
      --replace-fail '__version__ = "1.0.0"' '__version__ = "${version}"'
  '';

  build-system = [ setuptools ];

  dependencies = [
    aiohttp
  ];

  pythonImportsCheck = [ "pynintendoauth" ];

  # upstream has no unit tests
  doCheck = false;

  meta = {
    changelog = "https://github.com/pantherale0/pynintendoauth/releases/tag/${src.tag}";
    description = "Python module to provide APIs to authenticate with Nintendo services";
    homepage = "https://github.com/pantherale0/pynintendoauth";
    license = lib.licenses.asl20;
    maintainers = [ lib.maintainers.dotlambda ];
  };
}