calcurse: fix python3 wrapper
The current Python wrapper for `httplib2` breaks when running e.g. `./result/bin/calcurse-caldav` with the following error: ``` Traceback (most recent call last): File "./result/bin/calcurse-caldav", line 6, in <module> import httplib2 ModuleNotFoundError: No module named 'httplib2' ``` The easiest workaround is to use the `wrapPython` tool to properly patch library path inside the script.
This commit is contained in:
parent
26b044ea29
commit
c99a01aa7a
@ -9,17 +9,13 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "0vw2xi6a2lrhrb8n55zq9lv4mzxhby4xdf3hmi1vlfpyrpdwkjzd";
|
sha256 = "0vw2xi6a2lrhrb8n55zq9lv4mzxhby4xdf3hmi1vlfpyrpdwkjzd";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ ncurses gettext python3 ];
|
buildInputs = [ ncurses gettext python3 python3Packages.wrapPython ];
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
|
||||||
# Build Python environment with httplib2 for calcurse-caldav
|
|
||||||
pythonEnv = python3Packages.python.buildEnv.override {
|
|
||||||
extraLibs = [ python3Packages.httplib2 ];
|
|
||||||
};
|
|
||||||
propagatedBuildInputs = [ pythonEnv ];
|
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
substituteInPlace $out/bin/calcurse-caldav --replace /usr/bin/python3 ${pythonEnv}/bin/python3
|
patchShebangs .
|
||||||
|
buildPythonPath ${python3Packages.httplib2}
|
||||||
|
patchPythonScript $out/bin/calcurse-caldav
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user