about summary refs log tree commit diff
path: root/nixpkgs/pkgs/servers/fcgiwrap/default.nix
blob: 0df4bc5a3833e32f4579eda5f65e567d624bc140 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{ lib, stdenv, fetchFromGitHub, systemd, fcgi, autoreconfHook, pkg-config }:

stdenv.mkDerivation rec {
  pname = "fcgiwrap";
  version = "1.1.0";

  src = fetchFromGitHub {
    owner = "gnosek";
    repo = "fcgiwrap";
    rev = version;
    hash = "sha256-znAsZk+aB2XO2NK8Mjc+DLwykYKHolnVQPErlaAx3Oc=";
  };

  env.NIX_CFLAGS_COMPILE = "-Wno-error=implicit-fallthrough";
  configureFlags = [ "--with-systemd" "--with-systemdsystemunitdir=$(out)/etc/systemd/system" ];

  nativeBuildInputs = [ autoreconfHook pkg-config ];
  buildInputs = [ systemd fcgi ];

  # systemd 230 no longer has libsystemd-daemon as a separate entity from libsystemd
  postPatch = ''
    substituteInPlace configure.ac --replace libsystemd-daemon libsystemd
  '';

  meta = with lib; {
    homepage = "https://github.com/gnosek/fcgiwrap";
    description = "Simple server for running CGI applications over FastCGI";
    maintainers = with maintainers; [ ];
    platforms = with platforms; linux;
    license = licenses.mit;
    mainProgram = "fcgiwrap";
  };
}