blob: 15c2de812beaa1399d79136f1b97a488e7e222ad (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
{
lib,
python3Packages,
fetchFromGitHub,
bashate,
}:
python3Packages.buildPythonApplication (finalAttrs: {
pname = "kolla";
version = "21.0.0";
pyproject = true;
src = fetchFromGitHub {
owner = "openstack";
repo = "kolla";
tag = finalAttrs.version;
hash = "sha256-wbVaPIvn4jPcb+h5yKhLDmvT6/widfSX2iV+2KNW8pM=";
};
postPatch = ''
substituteInPlace kolla/image/kolla_worker.py \
--replace-fail "os.path.join(sys.prefix, 'share/kolla')," \
"os.path.join(PROJECT_ROOT, '../../../share/kolla'),"
sed -e 's/git_info = .*/git_info = "${finalAttrs.version}"/' -i kolla/version.py
'';
pythonRelaxDeps = [
"hacking"
];
# fake version to make pbr.packaging happy
env.PBR_VERSION = finalAttrs.version;
build-system = with python3Packages; [
setuptools
pbr
];
dependencies = with python3Packages; [
docker
jinja2
oslo-config
gitpython
podman
];
postInstall = ''
cp kolla/template/repos.yaml $out/${python3Packages.python.sitePackages}/kolla/template/
'';
nativeCheckInputs = with python3Packages; [
testtools
stestr
oslotest
hacking
bashate
];
checkPhase = ''
runHook preCheck
stestr run
runHook postCheck
'';
meta = {
description = "Provides production-ready containers and deployment tools for operating OpenStack clouds";
mainProgram = "kolla-build";
homepage = "https://opendev.org/openstack/kolla";
license = lib.licenses.asl20;
maintainers = [ lib.maintainers.astro ];
teams = [ lib.teams.openstack ];
};
})
|