2015-06-29 17:43:40 +00:00
|
|
|
{ stdenv, fetchgit, pkgconfig, libtoxcore-dev, qt5, openal, opencv,
|
|
|
|
libsodium, libXScrnSaver, glib, gdk_pixbuf, gtk2, cairo,
|
2015-08-21 16:45:40 +00:00
|
|
|
pango, atk, qrencode, ffmpeg, filter-audio, makeWrapper }:
|
2014-09-18 07:51:43 +00:00
|
|
|
|
2015-09-25 16:36:23 +00:00
|
|
|
let
|
2015-09-25 16:47:51 +00:00
|
|
|
revision = "1673b43e26c853f6446f228fec083af166cbf446";
|
2015-09-25 16:36:23 +00:00
|
|
|
in
|
|
|
|
|
2015-06-29 17:43:40 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2015-09-25 16:47:51 +00:00
|
|
|
name = "qtox-dev-20150925";
|
2014-09-18 07:51:43 +00:00
|
|
|
|
2015-06-29 17:43:40 +00:00
|
|
|
src = fetchgit {
|
|
|
|
url = "https://github.com/tux3/qTox.git";
|
2015-09-25 16:36:23 +00:00
|
|
|
rev = "${revision}";
|
2015-09-25 16:47:51 +00:00
|
|
|
md5 = "785f5b305cdcdf777d93ee823a5b9f49";
|
2014-09-18 07:51:43 +00:00
|
|
|
};
|
|
|
|
|
2015-03-24 15:31:27 +00:00
|
|
|
buildInputs =
|
|
|
|
[
|
2015-06-29 17:43:40 +00:00
|
|
|
libtoxcore-dev openal opencv libsodium filter-audio
|
|
|
|
qt5.base qt5.tools libXScrnSaver glib gtk2 cairo
|
2015-08-21 16:45:40 +00:00
|
|
|
pango atk qrencode ffmpeg qt5.translations makeWrapper
|
2015-03-24 15:31:27 +00:00
|
|
|
];
|
2015-06-29 17:43:40 +00:00
|
|
|
|
2015-03-24 15:31:27 +00:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
2014-09-18 07:51:43 +00:00
|
|
|
|
2015-06-29 17:43:40 +00:00
|
|
|
preConfigure = ''
|
2015-09-25 16:36:23 +00:00
|
|
|
# patch .pro file for proper set of the git hash
|
|
|
|
sed -i '/git rev-parse/d' qtox.pro
|
|
|
|
sed -i 's/$$quote($$GIT_VERSION)/${revision}/' qtox.pro
|
|
|
|
# since .pro have hardcoded paths, we need to explicitly set paths here
|
2015-06-29 17:43:40 +00:00
|
|
|
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE $(pkg-config --cflags glib-2.0)"
|
|
|
|
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE $(pkg-config --cflags gdk-pixbuf-2.0)"
|
|
|
|
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE $(pkg-config --cflags gtk+-2.0)"
|
|
|
|
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE $(pkg-config --cflags cairo)"
|
|
|
|
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE $(pkg-config --cflags pango)"
|
|
|
|
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE $(pkg-config --cflags atk)"
|
|
|
|
'';
|
|
|
|
|
|
|
|
configurePhase = ''
|
|
|
|
runHook preConfigure
|
|
|
|
qmake
|
|
|
|
'';
|
2014-09-18 07:51:43 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
2014-12-04 10:26:00 +00:00
|
|
|
mkdir -p $out/bin
|
2014-09-18 07:51:43 +00:00
|
|
|
cp qtox $out/bin
|
2015-08-21 16:45:40 +00:00
|
|
|
wrapProgram $out/bin/qtox \
|
|
|
|
--prefix QT_PLUGIN_PATH : ${qt5.svg}/lib/qt5/plugins
|
2014-09-18 07:51:43 +00:00
|
|
|
'';
|
|
|
|
|
2015-08-21 16:45:40 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2014-09-18 07:51:43 +00:00
|
|
|
meta = with stdenv.lib; {
|
2015-09-25 16:36:23 +00:00
|
|
|
description = "Qt Tox client";
|
2014-09-18 07:51:43 +00:00
|
|
|
license = licenses.gpl3;
|
2015-09-25 16:36:23 +00:00
|
|
|
maintainers = with maintainers; [ viric jgeerds akaWolf ];
|
2014-12-04 01:29:56 +00:00
|
|
|
platforms = platforms.all;
|
2014-09-18 07:51:43 +00:00
|
|
|
};
|
2015-08-21 16:51:12 +00:00
|
|
|
}
|