summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/flatbencode/default.nix
blob: 5ed38818a6a1536ae5542cf22a1a4d119905794d (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
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  hypothesis,
  pytestCheckHook,
  setuptools,
}:

buildPythonPackage (finalAttrs: {
  pname = "flatbencode";
  version = "0.2.1";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "acatton";
    repo = "flatbencode";
    tag = "v${finalAttrs.version}";
    hash = "sha256-1/4w41E8IKygJTBcQOexiDytV6BvVBwIjajKz2uCfu8=";
  };

  build-system = [
    setuptools
  ];

  nativeCheckInputs = [
    hypothesis
    pytestCheckHook
  ];

  pythonImportsCheck = [ "flatbencode" ];

  meta = {
    description = "Fast, safe and non-recursive implementation of Bittorrent bencoding";
    homepage = "https://github.com/acatton/flatbencode";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ ambroisie ];
  };
})