about summary refs log tree commit diff
path: root/pkgs/development/python-modules/rauth/default.nix
blob: a5456603e0a701ddc8b24f5cff67eb22826c9914 (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
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  fetchpatch,
  requests,
  pytestCheckHook,
  mock,
  nose,
  pycrypto,
}:

buildPythonPackage rec {
  pname = "rauth";
  version = "0.7.2";
  format = "setuptools";

  src = fetchFromGitHub {
    owner = "litl";
    repo = "rauth";
    rev = version;
    hash = "sha256-wRKZbxZCEfihOaJM8sk8438LE++KJWxdOGImpL1gHa4=";
  };

  patches = [
    (fetchpatch {
      # https://github.com/litl/rauth/pull/211
      name = "fix-pycrypdodome-replacement-for-pycrypto.patch";
      url = "https://github.com/litl/rauth/commit/7fb3b7bf1a1869a52cf59ee3eb607d318e97265c.patch";
      hash = "sha256-jiAIw+VQ2d/bkm2brqfY1RUrNGf+lsMPnoI91gGUS6o=";
    })
  ];

  propagatedBuildInputs = [ requests ];

  pythonImportsCheck = [ "rauth" ];

  nativeCheckInputs = [
    pytestCheckHook
    mock
    nose
    pycrypto
  ];

  meta = with lib; {
    description = "A Python library for OAuth 1.0/a, 2.0, and Ofly";
    homepage = "https://github.com/litl/rauth";
    changelog = "https://github.com/litl/rauth/blob/${src.rev}/CHANGELOG";
    license = licenses.mit;
    maintainers = with maintainers; [ blaggacao ];
  };
}