Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / libraries / paho-mqtt-c / default.nix
blob14943278822185aec3f3b89817224adf3563c55e
1 { lib, stdenv, fetchFromGitHub, cmake, openssl }:
3 stdenv.mkDerivation rec {
4   pname = "paho.mqtt.c";
5   version = "1.3.13";
7   src = fetchFromGitHub {
8     owner = "eclipse";
9     repo = "paho.mqtt.c";
10     rev = "v${version}";
11     hash = "sha256-dKQnepQAryAjImh2rX1jdgiKBtJQy9wzk/7rGQjUtPg=";
12   };
14   postPatch = ''
15     substituteInPlace src/MQTTVersion.c \
16       --replace "namebuf[60]" "namebuf[120]" \
17       --replace "lib%s" "$out/lib/lib%s"
18   '';
20   nativeBuildInputs = [ cmake ];
22   buildInputs = [ openssl ];
24   cmakeFlags = [ "-DPAHO_WITH_SSL=TRUE" ];
26   meta = with lib; {
27     description = "Eclipse Paho MQTT C Client Library";
28     homepage = "https://www.eclipse.org/paho/";
29     license = licenses.epl20;
30     maintainers = with maintainers; [ sikmir ];
31     platforms = platforms.unix;
32   };