github-backup: 0.48.0 -> 0.49.0 (#379003)
[NixPkgs.git] / pkgs / by-name / kc / kcgi / package.nix
blob246cc597407f32a00515006b5a111fab5da622b4
2   lib,
3   stdenv,
4   pkg-config,
5   fetchFromGitHub,
6   libbsd,
7 }:
9 stdenv.mkDerivation rec {
10   pname = "kcgi";
11   version = "0.10.8";
12   underscoreVersion = lib.replaceStrings [ "." ] [ "_" ] version;
14   src = fetchFromGitHub {
15     owner = "kristapsdz";
16     repo = pname;
17     rev = "VERSION_${underscoreVersion}";
18     sha256 = "0ha6r7bcgf6pcn5gbd2sl7835givhda1jql49c232f1iair1yqyp";
19   };
20   patchPhase = ''
21     substituteInPlace configure \
22       --replace /usr/local /
23   '';
25   nativeBuildInputs = [ pkg-config ];
26   buildInputs = [ ] ++ lib.optionals stdenv.hostPlatform.isLinux [ libbsd ];
28   dontAddPrefix = true;
30   installFlags = [ "DESTDIR=$(out)" ];
32   meta = with lib; {
33     broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64);
34     homepage = "https://kristaps.bsd.lv/kcgi";
35     description = "Minimal CGI and FastCGI library for C/C++";
36     license = licenses.isc;
37     platforms = platforms.all;
38     maintainers = [ maintainers.leenaars ];
39     mainProgram = "kfcgi";
40   };