Unverified Commit 1e97e5fb authored by Doron Behar's avatar Doron Behar Committed by GitHub
Browse files

khard: bring back man page generations with proper upstream fix (#506111)

parents d66607df 9e1ec59a
Loading
Loading
Loading
Loading
+0 −13
Original line number Diff line number Diff line
diff '--color=auto' -u -r khard-0.20.1/doc/source/conf.py new/doc/source/conf.py
--- khard-0.20.1/doc/source/conf.py	2025-07-29 04:47:18.000000000 +0800
+++ new/doc/source/conf.py	2026-03-29 12:53:42.904389827 +0800
@@ -52,8 +52,8 @@
     'sphinx.ext.autodoc',  # https://pypi.org/project/sphinx-autodoc-typehints/
     'sphinx.ext.autosectionlabel',
     'sphinx.ext.todo',
-    'sphinx_autodoc_typehints',  # https://pypi.org/project/sphinx-autodoc-typehints/
     'sphinxarg.ext',
+    'sphinx_autodoc_typehints',  # https://pypi.org/project/sphinx-autodoc-typehints/
 ]
 
 autoapi_type = 'python'
+32 −5
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  python3,
  fetchPypi,
  fetchFromGitHub,
  fetchpatch,
  versionCheckHook,
}:

@@ -10,18 +12,31 @@ python3.pkgs.buildPythonApplication (finalAttrs: {
  version = "0.20.1";
  pyproject = true;

  src = fetchPypi {
    inherit (finalAttrs) pname version;
    hash = "sha256-s+W/rfa11+jxaNDDIMdLlU5NDvQZSyh5EUD+V3pI+Ug=";
  src = fetchFromGitHub {
    owner = "lucc";
    repo = "khard";
    tag = "v${finalAttrs.version}";
    hash = "sha256-5ZKLOwoAzY36htMzMLpdwn1Xo34rGe56+TFuHRfFB9Q=";
  };

  patches = [ ./khard-sphinx.patch ];
  patches = [
    (fetchpatch {
      url = "https://github.com/lucc/khard/commit/4e07412b8870f210409077a925d74ae47152a80c.patch";
      hash = "sha256-tApB1xYLBHV/XQ73ITJjKxCjOz6DNPDsKXn8f7KQZRc=";
    })
  ];

  build-system = with python3.pkgs; [
    setuptools
    setuptools-scm
    sphinxHook
    sphinx-argparse
    sphinx-autoapi
    sphinx-autodoc-typehints
  ];

  sphinxBuilders = [ "man" ];

  dependencies = with python3.pkgs; [
    configobj
    ruamel-yaml
@@ -42,6 +57,18 @@ python3.pkgs.buildPythonApplication (finalAttrs: {

  nativeCheckInputs = [
    versionCheckHook
    python3.pkgs.pytestCheckHook
  ];

  pytestFlagsArray = [
    # Nixpkgs' default is `--capture=fd`, and with it, 2 command mock tests
    # fail, see: https://github.com/lucc/khard/issues/353
    "--capture=no"
  ];

  disabledTestPaths = lib.optionals stdenv.hostPlatform.isDarwin [
    # https://github.com/lucc/khard/issues/354
    "test/test_khard.py::TestSortContacts::test_sorting_of_korean_names"
  ];

  meta = {