summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/discord-webhook/default.nix
blob: c1bd7a56b14fed4c22373f24d5099489d309c21e (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
{
  buildPythonPackage,
  fetchFromGitHub,
  httpx,
  lib,
  nix-update-script,
  poetry-core,
  pytestCheckHook,
  requests,
}:

buildPythonPackage rec {
  pname = "discord-webhook";
  version = "1.4.1";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "lovvskillz";
    repo = "python-discord-webhook";
    tag = version;
    hash = "sha256-7nVvtXo1XjQExZSCF9VaYSCeEByJY2jn5KbVGTi33f0=";
  };

  build-system = [ poetry-core ];

  dependencies = [
    requests
    httpx # Optional, required for async support.
  ];

  pythonImportsCheck = [
    "discord_webhook"
  ];

  nativeCheckInputs = [ pytestCheckHook ];

  passthru.updateScript = nix-update-script { };

  meta = {
    description = "Execute discord webhooks";
    homepage = "https://github.com/lovvskillz/python-discord-webhook";
    changelog = "https://github.com/lovvskillz/python-discord-webhook/blob/${version}/CHANGES.md";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ polyfloyd ];
  };
}