summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/pydiscourse/default.nix
blob: e55584e60a2043414105f92b7c1ec721a0a635bf (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
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  pytest-mock,
  pytestCheckHook,
  requests,
  requests-mock,
}:

buildPythonPackage rec {
  pname = "pydiscourse";
  version = "1.7.0";
  format = "setuptools";

  src = fetchFromGitHub {
    owner = "pydiscourse";
    repo = "pydiscourse";
    tag = "v${version}";
    hash = "sha256-KqJ6ag4owG7US5Q4Ygjq263ds1o/JhEJ3bNa8YecYtE=";
  };

  propagatedBuildInputs = [ requests ];

  nativeCheckInputs = [
    pytest-mock
    pytestCheckHook
    requests-mock
  ];

  pythonImportsCheck = [ "pydiscourse" ];

  meta = {
    description = "Python library for working with Discourse";
    mainProgram = "pydiscoursecli";
    homepage = "https://github.com/pydiscourse/pydiscourse";
    changelog = "https://github.com/pydiscourse/pydiscourse/releases/tag/v${version}";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ Dettorer ];
  };
}