nixpkgs/pkgs/servers/mqtt/mosquitto/default.nix

37 lines
1017 B
Nix
Raw Normal View History

{ stdenv, fetchurl, openssl, libuuid, cmake, libwebsockets, c-ares, libuv }:
stdenv.mkDerivation rec {
pname = "mosquitto";
version = "1.4.15";
name = "${pname}-${version}";
src = fetchurl {
2017-09-19 16:12:49 +00:00
url = "http://mosquitto.org/files/source/mosquitto-${version}.tar.gz";
sha256 = "10wsm1n4y61nz45zwk4zjhvrfd86r2cq33370m5wjkivb8j3wfvx";
};
buildInputs = [ openssl libuuid libwebsockets c-ares libuv ]
++ stdenv.lib.optional stdenv.isDarwin cmake;
2017-09-28 19:15:42 +00:00
makeFlags = stdenv.lib.optionals stdenv.isLinux [
"DESTDIR=$(out)"
"PREFIX="
];
2017-09-28 19:15:42 +00:00
postPatch = ''
substituteInPlace config.mk \
--replace "/usr/local" ""
2016-08-24 08:56:46 +00:00
substituteInPlace config.mk \
--replace "WITH_WEBSOCKETS:=no" "WITH_WEBSOCKETS:=yes"
'';
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;
};
}