1{ stdenv, fetchurl, libgcrypt, curl, gnutls, pkgconfig, libiconv, libintl }:
2
3stdenv.mkDerivation rec {
4 name = "libmicrohttpd-${version}";
5 version = "0.9.62";
6
7 src = fetchurl {
8 url = "mirror://gnu/libmicrohttpd/${name}.tar.gz";
9 sha256 = "0jfvi1fb4im3a3m8qishbmzx3zch993c0mhvl2k92l1zf1yhjgmx";
10 };
11
12 outputs = [ "out" "dev" "devdoc" "info" ];
13 nativeBuildInputs = [ pkgconfig ];
14 buildInputs = [ libgcrypt curl gnutls libiconv libintl ];
15
16 preCheck = ''
17 # Since `localhost' can't be resolved in a chroot, work around it.
18 sed -ie 's/localhost/127.0.0.1/g' src/test*/*.[ch]
19 '';
20
21 # Disabled because the tests can time-out.
22 doCheck = false;
23
24 meta = with stdenv.lib; {
25 description = "Embeddable HTTP server library";
26
27 longDescription = ''
28 GNU libmicrohttpd is a small C library that is supposed to make
29 it easy to run an HTTP server as part of another application.
30 '';
31
32 license = licenses.lgpl2Plus;
33
34 homepage = https://www.gnu.org/software/libmicrohttpd/;
35
36 maintainers = with maintainers; [ eelco vrthra fpletz ];
37 platforms = platforms.unix;
38 };
39}