aboutsummaryrefslogtreecommitdiff
path: root/pkgs/servers/uwsgi
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2016-10-22 14:08:30 +0200
committerRobin Gloster <mail@glob.in>2017-01-19 22:47:10 +0100
commit3f3b6e6b6cbee2fb0512657d9757f7d4d33bd339 (patch)
tree2c0a3f9154efc934ea9b6662fd3ccafa218b47ac /pkgs/servers/uwsgi
parenta7f25fe16793ba50cb015034513ee6b40e0eb016 (diff)
uwsgi: enable php plugin
Diffstat (limited to 'pkgs/servers/uwsgi')
-rw-r--r--pkgs/servers/uwsgi/default.nix13
1 files changed, 10 insertions, 3 deletions
diff --git a/pkgs/servers/uwsgi/default.nix b/pkgs/servers/uwsgi/default.nix
index 4994894a0388..6d29c7456974 100644
--- a/pkgs/servers/uwsgi/default.nix
+++ b/pkgs/servers/uwsgi/default.nix
@@ -4,7 +4,7 @@
, pam, withPAM ? false
, systemd, withSystemd ? false
, python2, python3, ncurses
-, ruby
+, ruby, php-embed
}:
let pythonPlugin = pkg : lib.nameValuePair "python${if pkg ? isPy2 then "2" else "3"}" {
@@ -26,9 +26,16 @@ let pythonPlugin = pkg : lib.nameValuePair "python${if pkg ? isPy2 then "2" else
inputs = [ ruby ];
})
(lib.nameValuePair "cgi" {
+ # usage: https://uwsgi-docs.readthedocs.io/en/latest/CGI.html?highlight=cgi
path = "plugins/cgi";
inputs = [ ];
})
+ (lib.nameValuePair "php" {
+ # usage: https://uwsgi-docs.readthedocs.io/en/latest/PHP.html#running-php-apps-with-nginx
+ path = "plugins/php";
+ preBuild = "touch unix.h";
+ inputs = [ php-embed php-embed.nativeBuildInputs ];
+ })
];
getPlugin = name:
@@ -74,7 +81,7 @@ stdenv.mkDerivation rec {
buildPhase = ''
mkdir -p $pluginDir
python3 uwsgiconfig.py --build nixos
- ${lib.concatMapStringsSep ";" (x: "${x.interpreter or "python3"} uwsgiconfig.py --plugin ${x.path} nixos ${x.name}") needed}
+ ${lib.concatMapStringsSep ";" (x: "${x.preBuild or ""}\n ${x.interpreter or "python3"} uwsgiconfig.py --plugin ${x.path} nixos ${x.name}") needed}
'';
installPhase = ''
@@ -88,7 +95,7 @@ stdenv.mkDerivation rec {
homepage = "http://uwsgi-docs.readthedocs.org/en/latest/";
description = "A fast, self-healing and developer/sysadmin-friendly application container server coded in pure C";
license = licenses.gpl2;
- maintainers = with maintainers; [ abbradar ];
+ maintainers = with maintainers; [ abbradar schneefux ];
platforms = platforms.linux;
};
}