1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, fetchpatch
5, requests
6, pytestCheckHook
7, mock
8, nose
9, pycrypto
10}:
11
12buildPythonPackage rec {
13 pname = "rauth";
14 version = "0.7.2";
15 format = "setuptools";
16
17 src = fetchFromGitHub {
18 owner = "litl";
19 repo = "rauth";
20 rev = version;
21 hash = "sha256-wRKZbxZCEfihOaJM8sk8438LE++KJWxdOGImpL1gHa4=";
22 };
23
24 patches = [
25 (fetchpatch {
26 # https://github.com/litl/rauth/pull/211
27 name = "fix-pycrypdodome-replacement-for-pycrypto.patch";
28 url = "https://github.com/litl/rauth/commit/7fb3b7bf1a1869a52cf59ee3eb607d318e97265c.patch";
29 hash = "sha256-jiAIw+VQ2d/bkm2brqfY1RUrNGf+lsMPnoI91gGUS6o=";
30 })
31 ];
32
33 propagatedBuildInputs = [
34 requests
35 ];
36
37 pythonImportsCheck = [ "rauth" ];
38
39 nativeCheckInputs = [
40 pytestCheckHook
41 mock
42 nose
43 pycrypto
44 ];
45
46 meta = with lib; {
47 description = "A Python library for OAuth 1.0/a, 2.0, and Ofly";
48 homepage = "https://github.com/litl/rauth";
49 changelog = "https://github.com/litl/rauth/blob/${src.rev}/CHANGELOG";
50 license = licenses.mit;
51 maintainers = with maintainers; [ blaggacao ];
52 };
53}
54