Unverified Commit 7849cd48 authored by Robert Scott's avatar Robert Scott Committed by GitHub
Browse files

Merge pull request #325328 from risicle/ris-nanomq-0.22

nanomq: 0.20.8 → 0.22.1
parents 5c8cd3dd 36731fc6
Loading
Loading
Loading
Loading
+19 −13
Original line number Diff line number Diff line
@@ -25,13 +25,13 @@ let
  # bit absurd - repo doesn't even have a license.
  idl-serial = stdenv.mkDerivation {
    pname = "idl-serial";
    version = "unstable-2023-03-29";
    version = "unstable-2023-09-28";

    src = fetchFromGitHub {
      owner = "nanomq";
      repo = "idl-serial";
      rev = "908c364dab4c0dcdd77b8de698d29c8a0b6d3830";
      hash = "sha256-3DS9DuzHN7BevfgiekUmKKH9ej9wKTrt6Fuh427NC4I=";
      rev = "cf63cb2c4fbe2ecfba569979b89e20e1190b5ed4";
      hash = "sha256-HM5TSMfEr4uv5BuNCQjyZganSQ/ZqT3xZQp0KLmjIEc=";
    };

    nativeBuildInputs = [ cmake ninja flex bison ];
@@ -42,13 +42,13 @@ let

in stdenv.mkDerivation (finalAttrs: {
  pname = "nanomq";
  version = "0.20.8";
  version = "0.22.1";

  src = fetchFromGitHub {
    owner = "emqx";
    repo = "nanomq";
    rev = finalAttrs.version;
    hash = "sha256-VCKlXQ7qvBab+wRDnJ6EUA5qaQ36gTFfuerN1GU6sW0=";
    hash = "sha256-aB1gEzo2dX8NY+e0Dq4ELgkUpL/NtvvuY/l539BPIng=";
    fetchSubmodules = true;
  };

@@ -62,16 +62,16 @@ in stdenv.mkDerivation (finalAttrs: {
  buildInputs = [ cyclonedds libmysqlclient mariadb mbedtls sqlite zeromq ];

  cmakeFlags = [
    "-DBUILD_BENCH=ON"
    "-DBUILD_DDS_PROXY=ON"
    "-DBUILD_NANOMQ_CLI=ON"
    "-DBUILD_ZMQ_GATEWAY=ON"
    "-DENABLE_RULE_ENGINE=ON"
    "-DNNG_ENABLE_SQLITE=ON"
    "-DNNG_ENABLE_TLS=ON"
    (lib.cmakeBool "BUILD_BENCH" true)
    (lib.cmakeBool "BUILD_DDS_PROXY" true)
    (lib.cmakeBool "BUILD_NANOMQ_CLI" true)
    (lib.cmakeBool "BUILD_ZMQ_GATEWAY" true)
    (lib.cmakeBool "ENABLE_RULE_ENGINE" true)
    (lib.cmakeBool "NNG_ENABLE_SQLITE" true)
    (lib.cmakeBool "NNG_ENABLE_TLS" true)
  ];

  env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-return-type -Wno-implicit-function-declaration -Wno-error=implicit-int";
  env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=int-conversion";

  # disabled by default - not 100% reliable and making nanomq depend on
  # mosquitto would annoy people
@@ -90,6 +90,12 @@ in stdenv.mkDerivation (finalAttrs: {
      # effectively distable this test because it is slow
      echo > .github/scripts/fuzzy_test.txt

      # even with the correct paho-mqtt version these tests fail, suggesting
      # websocket support is indeed broken
      substituteInPlace .github/scripts/test.py \
        --replace 'ws_test()' '#ws_test()' \
        --replace 'ws_v5_test()' '#ws_v5_test()'

      PATH="$PATH:$out/bin" python .github/scripts/test.py
    )

+0 −2
Original line number Diff line number Diff line
@@ -22725,8 +22725,6 @@ with pkgs;
  mosquitto = callPackage ../servers/mqtt/mosquitto { };
  nanomq = callPackage ../servers/mqtt/nanomq { };
  mps = callPackage ../development/libraries/mps { };
  libmpeg2 = callPackage ../development/libraries/libmpeg2 { };