about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/http-message-signatures/default.nix
blob: bc3351feb3d84a16e7aea1784c0beb6a57f5ea6e (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
50
51
52
53
54
{ lib
, buildPythonPackage
, cryptography
, fetchFromGitHub
, http-sfv
, pytestCheckHook
, pythonOlder
, setuptools-scm
, requests
}:

buildPythonPackage rec {
  pname = "http-message-signatures";
  version = "0.4.4";
  format = "setuptools";

  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "pyauth";
    repo = pname;
    rev = "v${version}";
    hash = "sha256-acTziJM5H5Td+eG/LNrlNwgpVvFDyl/tf6//YuE1XZk=";
  };

  nativeBuildInputs = [
    setuptools-scm
  ];

  propagatedBuildInputs = [
    cryptography
    http-sfv
  ];

  nativeCheckInputs = [
    pytestCheckHook
    requests
  ];

  pytestFlagsArray = [
    "test/test.py"
  ];

  pythonImportsCheck = [
    "http_message_signatures"
  ];

  meta = with lib; {
    description = "Requests authentication module for HTTP Signature";
    homepage = "https://github.com/pyauth/http-message-signatures";
    license = licenses.asl20;
    maintainers = with maintainers; [ fab ];
  };
}