diff --git a/pkgs/applications/misc/kitty/default.nix b/pkgs/applications/misc/kitty/default.nix index 2bdcd78b6e1..8cff766371e 100644 --- a/pkgs/applications/misc/kitty/default.nix +++ b/pkgs/applications/misc/kitty/default.nix @@ -35,12 +35,6 @@ buildPythonApplication rec { }) ]; - postPatch = '' - substituteInPlace docs/Makefile \ - --replace 'python3 .. +launch :sphinx-build' \ - 'PYTHONPATH=$PYTHONPATH:.. HOME=$TMPDIR/nowhere sphinx-build' - ''; - buildPhase = '' python3 setup.py linux-package ''; diff --git a/pkgs/applications/misc/kitty/fix-paths.patch b/pkgs/applications/misc/kitty/fix-paths.patch index dad6c949839..e22f4570a4b 100644 --- a/pkgs/applications/misc/kitty/fix-paths.patch +++ b/pkgs/applications/misc/kitty/fix-paths.patch @@ -9,3 +9,19 @@ if (!done) { done = true; +--- a/docs/Makefile ++++ b/docs/Makefile +@@ -3,7 +3,7 @@ +# Patching is needed here for the following reasons: +# * `sphinx-build` in nixpkgs is not a Python file but a wrapper shell script +# * importing the `constants` package from Kitty has a side effect that it +# creates the user configuration directory. This package gets imported +# while sphinx scans the code for documentation strings. +# + # You can set these variables from the command line. + SPHINXOPTS = -T $(FAIL_WARN) +-SPHINXBUILD = python3 .. +launch :sphinx-build ++SPHINXBUILD = PYTHONPATH=${PYTHONPATH}:.. HOME=${TMPDIR}/kitty-build-home sphinx-build + SPHINXPROJ = kitty + SOURCEDIR = . + BUILDDIR = _build