1{ lib, stdenv, fetchurl, libgcrypt }:
2
3stdenv.mkDerivation rec {
4 name = "libmicrohttpd-0.9.38";
5
6 src = fetchurl {
7 url = "mirror://gnu/libmicrohttpd/${name}.tar.gz";
8 sha256 = "08g7p4l0p2fsjj8ayl68zq1bqgrn0pck19bm8yd7k61whvfv9wld";
9 };
10
11 buildInputs = [ libgcrypt ];
12
13 preCheck =
14 # Since `localhost' can't be resolved in a chroot, work around it.
15 '' for i in "src/test"*"/"*.[ch]
16 do
17 sed -i "$i" -es/localhost/127.0.0.1/g
18 done
19 '';
20
21 # Disabled because the tests can time-out.
22 doCheck = false;
23
24 meta = {
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 = lib.licenses.lgpl2Plus;
33
34 homepage = http://www.gnu.org/software/libmicrohttpd/;
35
36 maintainers = [ lib.maintainers.eelco ];
37 };
38}