1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 dulwich,
6 pbr,
7 sphinx,
8 pythonAtLeast,
9}:
10
11buildPythonPackage rec {
12 pname = "openstackdocstheme";
13 version = "3.2.0";
14 format = "setuptools";
15
16 # breaks on import due to distutils import through pbr.packaging
17 disabled = pythonAtLeast "3.12";
18
19 src = fetchPypi {
20 inherit pname version;
21 hash = "sha256-PwSWLJr5Hjwz8cRXXutnE4Jc+vLcL3TJTZl6biK/4E4=";
22 };
23
24 postPatch = ''
25 # only a small portion of the listed packages are actually needed for running the tests
26 # so instead of removing them one by one remove everything
27 rm test-requirements.txt
28 '';
29
30 propagatedBuildInputs = [
31 dulwich
32 pbr
33 sphinx
34 ];
35
36 # no tests
37 doCheck = false;
38
39 pythonImportsCheck = [ "openstackdocstheme" ];
40
41 meta = with lib; {
42 description = "Sphinx theme for RST-sourced documentation published to docs.openstack.org";
43 homepage = "https://github.com/openstack/openstackdocstheme";
44 license = licenses.asl20;
45 maintainers = teams.openstack.members;
46 };
47}