2018-05-08 11:35:28 +02:00
|
|
|
{ stdenv, pkgconfig, fetchFromGitHub, libbsd }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "kcgi";
|
2018-07-09 16:06:00 +02:00
|
|
|
version = "0.10.7";
|
2018-05-08 11:35:28 +02:00
|
|
|
underscoreVersion = stdenv.lib.replaceChars ["."] ["_"] version;
|
|
|
|
name = "${pname}-${version}";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "kristapsdz";
|
|
|
|
repo = pname;
|
|
|
|
rev = "VERSION_${underscoreVersion}";
|
2018-07-09 16:06:00 +02:00
|
|
|
sha256 = "1z8gfj1v69hhkiyybr41qw7yv3cdxahgk45nipxfb9nmn18p0k8n";
|
2018-05-08 11:35:28 +02:00
|
|
|
};
|
|
|
|
patchPhase = ''substituteInPlace configure \
|
|
|
|
--replace /usr/local /
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
|
|
buildInputs = [ ] ++ stdenv.lib.optionals stdenv.isLinux [ libbsd ] ;
|
|
|
|
|
|
|
|
dontAddPrefix = true;
|
|
|
|
|
|
|
|
installFlags = [ "DESTDIR=$(out)" ];
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = https://kristaps.bsd.lv/kcgi;
|
|
|
|
description = "Minimal CGI and FastCGI library for C/C++";
|
|
|
|
license = licenses.isc;
|
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = [ maintainers.leenaars ];
|
|
|
|
};
|
|
|
|
}
|