1{ stdenv, fetchurl, pythonPackages, xmlsec, which, openssl }:
2
3pythonPackages.buildPythonApplication rec {
4 name = "keystone-${version}";
5 version = "8.0.0";
6 namePrefix = "";
7
8 PBR_VERSION = "${version}";
9
10 src = fetchurl {
11 url = "https://github.com/openstack/keystone/archive/${version}.tar.gz";
12 sha256 = "1xbrs7xgwjzrs07zyxxcl2lq18dh582gd6lx1zzzji8c0qmffy0z";
13 };
14
15 # remove on next version bump
16 patches = [ ./remove-oslo-policy-tests.patch ];
17
18 # https://github.com/openstack/keystone/blob/stable/liberty/requirements.txt
19 propagatedBuildInputs = with pythonPackages; [
20 pbr webob eventlet greenlet PasteDeploy paste routes cryptography six
21 sqlalchemy sqlalchemy_migrate stevedore passlib keystoneclient memcached
22 keystonemiddleware oauthlib pysaml2 dogpile_cache jsonschema pycadf msgpack
23 xmlsec MySQL_python
24
25 # oslo
26 oslo-cache oslo-concurrency oslo-config oslo-context oslo-messaging oslo-db
27 oslo-i18n oslo-log oslo-middleware oslo-policy oslo-serialization oslo-service
28 oslo-utils
29 ];
30
31 buildInputs = with pythonPackages; [
32 coverage fixtures mock subunit tempest-lib testtools testrepository
33 ldap ldappool webtest requests2 oslotest pep8 pymongo which
34 ];
35
36 makeWrapperArgs = ["--prefix PATH : '${openssl.bin}/bin:$PATH'"];
37
38 postInstall = ''
39 # install .ini files
40 mkdir -p $out/etc
41 cp etc/* $out/etc
42
43 # check all binaries don't crash
44 for i in $out/bin/*; do
45 $i --help
46 done
47 '';
48
49 meta = with stdenv.lib; {
50 homepage = http://keystone.openstack.org/;
51 description = "Authentication, authorization and service discovery mechanisms via HTTP";
52 license = stdenv.lib.licenses.asl20;
53 platforms = stdenv.lib.platforms.linux;
54 };
55}