about summary refs log tree commit diff
path: root/pkgs/by-name/li/libhttpserver/package.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/by-name/li/libhttpserver/package.nix')
-rw-r--r--pkgs/by-name/li/libhttpserver/package.nix46
1 files changed, 46 insertions, 0 deletions
diff --git a/pkgs/by-name/li/libhttpserver/package.nix b/pkgs/by-name/li/libhttpserver/package.nix
new file mode 100644
index 0000000000000..d8e6ce8c3ab5a
--- /dev/null
+++ b/pkgs/by-name/li/libhttpserver/package.nix
@@ -0,0 +1,46 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, autoconf
+, automake
+, libtool
+, gnutls
+, libmicrohttpd
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libhttpserver";
+  version = "0.19.0";
+
+  src = fetchFromGitHub {
+    owner = "etr";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-Pc3Fvd8D4Ymp7dG9YgU58mDceOqNfhWE1JtnpVaNx/Y=";
+  };
+
+  nativeBuildInputs = [ autoconf automake libtool ];
+
+  buildInputs = [ gnutls libmicrohttpd ];
+
+  enableParallelBuilding = true;
+
+  postPatch = ''
+    patchShebangs ./bootstrap
+  '';
+
+  preConfigure = ''
+    ./bootstrap
+  '';
+
+  configureFlags = [ "--enable-same-directory-build" ];
+
+  meta = with lib; {
+    description = "C++ library for creating an embedded Rest HTTP server (and more)";
+    homepage = "https://github.com/etr/libhttpserver";
+    license = licenses.lgpl21Plus;
+    maintainers = with maintainers; [ pongo1231 ];
+    platforms = platforms.unix;
+    broken = stdenv.isDarwin; # configure: error: cannot find required auxiliary files: ltmain.sh
+  };
+}