nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 rustPlatform,
5 fetchFromGitHub,
6 nix-update-script,
7 versionCheckHook,
8 protobuf,
9}:
10rustPlatform.buildRustPackage rec {
11 pname = "chirpstack-udp-forwarder";
12 version = "4.2.1";
13
14 src = fetchFromGitHub {
15 owner = "chirpstack";
16 repo = "chirpstack-udp-forwarder";
17 rev = "v${version}";
18 hash = "sha256-BCflOG9v+tW5o0b/hZqlcg1BA+V/lpNzr3fJ9eg6qeY=";
19 };
20
21 cargoHash = "sha256-2XTb9Wv61as7XhNMjJeryVq8nY835AxiONJjapdgCAw=";
22
23 nativeBuildInputs = [ protobuf ];
24
25 nativeInstallCheckInputs = [ versionCheckHook ];
26
27 doInstallCheck = true;
28
29 passthru.updateScript = nix-update-script { };
30
31 meta = {
32 description = "UDP packet-forwarder for the ChirpStack Concentratord";
33 homepage = "https://www.chirpstack.io/";
34 license = lib.licenses.mit;
35 maintainers = [ lib.maintainers.stv0g ];
36 mainProgram = "chirpstack-udp-forwarder";
37 };
38}