nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, buildPythonApplication
3, fetchPypi
4, installShellFiles
5, pbr
6, openstackdocstheme
7, oslo-config
8, oslo-log
9, oslo-serialization
10, oslo-utils
11, prettytable
12, requests
13, simplejson
14, sphinx
15, sphinxcontrib-programoutput
16, babel
17, osc-lib
18, python-keystoneclient
19, debtcollector
20, callPackage
21, pythonOlder
22}:
23
24buildPythonApplication rec {
25 pname = "python-manilaclient";
26 version = "3.4.0";
27 format = "setuptools";
28
29 disabled = pythonOlder "3.6";
30
31 src = fetchPypi {
32 inherit pname version;
33 hash = "sha256-F41/k7NJigwFNw2946sj3dZDKDH+PkgOjkml9t3Mgtw=";
34 };
35
36 nativeBuildInputs = [
37 installShellFiles
38 openstackdocstheme
39 sphinx
40 sphinxcontrib-programoutput
41 ];
42
43 propagatedBuildInputs = [
44 pbr
45 oslo-config
46 oslo-log
47 oslo-serialization
48 oslo-utils
49 prettytable
50 requests
51 simplejson
52 babel
53 osc-lib
54 python-keystoneclient
55 debtcollector
56 ];
57
58 postInstall = ''
59 export PATH=$out/bin:$PATH
60 sphinx-build -a -E -d doc/build/doctrees -b man doc/source doc/build/man
61 installManPage doc/build/man/python-manilaclient.1
62 '';
63
64 # Checks moved to 'passthru.tests' to workaround infinite recursion
65 doCheck = false;
66
67 passthru.tests = {
68 tests = callPackage ./tests.nix { };
69 };
70
71 pythonImportsCheck = [
72 "manilaclient"
73 ];
74
75 meta = with lib; {
76 description = "Client library for OpenStack Manila API";
77 homepage = "https://github.com/openstack/python-manilaclient";
78 license = licenses.asl20;
79 maintainers = teams.openstack.members;
80 };
81}