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