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.
This commit is contained in:
parent
1842c4aaa4
commit
2fdfa2115d
@ -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
|
||||
'';
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user