lirc: perform PYTHONPATH substitution with a patch
It is complex enough for a patch, and it is too complex for a `substituteInPlace` command. A sed command can become a no-op and is much harder to maintain.
This commit is contained in:
@@ -51,15 +51,14 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
# --with-systemdsystemunitdir
|
||||
# https://sourceforge.net/p/lirc/tickets/385/
|
||||
./ubuntu.diff
|
||||
|
||||
# fix overriding PYTHONPATH
|
||||
./pythonpath.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs .
|
||||
|
||||
# fix overriding PYTHONPATH
|
||||
sed -i 's,^PYTHONPATH *= *,PYTHONPATH := $(PYTHONPATH):,' \
|
||||
Makefile.in
|
||||
|
||||
# Pull fix for new pyyaml pending upstream inclusion
|
||||
# https://sourceforge.net/p/lirc/git/merge-requests/39/
|
||||
substituteInPlace python-pkg/lirc/database.py \
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
diff --git i/Makefile.in w/Makefile.in
|
||||
index d039ed3e9d6a..c40e6eac56ae 100644
|
||||
--- i/Makefile.in
|
||||
+++ w/Makefile.in
|
||||
@@ -493,7 +493,7 @@ AUTOMAKE_OPTIONS = 1.5 check-news dist-bzip2 -Wno-portability \
|
||||
|
||||
PYTHONPATH1 = $(abs_top_srcdir)/python-pkg/lirc:
|
||||
PYTHONPATH2 = $(abs_top_srcdir)/python-pkg/lirc/lib/.libs
|
||||
-PYTHONPATH = $(PYTHONPATH1):$(PYTHONPATH2)
|
||||
+PYTHONPATH := $(PYTHONPATH):$(PYTHONPATH1):$(PYTHONPATH2)
|
||||
PYLINT = python3-pylint
|
||||
pylint_template = {path}:{line}: [{msg_id}({symbol}), {obj}] {msg}
|
||||
GIT_COMMIT = $(shell git log -1 --pretty=format:%h || echo UNKNOWN)
|
||||
Reference in New Issue
Block a user