default.nix (822B)
1 { 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 cmake, 6 cmocka, 7 }: 8 9 stdenv.mkDerivation (finalAttrs: { 10 pname = "MQTT-C"; 11 version = "1.1.6"; 12 13 src = fetchFromGitHub { 14 owner = "LiamBindle"; 15 repo = "MQTT-C"; 16 rev = "v${finalAttrs.version}"; 17 hash = "sha256-TmqEekdAyxueY0A1a96eyADBpLe+AWd6xMQP3tF6968="; 18 }; 19 20 nativeBuildInputs = [ cmake ]; 21 22 buildInputs = [ cmocka ]; 23 24 cmakeFlags = [ 25 (lib.cmakeBool "MQTT_C_INSTALL_EXAMPLES" true) 26 (lib.cmakeBool "MQTT_C_TESTS" true) 27 ]; 28 29 doCheck = false; 30 31 checkPhase = '' 32 ./tests 33 ''; 34 35 meta = { 36 description = "A portable MQTT C client for embedded systems and PCs alike"; 37 homepage = "https://github.com/LiamBindle/MQTT-C"; 38 license = lib.licenses.mit; 39 maintainers = [ lib.maintainers.sikmir ]; 40 platforms = lib.platforms.unix; 41 }; 42 })