commit 423e922b25201948cf8341159a48fa5e1989e785
parent 1063644c92967f94e79e09ac7132986cbf4f53db
Author: Nikolay Korotkiy <sikmir@disroot.org>
Date: Thu, 24 Nov 2022 23:25:43 +0300
Add mongoose
Diffstat:
2 files changed, 31 insertions(+), 0 deletions(-)
diff --git a/pkgs/default.nix b/pkgs/default.nix
@@ -347,6 +347,7 @@ lib.makeScope newScope (
influxdb-cxx = callPackage ./mqtt/influxdb-cxx { };
janus-mqtt-proxy = callPackage ./mqtt/janus-mqtt-proxy { };
+ mongoose = callPackage ./mqtt/mongoose { };
mqtt-benchmark = callPackage ./mqtt/mqtt-benchmark { };
mqtt-to-influxdb = callPackage ./mqtt/mqtt-to-influxdb { };
mqtt-to-influxdb-forwarder = callPackage ./mqtt/mqtt-to-influxdb-forwarder { };
diff --git a/pkgs/mqtt/mongoose/default.nix b/pkgs/mqtt/mongoose/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchFromGitHub, mbedtls }:
+
+stdenv.mkDerivation (finalAttrs: {
+ pname = "mongoose";
+ version = "7.8";
+
+ src = fetchFromGitHub {
+ owner = "cesanta";
+ repo = "mongoose";
+ rev = finalAttrs.version;
+ hash = "sha256-UiFrnbnLi4F/ogrUyS3AaLLpmsZbypLP4g7jLkIWvBM=";
+ };
+
+ buildInputs = [ mbedtls ];
+
+ buildFlags = [ "linux-libs" ];
+
+ installFlags = [ "PREFIX=$(out)" ];
+
+ preInstall = "mkdir -p $out/lib";
+
+ meta = with lib; {
+ description = "Embedded Web Server";
+ homepage = "https://mongoose.ws/";
+ license = licenses.gpl2;
+ maintainers = [ maintainers.sikmir ];
+ platforms = platforms.linux;
+ skip.ci = stdenv.isDarwin;
+ };
+})