1 { lib, stdenv, pkg-config, fetchFromGitHub, libbsd }:
3 stdenv.mkDerivation rec {
6 underscoreVersion = lib.replaceStrings ["."] ["_"] version;
8 src = fetchFromGitHub {
11 rev = "VERSION_${underscoreVersion}";
12 sha256 = "0ha6r7bcgf6pcn5gbd2sl7835givhda1jql49c232f1iair1yqyp";
14 patchPhase = ''substituteInPlace configure \
15 --replace /usr/local /
18 nativeBuildInputs = [ pkg-config ];
19 buildInputs = [ ] ++ lib.optionals stdenv.isLinux [ libbsd ] ;
23 installFlags = [ "DESTDIR=$(out)" ];
26 broken = (stdenv.isLinux && stdenv.isAarch64);
27 homepage = "https://kristaps.bsd.lv/kcgi";
28 description = "Minimal CGI and FastCGI library for C/C++";
29 license = licenses.isc;
30 platforms = platforms.all;
31 maintainers = [ maintainers.leenaars ];
32 mainProgram = "kfcgi";