summaryrefslogtreecommitdiffstats
path: root/pkgs/by-name/he/hebbot/package.nix
blob: fe4cc079fd7f1b473dd5cb809ebb8116f7b61bb5 (plain)
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
{
  lib,
  fetchFromGitHub,
  stdenv,
  rustPlatform,
  pkg-config,
  cmake,
  openssl,
  autoconf,
  automake,
  unstableGitUpdater,
  sqlite,
}:

rustPlatform.buildRustPackage (finalAttrs: {
  pname = "hebbot";
  version = "2.1-unstable-2024-09-20";

  src = fetchFromGitHub {
    owner = "haecker-felix";
    repo = "hebbot";
    rev = "4c7152a3ce88ecfbac06f823abd4fd849e0c30d1";
    hash = "sha256-y+KpxiEzVAggFoPvTOy0IEmAo2V6mOpM0VzEScUOtsM=";
  };

  cargoHash = "sha256-xRTl6Z6sn44yaEIFxG2vVKlbruDmOS2CdPZeVmWYOoA=";

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

  buildInputs = [
    openssl
  ];

  env = {
    OPENSSL_NO_VENDOR = 1;
    NIX_CFLAGS_LINK = toString [
      "-L${lib.getLib openssl}/lib"
      "-L${lib.getLib sqlite}/lib"
    ];
  };

  passthru.updateScript = unstableGitUpdater { };

  meta = {
    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/v2.1";
    license = lib.licenses.agpl3Only;
    mainProgram = "hebbot";
    maintainers = with lib.maintainers; [ a-kenji ];
  };
})