default.nix (1235B)
1 { lib 2 , stdenv 3 , fetchFromGitHub 4 , cmake 5 , spdlog 6 , libyamlcpp 7 , libcpr 8 , cxxopts 9 , nlohmann_json 10 , influxdb-cxx 11 , boost 12 , curl 13 , paho-mqtt-cpp 14 , paho-mqtt-c 15 , stduuid 16 , microsoft_gsl 17 , catch2 18 }: 19 20 stdenv.mkDerivation (finalAttrs: { 21 pname = "mqtt-to-influxdb"; 22 version = "0.2.1"; 23 24 src = fetchFromGitHub { 25 owner = "DavidHamburg"; 26 repo = "mqtt-to-influxdb"; 27 rev = "v${finalAttrs.version}"; 28 hash = "sha256-rTMI9gqjtrmtT9SoYcHHq19Jch1dH7/tmyqz5F4f9Ao="; 29 fetchSubmodules = true; 30 }; 31 32 postPatch = '' 33 substituteInPlace src/app/CMakeLists.txt \ 34 --replace "/usr" "$out" 35 '' + lib.optionalString stdenv.cc.isClang '' 36 substituteInPlace src/libmqtt-to-influxdb/CMakeLists.txt \ 37 --replace "stdc++fs" "" 38 ''; 39 40 nativeBuildInputs = [ cmake ]; 41 42 buildInputs = [ 43 spdlog 44 libyamlcpp 45 libcpr 46 cxxopts 47 nlohmann_json 48 influxdb-cxx 49 boost 50 curl 51 paho-mqtt-cpp 52 paho-mqtt-c 53 stduuid 54 microsoft_gsl 55 catch2 56 ]; 57 58 meta = with lib; { 59 description = "MQTT message parser for writing statistics into InfluxDB"; 60 inherit (finalAttrs.src.meta) homepage; 61 license = licenses.mit; 62 maintainers = [ maintainers.sikmir ]; 63 platforms = platforms.unix; 64 }; 65 })