summary refs log tree commit diff
path: root/pkgs/applications/networking/instant-messengers/abaddon/default.nix
blob: d749e35096223c830e0f1f0fdaca889dbc6b8918 (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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
{ lib
, fetchFromGitHub
, stdenv
, cmake
, copyDesktopItems
, makeDesktopItem
, makeWrapper
, pkg-config
, curl
, gtkmm3
, libhandy
, libopus
, libsecret
, libsodium
, nlohmann_json
, pcre2
, spdlog
, sqlite
}:

stdenv.mkDerivation rec {
  pname = "abaddon";
  version = "0.1.11";

  src = fetchFromGitHub {
    owner = "uowuo";
    repo = "abaddon";
    rev = "v${version}";
    hash = "sha256-KrBZESYab7QFwUfpTl40cgKn/if31oqA9oCe0PwoYbs=";
    fetchSubmodules = true;
  };

  nativeBuildInputs = [
    cmake
    copyDesktopItems
    makeWrapper
    pkg-config
  ];

  buildInputs = [
    curl
    gtkmm3
    libhandy
    libopus
    libsecret
    libsodium
    nlohmann_json
    pcre2
    spdlog
    sqlite
  ];

  installPhase = ''
    runHook preInstall

    mkdir -p $out/share/abaddon
    cp -r ../res/{css,res} $out/share/abaddon
    mkdir $out/bin
    cp abaddon $out/bin
    wrapProgram $out/bin/abaddon \
      --chdir $out/share/abaddon

    runHook postInstall
  '';

  desktopItems = [
    (makeDesktopItem {
      name = pname;
      exec = pname;
      desktopName = "Abaddon";
      genericName = meta.description;
      startupWMClass = pname;
      categories = [ "Network" "InstantMessaging" ];
      mimeTypes = [ "x-scheme-handler/discord" ];
    })
  ];

  meta = with lib; {
    description = "A discord client reimplementation, written in C++";
    homepage = "https://github.com/uowuo/abaddon";
    license = licenses.gpl3Plus;
    maintainers = with maintainers; [ genericnerdyusername ];
    platforms = lib.intersectLists lib.platforms.x86_64 lib.platforms.linux;
  };
}