about summary refs log tree commit diff
path: root/pkgs/servers/matrix-hebbot/default.nix
blob: ca90304ed32fa01f769c7d4bbac6902eada42899 (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
41
42
43
44
{ lib
, fetchFromGitHub
, stdenv
, rustPlatform
, pkg-config
, cmake
, openssl
, autoconf
, automake
, Security
}:

rustPlatform.buildRustPackage rec {
  pname = "hebbot";
  version = "2.1";

  src = fetchFromGitHub {
    owner = "haecker-felix";
    repo = "hebbot";
    rev = "v${version}";
    sha256 = "sha256-zcsoTWpNonkgJLTC8S9Nubnzdhj5ROL/UGNWUsLxLgs=";
  };

  cargoLock = {
    lockFile = ./Cargo.lock;
    outputHashes = {
      "matrix-qrcode-0.1.0" = "sha256-g78Ql+r5NYNcnkoirH9E6AHagZgBCgxBfweaX1D0z0E=";
    };
  };

  nativeBuildInputs = [ pkg-config cmake ] ++
    lib.optionals stdenv.isDarwin [ autoconf automake ];

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

  meta = with lib; {
    description = "Matrix bot which can generate \"This Week in X\" like blog posts ";
    homepage = "https://github.com/haecker-felix/hebbot";
    changelog = "https://github.com/haecker-felix/hebbot/releases/tag/v${version}";
    license = with licenses; [ agpl3Only ];
    mainProgram = "hebbot";
    maintainers = with maintainers; [ a-kenji ];
  };
}