From bad52402a5387df45dc98968d95a6506bbc09c5d Mon Sep 17 00:00:00 2001 From: Dmitry Bogatov Date: Wed, 11 May 2022 19:00:52 -0400 Subject: [PATCH] python3.pkgs.sphinx-better-theme: init at 0.1.5 (#171595) * python3.pkgs.sphinx-better-theme: init at 0.1.5 * Update pkgs/development/python-modules/sphinx-better-theme/default.nix Co-authored-by: Sandro * Update pkgs/development/python-modules/sphinx-better-theme/default.nix Co-authored-by: Sandro Co-authored-by: Dmitry Bogatov Co-authored-by: Sandro --- .../sphinx-better-theme/default.nix | 45 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 47 insertions(+) create mode 100644 pkgs/development/python-modules/sphinx-better-theme/default.nix diff --git a/pkgs/development/python-modules/sphinx-better-theme/default.nix b/pkgs/development/python-modules/sphinx-better-theme/default.nix new file mode 100644 index 00000000000..8227eca47d8 --- /dev/null +++ b/pkgs/development/python-modules/sphinx-better-theme/default.nix @@ -0,0 +1,45 @@ +{ lib, buildPythonPackage, fetchFromGitHub, sphinxHook }: + +buildPythonPackage rec { + pname = "sphinx-better-theme"; + version = "0.1.5"; + outputs = [ "out" "doc" ]; + + src = fetchFromGitHub { + owner = "irskep"; + repo = "sphinx-better-theme"; + rev = "v${version}"; + sha256 = "07lhfmsjcfzcchsjzh6kxdq5s47j2a6lb5wv3m1kmv2hcm3gvddh"; + }; + + nativeBuildInputs = [ sphinxHook ]; + + pythonImportsCheck = [ "better" ]; + + meta = with lib; { + homepage = "https://github.com/irskep/sphinx-better-theme"; + description = "Better Sphinx Theme"; + longDescription = '' + This is a modified version of the default Sphinx theme with the following + goals: + + 1. Remove frivolous colors, especially hard-coded ones + 2. Improve readability by limiting width and using more whitespace + 3. Encourage visual customization through CSS, not themeconf + 4. Use semantic markup + + v0.1 meets goals one and two. Goal three is partially complete; it's simple to + add your own CSS file without creating a whole new theme. + you'd like something changed. + + To use the theme, set ``html_theme_path`` to contain + ``better.better_theme_path``, and set ``html_theme`` to ``'better'``:: + + from better import better_theme_path + html_theme_path = [better_theme_path] + html_theme = 'better' + ''; + license = licenses.bsd2; + maintainers = with maintainers; [ kaction ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 807ad190323..44f7328c6f9 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9721,6 +9721,8 @@ in { spinners = callPackage ../development/python-modules/spinners { }; + sphinx-better-theme = callPackage ../development/python-modules/sphinx-better-theme { }; + sphinxcontrib-actdiag = callPackage ../development/python-modules/sphinxcontrib-actdiag { }; sphinxcontrib-apidoc = callPackage ../development/python-modules/sphinxcontrib-apidoc { };