nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 20.03 32 lines 873 B view raw
1{ stdenv, pkgconfig, fetchFromGitHub, libbsd }: 2 3stdenv.mkDerivation rec { 4 pname = "kcgi"; 5 version = "0.10.8"; 6 underscoreVersion = stdenv.lib.replaceChars ["."] ["_"] version; 7 8 src = fetchFromGitHub { 9 owner = "kristapsdz"; 10 repo = pname; 11 rev = "VERSION_${underscoreVersion}"; 12 sha256 = "0ha6r7bcgf6pcn5gbd2sl7835givhda1jql49c232f1iair1yqyp"; 13 }; 14 patchPhase = ''substituteInPlace configure \ 15 --replace /usr/local / 16 ''; 17 18 nativeBuildInputs = [ pkgconfig ]; 19 buildInputs = [ ] ++ stdenv.lib.optionals stdenv.isLinux [ libbsd ] ; 20 21 dontAddPrefix = true; 22 23 installFlags = [ "DESTDIR=$(out)" ]; 24 25 meta = with stdenv.lib; { 26 homepage = https://kristaps.bsd.lv/kcgi; 27 description = "Minimal CGI and FastCGI library for C/C++"; 28 license = licenses.isc; 29 platforms = platforms.all; 30 maintainers = [ maintainers.leenaars ]; 31 }; 32}