2016-08-24 08:56:46 +00:00
|
|
|
{ stdenv, fetchurl, openssl, libuuid, cmake, libwebsockets }:
|
2015-02-19 22:53:44 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "mosquitto";
|
|
|
|
version = "1.4";
|
|
|
|
|
|
|
|
name = "${pname}-${version}";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = http://mosquitto.org/files/source/mosquitto-1.4.tar.gz;
|
|
|
|
sha256 = "1imw5ps0cqda41b574k8hgz9gdr8yy58f76fg8gw14pdnvf3l7sr";
|
|
|
|
};
|
|
|
|
|
2016-08-24 08:56:46 +00:00
|
|
|
buildInputs = [ openssl libuuid libwebsockets ]
|
2016-08-12 04:04:48 +00:00
|
|
|
++ stdenv.lib.optional stdenv.isDarwin cmake;
|
2015-02-19 22:53:44 +00:00
|
|
|
|
2016-02-20 13:44:41 +00:00
|
|
|
makeFlags = [
|
|
|
|
"DESTDIR=$(out)"
|
|
|
|
"PREFIX="
|
|
|
|
];
|
2015-02-19 22:53:44 +00:00
|
|
|
|
2016-02-20 13:44:41 +00:00
|
|
|
preBuild = ''
|
|
|
|
substituteInPlace config.mk \
|
|
|
|
--replace "/usr/local" ""
|
2016-08-24 08:56:46 +00:00
|
|
|
substituteInPlace config.mk \
|
|
|
|
--replace "WITH_WEBSOCKETS:=no" "WITH_WEBSOCKETS:=yes"
|
|
|
|
|
2015-02-19 22:53:44 +00: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;
|
|
|
|
};
|
|
|
|
}
|