package.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.8"; 13 14 src = fetchFromGitHub { 15 owner = "mutablelogic"; 16 repo = "go-mosquitto"; 17 tag = "v${finalAttrs.version}"; 18 hash = "sha256-JCsIUbQuMkJrzOI3naUZkEJXYPUHAzIucSj/bbhDFFs="; 19 }; 20 21 vendorHash = "sha256-/1xaR3jFqKgyFMBsHmwgWrE7kG5MYX86uqyBmiQqPh4="; 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 })
