about summary refs log tree commit diff
path: root/pkgs/tools/misc/hiksink/default.nix
blob: 05d7e1c9f44ea5f3281a7046a2176442fd27451c (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
31
32
33
34
35
36
37
38
39
40
{ lib
, stdenv
, fetchFromGitHub
, rustPlatform
, pkg-config
, Security
, openssl
}:

rustPlatform.buildRustPackage rec {
  pname = "hiksink";
  version = "1.2.1";

  src = fetchFromGitHub {
    owner = "CornerBit";
    repo = pname;
    rev = version;
    sha256 = "sha256-k/cBCc7DywyBbAzCRCHdrOVmo+QVCsSgDn8hcyTIUI8=";
  };

  cargoSha256 = "sha256-vqzXpSPBwY7m/Fdob0mHH0OXnzyQwFk7x2kk9Tgez3M=";

  nativeBuildInputs = [
    pkg-config
  ];

  buildInputs = [
    openssl
  ] ++ lib.optionals stdenv.isDarwin [
    Security
  ];

  meta = with lib; {
    description = "Tool to convert Hikvision camera events to MQTT";
    homepage = "https://github.com/CornerBit/HikSink";
    license = with licenses; [ mit ];
    maintainers = with maintainers; [ fab ];
    mainProgram = "hik_sink";
  };
}