summary refs log tree commit diff
path: root/pkgs/applications/networking/instant-messengers/pidgin-plugins/purple-matrix/default.nix
blob: 8a15a3bdd85ea91db9d4fb306d236446228ce525 (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
{ stdenv, fetchgit, pkgconfig, pidgin, json-glib, glib, http-parser, sqlite, olm, libgcrypt } :

let
  version = "2018-08-03";
in
stdenv.mkDerivation {
  pname = "purple-matrix-unstable";
  inherit version;

  src = fetchgit {
    url = "https://github.com/matrix-org/purple-matrix";
    rev = "5a7166a3f54f85793c6b60662f8d12196aeaaeb0";
    sha256 = "0ph0s24b37d1c50p8zbzgf4q2xns43a8v6vk85iz633wdd72zsa0";
  };

  # glib-2.62 deprecations
  NIX_CFLAGS_COMPILE = [ "-DGLIB_DISABLE_DEPRECATION_WARNINGS" ];

  nativeBuildInputs = [ pkgconfig ];
  buildInputs = [ pidgin json-glib glib http-parser sqlite olm libgcrypt ];

  hardeningDisable = [ "fortify" ]; # upstream compiles with -O0

  makeFlags = [
    "PLUGIN_DIR_PURPLE=${placeholder "out"}/lib/purple-2"
    "DATA_ROOT_DIR_PURPLE=${placeholder "out"}/share"
  ];

  meta = with stdenv.lib; {
    homepage = https://github.com/matrix-org/purple-matrix;
    description = "Matrix support for Pidgin / libpurple";
    license = licenses.gpl2;
    maintainers = with maintainers; [ symphorien ];
  };
}