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 rev = "refs/tags/${version}";
32 hash = "sha256-HzjhOPXElwKoJLrhGIbVn798tbX/kaS1EpQIX+vXCtE=";
33 };
34
35 build-system = [ setuptools ];
36
37 dependencies =
38 [
39 sqlalchemy
40 pycrypto
41 cryptography
42 ]
43 ++ lib.optionals (isPy27) [
44 funcsigs
45 pycryptopp
46 ];
47
48 nativeCheckInputs = [
49 glibcLocales
50 python-memcached
51 mock
52 pylibmc
53 pymongo
54 redis
55 webtest
56 pytestCheckHook
57 ];
58
59 # Can not run memcached tests because it immediately tries to connect.
60 # Disable external tests because they need to connect to a live database.
61 pytestFlagsArray = [
62 "--ignore=tests/test_memcached.py"
63 "--ignore-glob='tests/test_managers/test_ext_*'"
64 ];
65
66 meta = {
67 description = "Session and Caching library with WSGI Middleware";
68 homepage = "https://github.com/bbangert/beaker";
69 license = lib.licenses.bsd3;
70 maintainers = with lib.maintainers; [ domenkozar ];
71 knownVulnerabilities = [ "CVE-2013-7489" ];
72 };
73}