mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-24 03:43:53 +03:00
fcgiwrap: new package
Simple server for running CGI applications over FastCGI https://nginx.localdomain.pl/wiki/FcgiWrap
This commit is contained in:
parent
da55068a8d
commit
12f06b3cc3
@ -255,6 +255,7 @@
|
||||
./services/ttys/agetty.nix
|
||||
./services/ttys/kmscon.nix
|
||||
./services/web-servers/apache-httpd/default.nix
|
||||
./services/web-servers/fcgiwrap.nix
|
||||
./services/web-servers/jboss/default.nix
|
||||
./services/web-servers/lighttpd/default.nix
|
||||
./services/web-servers/lighttpd/cgit.nix
|
||||
|
49
nixos/modules/services/web-servers/fcgiwrap.nix
Normal file
49
nixos/modules/services/web-servers/fcgiwrap.nix
Normal file
@ -0,0 +1,49 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.fcgiwrap;
|
||||
|
||||
in {
|
||||
|
||||
options = {
|
||||
services.fcgiwrap = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "Whether to enable fcgiwrap, a server for running CGI applications over FastCGI.";
|
||||
};
|
||||
|
||||
preforkProcesses = mkOption {
|
||||
type = types.int;
|
||||
default = 1;
|
||||
description = "Number of processes to prefork.";
|
||||
};
|
||||
|
||||
bindSocket = mkOption {
|
||||
type = types.string;
|
||||
default = "unix:/run/fcgiwrap.sock";
|
||||
description = ''
|
||||
Socket to bind to. Valid socket URLs are:
|
||||
unix:/path/to/socket for Unix sockets
|
||||
tcp:dot.ted.qu.ad:port for IPv4 sockets
|
||||
tcp6:[ipv6_addr]:port for IPv6 sockets
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
systemd.services.fcgiwrap = {
|
||||
after = [ "nss-user-lookup.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.fcgiwrap}/sbin/fcgiwrap -c ${builtins.toString cfg.preforkProcesses} -s ${cfg.bindSocket}";
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
}
|
21
pkgs/servers/fcgiwrap/default.nix
Normal file
21
pkgs/servers/fcgiwrap/default.nix
Normal file
@ -0,0 +1,21 @@
|
||||
{ stdenv, fetchurl, systemd, fcgi, autoreconfHook, pkgconfig }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "fcgiwrap-${version}";
|
||||
version = "1.1.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://github.com/gnosek/fcgiwrap/archive/${version}.tar.gz";
|
||||
sha256 = "07y6s4mm86cv7p1ljz94sxnqa89y9amn3vzwsnbq5hrl4vdy0zac";
|
||||
};
|
||||
|
||||
configureFlags = [ "--with-systemd" "--with-systemdsystemunitdir=$(out)/etc/systemd/system" ];
|
||||
|
||||
buildInputs = [ autoreconfHook systemd fcgi pkgconfig ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = https://nginx.localdomain.pl/wiki/FcgiWrap;
|
||||
description = "Simple server for running CGI applications over FastCGI";
|
||||
maintainers = with maintainers; [ lethalman ];
|
||||
};
|
||||
}
|
@ -6602,6 +6602,8 @@ let
|
||||
|
||||
elasticmq = callPackage ../servers/elasticmq { };
|
||||
|
||||
fcgiwrap = callPackage ../servers/fcgiwrap { };
|
||||
|
||||
felix = callPackage ../servers/felix { };
|
||||
|
||||
felix_remoteshell = callPackage ../servers/felix/remoteshell.nix { };
|
||||
|
Loading…
Reference in New Issue
Block a user