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

let
  version = "2016-07-11";
in
stdenv.mkDerivation rec {
  name = "purple-matrix-unstable-${version}";

  src = fetchgit {
    url = "https://github.com/matrix-org/purple-matrix";
    rev = "f9d36198a57de1cd1740a3ae11c2ad59b03b724a";
    sha256 = "1mmyvc70gslniphmcpk8sfl6ylik6dnprqghx4n47gsj1sb1cy00";
  };

  nativeBuildInputs = [ pkgconfig ];
  buildInputs = [ pidgin json_glib glib http-parser ];

  installPhase = ''
    install -Dm755 -t $out/lib/pidgin/ libmatrix.so
    for size in 16 22 48; do
      install -TDm644 matrix-"$size"px.png $out/pixmaps/pidgin/protocols/$size/matrix.png
    done
  '';

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