default.nix (791B)
1 { 2 lib, 3 fetchFromGitHub, 4 buildGoModule, 5 pkg-config, 6 mosquitto, 7 sqlite, 8 }: 9 10 buildGoModule (finalAttrs: { 11 pname = "go-mosquitto"; 12 version = "1.0.6"; 13 14 src = fetchFromGitHub { 15 owner = "mutablelogic"; 16 repo = "go-mosquitto"; 17 tag = "v${finalAttrs.version}"; 18 hash = "sha256-eUe6ntxWW0eAQMNSiW73EpZH8SRF/fM9bluBxR3ajY4="; 19 }; 20 21 vendorHash = "sha256-DAHB9u1S7DkxcpN1zdwFGjZTFLKVQG+O3hK/mqZZUMM="; 22 23 subPackages = [ 24 "cmd/mqttpub" 25 "cmd/mqttsub" 26 ]; 27 28 nativeBuildInputs = [ pkg-config ]; 29 30 buildInputs = [ 31 mosquitto 32 sqlite 33 ]; 34 35 meta = { 36 description = "Golang Mosquitto MQTT Client Library"; 37 homepage = "https://github.com/mutablelogic/go-mosquitto"; 38 license = lib.licenses.asl20; 39 maintainers = [ lib.maintainers.sikmir ]; 40 }; 41 })