Merge pull request #194375 from sikmir/paho-mqtt

This commit is contained in:
Sandro 2022-10-22 00:57:35 +02:00 committed by GitHub
commit c0adb75f1f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 62 additions and 0 deletions

View File

@ -0,0 +1,33 @@
{ lib, stdenv, fetchFromGitHub, cmake, openssl }:
stdenv.mkDerivation rec {
pname = "paho.mqtt.c";
version = "1.3.11";
src = fetchFromGitHub {
owner = "eclipse";
repo = "paho.mqtt.c";
rev = "v${version}";
hash = "sha256-TGCWA9tOOx0rCb/XQWqLFbXb9gOyGS8u6o9fvSRS6xI=";
};
postPatch = ''
substituteInPlace src/MQTTVersion.c \
--replace "namebuf[60]" "namebuf[120]" \
--replace "lib%s" "$out/lib/lib%s"
'';
nativeBuildInputs = [ cmake ];
buildInputs = [ openssl ];
cmakeFlags = [ "-DPAHO_WITH_SSL=TRUE" ];
meta = with lib; {
description = "Eclipse Paho MQTT C Client Library";
homepage = "https://www.eclipse.org/paho/";
license = licenses.epl20;
maintainers = with maintainers; [ sikmir ];
platforms = platforms.unix;
};
}

View File

@ -0,0 +1,25 @@
{ lib, stdenv, fetchFromGitHub, cmake, openssl, paho-mqtt-c }:
stdenv.mkDerivation rec {
pname = "paho.mqtt.cpp";
version = "1.2.0";
src = fetchFromGitHub {
owner = "eclipse";
repo = "paho.mqtt.cpp";
rev = "v${version}";
hash = "sha256-tcq0a4X5dKE4rnczRMAVe3Wt43YzUKbxsv9Sk+q+IB8=";
};
nativeBuildInputs = [ cmake ];
buildInputs = [ openssl paho-mqtt-c ];
meta = with lib; {
description = "Eclipse Paho MQTT C++ Client Library";
homepage = "https://www.eclipse.org/paho/";
license = licenses.epl10;
maintainers = with maintainers; [ sikmir ];
platforms = platforms.unix;
};
}

View File

@ -10038,6 +10038,10 @@ with pkgs;
pagmo2 = callPackage ../development/libraries/pagmo2 { };
paho-mqtt-c = callPackage ../development/libraries/paho-mqtt-c { };
paho-mqtt-cpp = callPackage ../development/libraries/paho-mqtt-cpp { };
pakcs = callPackage ../development/compilers/pakcs {
# Doesn't compile with GHC 9.0 due to whitespace syntax changes
# see also https://github.com/NixOS/nixpkgs/issues/166108