nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at r-updates 65 lines 1.4 kB view raw
1{ 2 lib, 3 stdenv, 4 buildPythonPackage, 5 fetchFromGitHub, 6 hatchling, 7 pytestCheckHook, 8}: 9 10let 11 testing = fetchFromGitHub { 12 owner = "eclipse"; 13 repo = "paho.mqtt.testing"; 14 rev = "a4dc694010217b291ee78ee13a6d1db812f9babd"; 15 hash = "sha256-SQoNdkWMjnasPjpXQF2yV97MUra8gb27pc3rNoA8Rjw="; 16 }; 17in 18buildPythonPackage rec { 19 pname = "paho-mqtt"; 20 version = "2.1.0"; 21 pyproject = true; 22 23 src = fetchFromGitHub { 24 owner = "eclipse"; 25 repo = "paho.mqtt.python"; 26 rev = "v${version}"; 27 hash = "sha256-VMq+WTW+njK34QUUTE6fR2j2OmHxVzR0wrC92zYb1rY="; 28 }; 29 30 build-system = [ 31 hatchling 32 ]; 33 34 nativeCheckInputs = [ 35 pytestCheckHook 36 ]; 37 38 __darwinAllowLocalNetworking = true; 39 40 pythonImportsCheck = [ "paho.mqtt" ]; 41 42 preCheck = '' 43 ln -s ${testing} paho.mqtt.testing 44 45 # paho.mqtt not in top-level dir to get caught by this 46 export PYTHONPATH=".:$PYTHONPATH" 47 ''; 48 49 disabledTests = [ 50 # Fails during teardown 51 # RuntimeError: Client 01-zero-length-clientid.py exited with code None, expected 0 52 "test_01_zero_length_clientid" 53 ]; 54 55 meta = { 56 changelog = "https://github.com/eclipse/paho.mqtt.python/blob/${src.rev}/ChangeLog.txt"; 57 description = "MQTT version 5.0/3.1.1 client class"; 58 homepage = "https://eclipse.org/paho"; 59 license = lib.licenses.epl20; 60 maintainers = with lib.maintainers; [ 61 mog 62 dotlambda 63 ]; 64 }; 65}