Merge pull request #291807 from liketechnik/fix/paho-mqtt-c-static

paho-mqtt-c(pp): pass static/shared build to cmake
This commit is contained in:
Nikolay Korotkiy 2024-02-29 01:28:47 +04:00 committed by GitHub
commit 816cae3ee3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 13 additions and 3 deletions

View File

@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitHub, cmake, openssl }:
{ lib, stdenv, fetchFromGitHub, cmake, openssl, enableStatic ? stdenv.hostPlatform.isStatic, enableShared ? !stdenv.hostPlatform.isStatic }:
stdenv.mkDerivation rec {
pname = "paho.mqtt.c";
@ -21,7 +21,11 @@ stdenv.mkDerivation rec {
buildInputs = [ openssl ];
cmakeFlags = [ "-DPAHO_WITH_SSL=TRUE" ];
cmakeFlags = [
(lib.cmakeBool "PAHO_WITH_SSL" true)
(lib.cmakeBool "PAHO_BUILD_STATIC" enableStatic)
(lib.cmakeBool "PAHO_BUILD_SHARED" enableShared)
];
meta = with lib; {
description = "Eclipse Paho MQTT C Client Library";

View File

@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitHub, cmake, openssl, paho-mqtt-c }:
{ lib, stdenv, fetchFromGitHub, cmake, openssl, paho-mqtt-c, enableStatic ? stdenv.hostPlatform.isStatic, enableShared ? !stdenv.hostPlatform.isStatic }:
stdenv.mkDerivation rec {
pname = "paho.mqtt.cpp";
@ -15,6 +15,12 @@ stdenv.mkDerivation rec {
buildInputs = [ openssl paho-mqtt-c ];
cmakeFlags = [
(lib.cmakeBool "PAHO_WITH_SSL" true)
(lib.cmakeBool "PAHO_BUILD_STATIC" enableStatic)
(lib.cmakeBool "PAHO_BUILD_SHARED" enableShared)
];
meta = with lib; {
description = "Eclipse Paho MQTT C++ Client Library";
homepage = "https://www.eclipse.org/paho/";