@@ -0,0 +1,30 @@
1+{ stdenv, fetchgit, pkgconfig, pidgin, json_glib, glib, http-parser } :
2+
3+let
4+ version = "2016-07-11";
5+in
6+stdenv.mkDerivation rec {
7+ name = "purple-matrix-unstable-${version}";
8+
9+ src = fetchgit {
10+ url = "https://github.com/matrix-org/purple-matrix";
11+ rev = "f9d36198a57de1cd1740a3ae11c2ad59b03b724a";
12+ sha256 = "1mmyvc70gslniphmcpk8sfl6ylik6dnprqghx4n47gsj1sb1cy00";
13+ };
14+
15+ nativeBuildInputs = [ pkgconfig ];
16+ buildInputs = [ pidgin json_glib glib http-parser ];
17+
18+ installPhase = ''
19+ install -Dm755 -t $out/lib/pidgin/ libmatrix.so
20+ for size in 16 22 48; do
21+ install -TDm644 matrix-"$size"px.png $out/pixmaps/pidgin/protocols/$size/matrix.png
22+ done
23+ '';
24+
25+ meta = {
26+ homepage = https://github.com/matrix-org/purple-matrix;
27+ description = "Matrix support for Pidgin / libpurple";
28+ license = stdenv.lib.licenses.gpl2;
29+ };
30+}