nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at r-updates 87 lines 1.6 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 pbr, 6 setuptools, 7 installShellFiles, 8 9 # direct 10 python-keystoneclient, 11 12 # tests 13 stestrCheckHook, 14 versionCheckHook, 15 hacking, 16 keystoneauth1, 17 stestr, 18 openstacksdk, 19 20 # docs 21 sphinxHook, 22 openstackdocstheme, 23 sphinxcontrib-apidoc, 24}: 25 26buildPythonPackage (finalAttrs: { 27 pname = "python-swiftclient"; 28 version = "4.10.0"; 29 pyproject = true; 30 31 build-system = [ 32 pbr 33 setuptools 34 ]; 35 36 env.PBR_VERSION = finalAttrs.version; 37 38 src = fetchFromGitHub { 39 owner = "openstack"; 40 repo = "python-swiftclient"; 41 tag = finalAttrs.version; 42 hash = "sha256-G3o9R3+hDQgvSnmle0paZo/KV56OMU38tIXqUJGmUaQ="; 43 }; 44 45 nativeBuildInputs = [ 46 openstackdocstheme 47 sphinxcontrib-apidoc 48 sphinxHook 49 installShellFiles 50 ]; 51 52 sphinxBuilders = [ "man" ]; 53 54 dependencies = [ 55 python-keystoneclient 56 ]; 57 58 nativeCheckInputs = [ 59 stestrCheckHook 60 openstacksdk 61 hacking 62 keystoneauth1 63 stestr 64 openstacksdk 65 ]; 66 67 nativeInstallCheckInputs = [ versionCheckHook ]; 68 doInstallCheck = true; 69 70 postInstall = '' 71 installShellCompletion --cmd swift --bash tools/swift.bash_completion 72 installManPage doc/manpages/* 73 ''; 74 75 pythonImportsCheck = [ 76 "swiftclient" 77 ]; 78 79 meta = { 80 description = "Client library for OpenStack Swift API"; 81 mainProgram = "swift"; 82 homepage = "https://docs.openstack.org/python-swiftclient/latest/"; 83 downloadPage = "https://github.com/openstack/python-swiftclient/releases/tag/${finalAttrs.src.tag}"; 84 license = lib.licenses.asl20; 85 teams = [ lib.teams.openstack ]; 86 }; 87})