summary refs log tree commit diff
diff options
context:
space:
mode:
authormakefu <makefu@syntax-fehler.de>2016-02-28 01:35:56 +0100
committermakefu <makefu@syntax-fehler.de>2016-02-28 01:35:56 +0100
commit3f7c6006664bb203d8dffe74ccb97c5ab35b749c (patch)
tree43d09b5aac97d80e38ceabe8b45c79e86c124bf3
parentde124cfa79476ec993239e5fb3fce567efcb61b8 (diff)
downloadnixpkgs-3f7c6006664bb203d8dffe74ccb97c5ab35b749c.tar
nixpkgs-3f7c6006664bb203d8dffe74ccb97c5ab35b749c.tar.gz
nixpkgs-3f7c6006664bb203d8dffe74ccb97c5ab35b749c.tar.bz2
nixpkgs-3f7c6006664bb203d8dffe74ccb97c5ab35b749c.tar.lz
nixpkgs-3f7c6006664bb203d8dffe74ccb97c5ab35b749c.tar.xz
nixpkgs-3f7c6006664bb203d8dffe74ccb97c5ab35b749c.tar.zst
nixpkgs-3f7c6006664bb203d8dffe74ccb97c5ab35b749c.zip
services.bepasty: buildEnv for creating PYTHONPATH
Fixes 'You need gevent installed to use this worker.' as well as missing Flask deps.
-rw-r--r--nixos/modules/services/misc/bepasty.nix8
1 files changed, 6 insertions, 2 deletions
diff --git a/nixos/modules/services/misc/bepasty.nix b/nixos/modules/services/misc/bepasty.nix
index 12671cb1b6c..5bda73ab64f 100644
--- a/nixos/modules/services/misc/bepasty.nix
+++ b/nixos/modules/services/misc/bepasty.nix
@@ -103,9 +103,13 @@ in
           after = [ "network.target" ];
           restartIfChanged = true;
 
-          environment = {
+          environment = let
+            penv = python.buildEnv.override {
+              extraLibs = [ bepasty gevent ];
+            };
+          in {
             BEPASTY_CONFIG = "${server.workDir}/bepasty-${name}.conf";
-            PYTHONPATH= "${bepasty}/lib/${python.libPrefix}/site-packages:${gevent}/lib/${python.libPrefix}/site-packages";
+            PYTHONPATH= "${penv}/${python.sitePackages}/";
           };
 
           serviceConfig = {