diff options
author | Vaskó László <vlaci@balabit.hu> | 2018-10-20 20:40:20 +0200 |
---|---|---|
committer | Vaskó László <vlaci@balabit.hu> | 2018-10-20 20:42:23 +0200 |
commit | 2fdfa2115df58895ad32641df01b31b5815b075f (patch) | |
tree | 2ce4b634de65c0a3a5ceae763705a0f8486c9551 /pkgs/applications/misc/kitty | |
parent | 1842c4aaa409e4731d355aa1f77ed817dd3939a2 (diff) | |
download | nixpkgs-2fdfa2115df58895ad32641df01b31b5815b075f.tar nixpkgs-2fdfa2115df58895ad32641df01b31b5815b075f.tar.gz nixpkgs-2fdfa2115df58895ad32641df01b31b5815b075f.tar.bz2 nixpkgs-2fdfa2115df58895ad32641df01b31b5815b075f.tar.lz nixpkgs-2fdfa2115df58895ad32641df01b31b5815b075f.tar.xz nixpkgs-2fdfa2115df58895ad32641df01b31b5815b075f.tar.zst nixpkgs-2fdfa2115df58895ad32641df01b31b5815b075f.zip |
kitty: fixing environment variable substituition in docs/Makefile
The previous substitutution only worked by accident as make requires environment variables to be enclosed in curly brackets as shown in this excerpt from the build output: > PYTHONPATH=YTHONPATH:.. HOME=MPDIR/nowhere sphinx-build -M html "." "_build" -T The substituition is moved to the existing patch file to simplify the builder expression.
Diffstat (limited to 'pkgs/applications/misc/kitty')
-rw-r--r-- | pkgs/applications/misc/kitty/default.nix | 6 | ||||
-rw-r--r-- | pkgs/applications/misc/kitty/fix-paths.patch | 16 |
2 files changed, 16 insertions, 6 deletions
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 |