From 5f2a72aa7a825fb20401fc035f8db2efb8eb3b64 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Mon, 22 Apr 2024 08:02:05 +0200 Subject: [PATCH] chirpstack-gateway-bridge: init at 4.0.11 --- .../ch/chirpstack-gateway-bridge/package.nix | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 pkgs/by-name/ch/chirpstack-gateway-bridge/package.nix diff --git a/pkgs/by-name/ch/chirpstack-gateway-bridge/package.nix b/pkgs/by-name/ch/chirpstack-gateway-bridge/package.nix new file mode 100644 index 000000000000..59a23a0cda49 --- /dev/null +++ b/pkgs/by-name/ch/chirpstack-gateway-bridge/package.nix @@ -0,0 +1,46 @@ +{ + lib, + buildGoModule, + fetchFromGitHub, + nix-update-script, + versionCheckHook, +}: +buildGoModule rec { + pname = "chirpstack-gateway-bridge"; + version = "4.0.11"; + + src = fetchFromGitHub { + owner = "chirpstack"; + repo = "chirpstack-gateway-bridge"; + rev = "v${version}"; + hash = "sha256-nVrYyvoN6jayXAwivwxhijNeLEcGICTWJ4T9EBs5uaI="; + }; + + vendorHash = "sha256-PX5Jd8fUFEOOd38NNqbV15jbEIcDQRYGk0l1MhtLiTk="; + + ldflags = [ + "-s" + "-w" + "-X main.version=v${version}" + ]; + + nativeInstallCheckInputs = [ + versionCheckHook + ]; + doInstallCheck = true; + versionCheckProgramArg = "version"; + + checkFlags = [ + "-skip=TestMQTTBackend" # Depends on external MQTT broker + ]; + + passthru.updateScript = nix-update-script { }; + + meta = { + description = "Gateway Bridge abstracts Packet Forwarder protocols into Protobuf or JSON over MQTT"; + homepage = "https://www.chirpstack.io/"; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.stv0g ]; + mainProgram = "chirpstack-gateway-bridge"; + }; +}