paho-mqtt-c: init at 1.3.11

This commit is contained in:
Nikolay Korotkiy 2022-10-04 11:36:50 +03:00
parent 6e72712a01
commit 042138b346
No known key found for this signature in database
GPG key ID: D1DE6D7F693663A5
2 changed files with 35 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

@ -10025,6 +10025,8 @@ with pkgs;
pagmo2 = callPackage ../development/libraries/pagmo2 { };
paho-mqtt-c = callPackage ../development/libraries/paho-mqtt-c { };
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