about summary refs log tree commit diff
path: root/nixpkgs/pkgs/by-name/mb/mbpoll/package.nix
blob: eecc8922e4727fef084dbb6a029a693b083d0f01 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{ lib
, stdenv
, cmake
, pkg-config
, fetchFromGitHub
, libmodbus
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "mbpoll";
  version = "1.5.2";

  src = fetchFromGitHub {
    owner = "epsilonrt";
    repo = "mbpoll";
    rev = "v${finalAttrs.version}";
    hash = "sha256-rO3j/p7MABlxcwRAZm26u7wgODGFTtetSDhPWPzTuEA=";
  };

  buildInputs = [ libmodbus ];
  nativeBuildInputs = [ cmake pkg-config ];

  meta = with lib; {
    description = "Command line utility to communicate with ModBus slave (RTU or TCP)";
    homepage = "https://epsilonrt.fr";
    license = licenses.gpl3;
    mainProgram = "mbpoll";
    platforms = platforms.linux;
  };
})