1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-23 11:39:46 +01:00

offlineimap: precompile get_settings.py

Fixes #1802
This commit is contained in:
Markus Scherer 2021-02-28 12:02:53 +01:00 committed by Robert Helgesson
parent f45c7000d5
commit 9068ff292c
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89

View file

@ -158,6 +158,17 @@ in {
home.packages = [ pkgs.offlineimap ]; home.packages = [ pkgs.offlineimap ];
xdg.configFile."offlineimap/get_settings.py".text = cfg.pythonFile; xdg.configFile."offlineimap/get_settings.py".text = cfg.pythonFile;
xdg.configFile."offlineimap/get_settings.pyc".source = "${
pkgs.runCommandLocal "get_settings-compile" {
nativeBuildInputs = [ pkgs.python2 ];
pythonFile = cfg.pythonFile;
passAsFile = [ "pythonFile" ];
} ''
mkdir -p $out/bin
cp $pythonFilePath $out/bin/get_settings.py
python2 -m py_compile $out/bin/get_settings.py
''
}/bin/get_settings.pyc";
xdg.configFile."offlineimap/config".text = '' xdg.configFile."offlineimap/config".text = ''
# Generated by Home Manager. # Generated by Home Manager.