1 { lib, stdenv, libgcrypt, curl, gnutls, pkg-config, libiconv, libintl, version, src, meta ? {}, fetchpatch }:
7 stdenv.mkDerivation rec {
8 pname = "libmicrohttpd";
11 patches = lib.optionals (lib.versionOlder version "0.9.76") [
13 name = "CVE-2023-27371.patch";
14 url = "https://git.gnunet.org/libmicrohttpd.git/patch/?id=e0754d1638c602382384f1eface30854b1defeec";
15 hash = "sha256-vzrq9HPysGpc13rFEk6zLPgpUqp/ST4q/Wp30Dam97k=";
22 outputs = [ "out" "dev" "devdoc" "info" ];
23 nativeBuildInputs = [ pkg-config ];
24 buildInputs = [ libgcrypt curl gnutls libiconv libintl ];
27 # Since `localhost' can't be resolved in a chroot, work around it.
28 sed -ie 's/localhost/127.0.0.1/g' src/test*/*.[ch]
31 # Disabled because the tests can time-out.
35 description = "Embeddable HTTP server library";
38 GNU libmicrohttpd is a small C library that is supposed to make
39 it easy to run an HTTP server as part of another application.
42 license = licenses.lgpl2Plus;
44 homepage = "https://www.gnu.org/software/libmicrohttpd/";
46 maintainers = with maintainers; [ eelco vrthra fpletz ];
47 platforms = platforms.unix;