uwsgi: add rack support
This commit is contained in:
parent
84e83fe055
commit
389981f34b
@ -4,6 +4,7 @@
|
|||||||
, pam, withPAM ? false
|
, pam, withPAM ? false
|
||||||
, systemd, withSystemd ? false
|
, systemd, withSystemd ? false
|
||||||
, python2, python3, ncurses
|
, python2, python3, ncurses
|
||||||
|
, ruby
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let pythonPlugin = pkg : lib.nameValuePair "python${if pkg ? isPy2 then "2" else "3"}" {
|
let pythonPlugin = pkg : lib.nameValuePair "python${if pkg ? isPy2 then "2" else "3"}" {
|
||||||
@ -20,6 +21,10 @@ let pythonPlugin = pkg : lib.nameValuePair "python${if pkg ? isPy2 then "2" else
|
|||||||
available = lib.listToAttrs [
|
available = lib.listToAttrs [
|
||||||
(pythonPlugin python2)
|
(pythonPlugin python2)
|
||||||
(pythonPlugin python3)
|
(pythonPlugin python3)
|
||||||
|
(lib.nameValuePair "rack" {
|
||||||
|
path = "plugins/rack";
|
||||||
|
inputs = [ ruby ];
|
||||||
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
getPlugin = name:
|
getPlugin = name:
|
||||||
@ -65,12 +70,12 @@ stdenv.mkDerivation rec {
|
|||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
mkdir -p $pluginDir
|
mkdir -p $pluginDir
|
||||||
python3 uwsgiconfig.py --build nixos
|
python3 uwsgiconfig.py --build nixos
|
||||||
${lib.concatMapStringsSep ";" (x: "${x.interpreter} uwsgiconfig.py --plugin ${x.path} nixos ${x.name}") needed}
|
${lib.concatMapStringsSep ";" (x: "${x.interpreter or "python3"} uwsgiconfig.py --plugin ${x.path} nixos ${x.name}") needed}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
install -Dm755 uwsgi $out/bin/uwsgi
|
install -Dm755 uwsgi $out/bin/uwsgi
|
||||||
${lib.concatMapStringsSep "\n" (x: x.install) needed}
|
${lib.concatMapStringsSep "\n" (x: x.install or "") needed}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
NIX_CFLAGS_LINK = [ "-lsystemd" ];
|
NIX_CFLAGS_LINK = [ "-lsystemd" ];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user