git.iko.soy/typeable/nixpkgs
on master help sign in
uwsgi: add rack support
commit389981f34bee767011e7859cd553ef90533b3c04 authorNikolay Amiantov <ab@fmap.me> dateTue 21 Jun 2016, 02:39 (10 years ago) parent84e83fe
1 file changed+7−2
pkgs/servers/uwsgi/default.nix+7−2
pkgs/servers/uwsgi/default.nix+7−2
@@ -4,6 +4,7 @@
44, pam, withPAM ? false
55, systemd, withSystemd ? false
66, python2, python3, ncurses
7+, ruby
78}:
89
910let 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
2021 available = lib.listToAttrs [
2122 (pythonPlugin python2)
2223 (pythonPlugin python3)
24+ (lib.nameValuePair "rack" {
25+ path = "plugins/rack";
26+ inputs = [ ruby ];
27+ })
2328 ];
2429
2530 getPlugin = name:
@@ -65,12 +70,12 @@ stdenv.mkDerivation rec {
6570 buildPhase = ''
6671 mkdir -p $pluginDir
6772 python3 uwsgiconfig.py --build nixos
68− ${lib.concatMapStringsSep ";" (x: "${x.interpreter} uwsgiconfig.py --plugin ${x.path} nixos ${x.name}") needed}
73+ ${lib.concatMapStringsSep ";" (x: "${x.interpreter or "python3"} uwsgiconfig.py --plugin ${x.path} nixos ${x.name}") needed}
6974 '';
7075
7176 installPhase = ''
7277 install -Dm755 uwsgi $out/bin/uwsgi
73− ${lib.concatMapStringsSep "\n" (x: x.install) needed}
78+ ${lib.concatMapStringsSep "\n" (x: x.install or "") needed}
7479 '';
7580
7681 NIX_CFLAGS_LINK = [ "-lsystemd" ];