2016-02-15 01:07:15 +01:00
|
|
|
{ stdenv, fetchFromGitHub, pkgconfig, libtoxcore-dev, openal, opencv,
|
2015-06-29 19:43:40 +02:00
|
|
|
libsodium, libXScrnSaver, glib, gdk_pixbuf, gtk2, cairo,
|
2016-04-17 01:35:28 +02:00
|
|
|
pango, atk, qrencode, ffmpeg, filter-audio, makeQtWrapper,
|
|
|
|
qtbase, qtsvg, qttools, qmakeHook, qttranslations, sqlcipher }:
|
2014-09-18 09:51:43 +02:00
|
|
|
|
2015-09-25 18:36:23 +02:00
|
|
|
let
|
2016-09-08 20:38:08 +02:00
|
|
|
version = "1.5.0";
|
2016-02-15 01:07:15 +01:00
|
|
|
revision = "v${version}";
|
2015-09-25 18:36:23 +02:00
|
|
|
in
|
|
|
|
|
2015-06-29 19:43:40 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2016-02-15 01:07:15 +01:00
|
|
|
name = "qtox-${version}";
|
2014-09-18 09:51:43 +02:00
|
|
|
|
2016-02-15 01:07:15 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tux3";
|
|
|
|
repo = "qTox";
|
|
|
|
rev = revision;
|
2016-09-08 20:38:08 +02:00
|
|
|
sha256 = "1na2qqzbdbjfw8kymxw5jfglslmw18fz3vpw805pqg4d5y7f7vsi";
|
2014-09-18 09:51:43 +02:00
|
|
|
};
|
|
|
|
|
2015-03-24 16:31:27 +01:00
|
|
|
buildInputs =
|
|
|
|
[
|
2015-06-29 19:43:40 +02:00
|
|
|
libtoxcore-dev openal opencv libsodium filter-audio
|
2016-01-10 09:45:27 +01:00
|
|
|
qtbase qttools qtsvg libXScrnSaver glib gtk2 cairo
|
2016-04-17 01:35:28 +02:00
|
|
|
pango atk qrencode ffmpeg qttranslations makeQtWrapper
|
2016-01-12 20:04:14 +01:00
|
|
|
sqlcipher
|
2015-03-24 16:31:27 +01:00
|
|
|
];
|
2015-06-29 19:43:40 +02:00
|
|
|
|
2016-04-17 01:35:28 +02:00
|
|
|
nativeBuildInputs = [ pkgconfig qmakeHook ];
|
2014-09-18 09:51:43 +02:00
|
|
|
|
2015-06-29 19:43:40 +02:00
|
|
|
preConfigure = ''
|
2015-09-25 18:36:23 +02: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 19:43:40 +02: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)"
|
2016-02-15 01:07:15 +01:00
|
|
|
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE $(pkg-config --cflags sqlcipher)"
|
2015-06-29 19:43:40 +02:00
|
|
|
'';
|
|
|
|
|
2014-09-18 09:51:43 +02:00
|
|
|
installPhase = ''
|
2016-05-30 23:30:58 +02:00
|
|
|
runHook preInstall
|
|
|
|
|
2014-12-04 11:26:00 +01:00
|
|
|
mkdir -p $out/bin
|
2014-09-18 09:51:43 +02:00
|
|
|
cp qtox $out/bin
|
2016-04-17 01:35:28 +02:00
|
|
|
wrapQtProgram $out/bin/qtox
|
2016-05-30 23:30:58 +02:00
|
|
|
|
|
|
|
runHook postInstall
|
2014-09-18 09:51:43 +02:00
|
|
|
'';
|
|
|
|
|
2015-08-21 18:45:40 +02:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2014-09-18 09:51:43 +02:00
|
|
|
meta = with stdenv.lib; {
|
2015-09-25 18:36:23 +02:00
|
|
|
description = "Qt Tox client";
|
2014-09-18 09:51:43 +02:00
|
|
|
license = licenses.gpl3;
|
2015-09-25 18:36:23 +02:00
|
|
|
maintainers = with maintainers; [ viric jgeerds akaWolf ];
|
2014-12-04 02:29:56 +01:00
|
|
|
platforms = platforms.all;
|
2014-09-18 09:51:43 +02:00
|
|
|
};
|
2015-08-21 18:51:12 +02:00
|
|
|
}
|