diff options
author | Rok Garbas <rok@garbas.si> | 2013-10-04 00:24:18 +0200 |
---|---|---|
committer | Rok Garbas <rok@garbas.si> | 2013-10-04 00:24:18 +0200 |
commit | 7b6e26b380a3f1711c3867d2bcb64640db5bfcfc (patch) | |
tree | 39458fe52e57529143c175d36f57acd95c723e93 | |
parent | 4ff36cb1377369f96233a1404236fb9db184c913 (diff) | |
download | nixlib-7b6e26b380a3f1711c3867d2bcb64640db5bfcfc.tar nixlib-7b6e26b380a3f1711c3867d2bcb64640db5bfcfc.tar.gz nixlib-7b6e26b380a3f1711c3867d2bcb64640db5bfcfc.tar.bz2 nixlib-7b6e26b380a3f1711c3867d2bcb64640db5bfcfc.tar.lz nixlib-7b6e26b380a3f1711c3867d2bcb64640db5bfcfc.tar.xz nixlib-7b6e26b380a3f1711c3867d2bcb64640db5bfcfc.tar.zst nixlib-7b6e26b380a3f1711c3867d2bcb64640db5bfcfc.zip |
some more zope2 service improvements
-rw-r--r-- | modules/services/web-servers/zope2.nix | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/modules/services/web-servers/zope2.nix b/modules/services/web-servers/zope2.nix index 5d7b369b2ad0..19afa55d7fef 100644 --- a/modules/services/web-servers/zope2.nix +++ b/modules/services/web-servers/zope2.nix @@ -136,21 +136,17 @@ if _interactive: ''; env = pkgs.buildEnv { name = "zope2-${name}-env"; - paths = [ pyenv pkgs.gnumake ]; - postBuild = - '' - echo "#!$out/bin/python" > $out/bin/interpreter - cat ${interpreter} >> $out/bin/interpreter - ''; - }; - pyenv = pkgs.buildEnv { - name = "zope2-${name}-pyenv"; paths = [ pkgs.python27 pkgs.python27Packages.recursivePthLoader pkgs.python27Packages."plone.recipe.zope2instance" ] ++ attrValues pkgs.python27.modules ++ opts.packages; + postBuild = + '' + echo "#!$out/bin/python" > $out/bin/interpreter + cat ${interpreter} >> $out/bin/interpreter + ''; }; conf = pkgs.writeText "zope2-${name}-conf" ''%define INSTANCEHOME ${env} @@ -204,7 +200,7 @@ container-class Products.TemporaryFolder.TemporaryContainer ${opts.extra} ''; - ctl = pkgs.writeScript "zope2-${name}-ctl" + ctlScript = pkgs.writeScript "zope2-${name}-ctl-script" ''#!${env}/bin/python import sys @@ -213,7 +209,14 @@ import plone.recipe.zope2instance.ctl if __name__ == '__main__': sys.exit(plone.recipe.zope2instance.ctl.main( ["-C", "${conf}"] - + sys.argv[1:]))''; + + sys.argv[1:])) + ''; + + ctl = pkgs.writeScript "zope2-${name}-ctl" + ''#!${pkgs.bash}/bin/bash -e +export PYTHONHOME=${env} +exec ${ctlScript} "$@" + ''; in { description = "zope2 ${name} instance"; after = [ "network.target" ]; # with RelStorage also add "postgresql.service" |