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";
15 substituteInPlace configure \
16 --replace /usr/local /
19 nativeBuildInputs = [ pkg-config ];
20 buildInputs = [ ] ++ lib.optionals stdenv.hostPlatform.isLinux [ libbsd ] ;
24 installFlags = [ "DESTDIR=$(out)" ];
27 broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64);
28 homepage = "https://kristaps.bsd.lv/kcgi";
29 description = "Minimal CGI and FastCGI library for C/C++";
30 license = licenses.isc;
31 platforms = platforms.all;
32 maintainers = [ maintainers.leenaars ];
33 mainProgram = "kfcgi";