diff options
author | Maximilian Bosch <maximilian@mbosch.me> | 2019-05-12 11:15:39 +0200 |
---|---|---|
committer | Frederik Rietdijk <freddyrietdijk@fridh.nl> | 2019-05-12 16:54:30 +0200 |
commit | c99a01aa7a82f10535678bf22ff348939a1bbb7a (patch) | |
tree | 00bcf2be7c95eb0ab61fc9fbacba26836aa712fa /pkgs/applications/misc/calcurse | |
parent | 26b044ea2928ecc80866ce091a4885b92b3305cd (diff) |
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.
Diffstat (limited to 'pkgs/applications/misc/calcurse')
-rw-r--r-- | pkgs/applications/misc/calcurse/default.nix | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/pkgs/applications/misc/calcurse/default.nix b/pkgs/applications/misc/calcurse/default.nix index e6dafe4d08af..dc0460c2a233 100644 --- a/pkgs/applications/misc/calcurse/default.nix +++ b/pkgs/applications/misc/calcurse/default.nix @@ -9,17 +9,13 @@ stdenv.mkDerivation rec { sha256 = "0vw2xi6a2lrhrb8n55zq9lv4mzxhby4xdf3hmi1vlfpyrpdwkjzd"; }; - buildInputs = [ ncurses gettext python3 ]; + buildInputs = [ ncurses gettext python3 python3Packages.wrapPython ]; nativeBuildInputs = [ makeWrapper ]; - # Build Python environment with httplib2 for calcurse-caldav - pythonEnv = python3Packages.python.buildEnv.override { - extraLibs = [ python3Packages.httplib2 ]; - }; - propagatedBuildInputs = [ pythonEnv ]; - 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; { |