1{
2 stdenv,
3 lib,
4 fetchFromGitHub,
5 autoconf,
6 automake,
7 libtool,
8 gnutls,
9 libmicrohttpd,
10}:
11
12stdenv.mkDerivation rec {
13 pname = "libhttpserver";
14 version = "0.19.0";
15
16 src = fetchFromGitHub {
17 owner = "etr";
18 repo = "libhttpserver";
19 rev = version;
20 hash = "sha256-Pc3Fvd8D4Ymp7dG9YgU58mDceOqNfhWE1JtnpVaNx/Y=";
21 };
22
23 nativeBuildInputs = [
24 autoconf
25 automake
26 libtool
27 ];
28
29 buildInputs = [
30 gnutls
31 libmicrohttpd
32 ];
33
34 enableParallelBuilding = true;
35
36 postPatch = ''
37 patchShebangs ./bootstrap
38 '';
39
40 preConfigure = ''
41 ./bootstrap
42 '';
43
44 configureFlags = [ "--enable-same-directory-build" ];
45
46 meta = with lib; {
47 description = "C++ library for creating an embedded Rest HTTP server (and more)";
48 homepage = "https://github.com/etr/libhttpserver";
49 license = licenses.lgpl21Plus;
50 maintainers = with maintainers; [ pongo1231 ];
51 platforms = platforms.unix;
52 broken = stdenv.hostPlatform.isDarwin; # configure: error: cannot find required auxiliary files: ltmain.sh
53 };
54}