1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 glibcLocales,
6 pylibmc,
7 python-memcached,
8 redis,
9 pymongo,
10 mock,
11 webtest,
12 sqlalchemy,
13 pycrypto,
14 cryptography,
15 isPy27,
16 pytestCheckHook,
17 setuptools,
18 funcsigs ? null,
19 pycryptopp ? null,
20}:
21
22buildPythonPackage rec {
23 pname = "beaker";
24 version = "1.13.0";
25 pyproject = true;
26
27 # The pypy release do not contains the tests
28 src = fetchFromGitHub {
29 owner = "bbangert";
30 repo = "beaker";
31 tag = version;
32 hash = "sha256-HzjhOPXElwKoJLrhGIbVn798tbX/kaS1EpQIX+vXCtE=";
33 };
34
35 build-system = [ setuptools ];
36
37 dependencies = [
38 sqlalchemy
39 pycrypto
40 cryptography
41 ]
42 ++ lib.optionals (isPy27) [
43 funcsigs
44 pycryptopp
45 ];
46
47 nativeCheckInputs = [
48 glibcLocales
49 python-memcached
50 mock
51 pylibmc
52 pymongo
53 redis
54 webtest
55 pytestCheckHook
56 ];
57
58 # Can not run memcached tests because it immediately tries to connect.
59 # Disable external tests because they need to connect to a live database.
60 disabledTestPaths = [
61 "tests/test_memcached.py"
62 "tests/test_managers/test_ext_*"
63 ];
64
65 meta = {
66 description = "Session and Caching library with WSGI Middleware";
67 homepage = "https://github.com/bbangert/beaker";
68 license = lib.licenses.bsd3;
69 maintainers = with lib.maintainers; [ ];
70 knownVulnerabilities = [ "CVE-2013-7489" ];
71 };
72}