default.nix (1034B)
1 { 2 lib, 3 stdenv, 4 rustPlatform, 5 fetchFromGitHub, 6 darwin, 7 protobuf, 8 }: 9 10 rustPlatform.buildRustPackage rec { 11 pname = "rmqtt"; 12 version = "0.10.0"; 13 14 src = fetchFromGitHub { 15 owner = "rmqtt"; 16 repo = "rmqtt"; 17 rev = version; 18 hash = "sha256-EPHiwDct8abzzYUj5egKf93yIrzFxoYDcH6ki4bZfGw="; 19 }; 20 21 cargoLock = { 22 lockFile = ./Cargo.lock; 23 outputHashes = { 24 "ntex-0.4.1" = "sha256-nt/nLO7oIpE7EvxY2WseiGZH3U6Gw1jaJabPW76RCwk="; 25 "ntex-mqtt-0.7.2" = "sha256-ijHb37ZpwcfaHnVcB6moqFpCFjU8Jhiv8pxfARgTXkY="; 26 }; 27 }; 28 29 postPatch = '' 30 ln -s ${./Cargo.lock} Cargo.lock 31 ''; 32 33 nativeBuildInputs = [ protobuf ]; 34 35 buildInputs = lib.optionals stdenv.isDarwin [ 36 darwin.apple_sdk.frameworks.Security 37 darwin.apple_sdk.frameworks.SystemConfiguration 38 ]; 39 40 meta = { 41 description = "MQTT Broker"; 42 homepage = "https://github.com/rmqtt/rmqtt"; 43 license = lib.licenses.mit; 44 maintainers = [ lib.maintainers.sikmir ]; 45 broken = true; # failed to get `ahash` as a dependency 46 }; 47 }