summaryrefslogtreecommitdiffstats
path: root/pkgs/development/libraries/libmicrohttpd/generic.nix
blob: fd1fa25ee207a29ea7dd7b727349b5815c60c5b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
{
  lib,
  stdenv,
  libgcrypt,
  curl,
  gnutls,
  pkg-config,
  libiconv,
  libintl,
  version,
  src,
  meta ? { },
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "libmicrohttpd";
  inherit version src;

  outputs = [
    "out"
    "dev"
    "devdoc"
    "info"
  ];
  nativeBuildInputs = [ pkg-config ];
  buildInputs = [
    libgcrypt
    curl
    gnutls
    libiconv
    libintl
  ];

  strictDeps = true;

  enableParallelBuilding = true;

  preCheck = ''
    # Since `localhost' can't be resolved in a chroot, work around it.
    sed -i -e 's/localhost/127.0.0.1/g' src/test*/*.[ch]
  '';

  # Disabled because the tests can time-out.
  doCheck = false;

  __structuredAttrs = true;

  meta =

    {
      description = "Embeddable HTTP server library";

      longDescription = ''
        GNU libmicrohttpd is a small C library that is supposed to make
        it easy to run an HTTP server as part of another application.
      '';

      license = lib.licenses.lgpl2Plus;

      homepage = "https://www.gnu.org/software/libmicrohttpd/";

      maintainers = with lib.maintainers; [ fpletz ];
      platforms = lib.platforms.unix;
    }
    // meta;
})