2021-01-19 06:50:56 +00:00
|
|
|
{ lib, stdenv, pkg-config, fetchFromGitHub, libbsd }:
|
2018-05-08 10:35:28 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "kcgi";
|
2018-12-25 19:45:24 +00:00
|
|
|
version = "0.10.8";
|
2021-01-23 17:15:07 +00:00
|
|
|
underscoreVersion = lib.replaceChars ["."] ["_"] version;
|
2018-05-08 10:35:28 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "kristapsdz";
|
|
|
|
repo = pname;
|
|
|
|
rev = "VERSION_${underscoreVersion}";
|
2018-12-25 19:45:24 +00:00
|
|
|
sha256 = "0ha6r7bcgf6pcn5gbd2sl7835givhda1jql49c232f1iair1yqyp";
|
2018-05-08 10:35:28 +01:00
|
|
|
};
|
|
|
|
patchPhase = ''substituteInPlace configure \
|
|
|
|
--replace /usr/local /
|
|
|
|
'';
|
2021-01-19 21:20:11 +00:00
|
|
|
|
2021-01-19 06:50:56 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2021-01-23 17:15:07 +00:00
|
|
|
buildInputs = [ ] ++ lib.optionals stdenv.isLinux [ libbsd ] ;
|
2018-05-08 10:35:28 +01:00
|
|
|
|
|
|
|
dontAddPrefix = true;
|
|
|
|
|
|
|
|
installFlags = [ "DESTDIR=$(out)" ];
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://kristaps.bsd.lv/kcgi";
|
2018-05-08 10:35:28 +01:00
|
|
|
description = "Minimal CGI and FastCGI library for C/C++";
|
|
|
|
license = licenses.isc;
|
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = [ maintainers.leenaars ];
|
|
|
|
};
|
|
|
|
}
|