nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildGoModule,
4 fetchFromGitHub,
5}:
6let
7 version = "0.13-unstable-2025-08-08";
8 rev = "499ae856f44e511b236660d9dce0021f758fc64e";
9 modulePath = "github.com/volkszaehler/mbmd";
10in
11buildGoModule {
12 pname = "mbmd";
13 inherit version;
14
15 src = fetchFromGitHub {
16 inherit rev;
17 owner = "volkszaehler";
18 repo = "mbmd";
19 hash = "sha256-HdldLF9+QgaIvGG8lAENvUiPonMwrdHUphGRSmaeRj8=";
20 };
21
22 tags = [ "release" ];
23
24 ldflags = [
25 "-s"
26 "-w"
27 "-X ${modulePath}/server.Version=${version}"
28 "-X ${modulePath}/server.Commit=${rev}"
29 ];
30
31 vendorHash = "sha256-L816AQmyL6ZctKgImbU/cAYSQkQhxuhvtr4SyjPKMFs=";
32
33 env.CGO_ENABLED = 0; # NOTE: Pure Go
34
35 meta = {
36 description = "ModBus Measurement Daemon - simple reading of data from ModBus meters and grid inverters";
37 homepage = "https://github.com/volkszaehler/mbmd";
38 license = lib.licenses.bsd3;
39 maintainers = with lib.maintainers; [ tsandrini ];
40 mainProgram = "mbmd";
41 };
42}