2017-09-20 03:48:25 +02:00
|
|
|
{ stdenv, fetchurl, openssl, libuuid, cmake, libwebsockets, c-ares, libuv }:
|
2015-02-19 23:53:44 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "mosquitto";
|
2018-03-09 10:01:28 +01:00
|
|
|
version = "1.4.15";
|
2015-02-19 23:53:44 +01:00
|
|
|
|
|
|
|
name = "${pname}-${version}";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2017-09-19 18:12:49 +02:00
|
|
|
url = "http://mosquitto.org/files/source/mosquitto-${version}.tar.gz";
|
2018-03-09 10:01:28 +01:00
|
|
|
sha256 = "10wsm1n4y61nz45zwk4zjhvrfd86r2cq33370m5wjkivb8j3wfvx";
|
2015-02-19 23:53:44 +01:00
|
|
|
};
|
|
|
|
|
2017-09-20 03:48:25 +02:00
|
|
|
buildInputs = [ openssl libuuid libwebsockets c-ares libuv ]
|
2016-08-12 06:04:48 +02:00
|
|
|
++ stdenv.lib.optional stdenv.isDarwin cmake;
|
2015-02-19 23:53:44 +01:00
|
|
|
|
2017-09-28 21:15:42 +02:00
|
|
|
makeFlags = stdenv.lib.optionals stdenv.isLinux [
|
2016-02-20 14:44:41 +01:00
|
|
|
"DESTDIR=$(out)"
|
|
|
|
"PREFIX="
|
|
|
|
];
|
2015-02-19 23:53:44 +01:00
|
|
|
|
2017-09-28 21:15:42 +02:00
|
|
|
postPatch = ''
|
2016-02-20 14:44:41 +01:00
|
|
|
substituteInPlace config.mk \
|
|
|
|
--replace "/usr/local" ""
|
2016-08-24 10:56:46 +02:00
|
|
|
substituteInPlace config.mk \
|
|
|
|
--replace "WITH_WEBSOCKETS:=no" "WITH_WEBSOCKETS:=yes"
|
2015-02-19 23:53:44 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = http://mosquitto.org/;
|
|
|
|
description = "An open source MQTT v3.1/3.1.1 broker";
|
|
|
|
platforms = stdenv.lib.platforms.unix;
|
|
|
|
# http://www.eclipse.org/legal/epl-v10.html (free software, copyleft)
|
|
|
|
license = stdenv.lib.licenses.epl10;
|
|
|
|
};
|
|
|
|
}
|