3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/networking/instant-messengers/qtox/default.nix

66 lines
2 KiB
Nix
Raw Normal View History

{ stdenv, fetchFromGitHub, pkgconfig, libtoxcore-dev, openal, opencv,
2015-06-29 18:43:40 +01:00
libsodium, libXScrnSaver, glib, gdk_pixbuf, gtk2, cairo,
2015-12-20 02:45:45 +00:00
pango, atk, qrencode, ffmpeg, filter-audio, makeWrapper,
qtbase, qtsvg, qttools, qttranslations, sqlcipher }:
2015-09-25 17:36:23 +01:00
let
2016-03-13 20:34:51 +00:00
version = "1.3.0";
revision = "v${version}";
2015-09-25 17:36:23 +01:00
in
2015-06-29 18:43:40 +01:00
stdenv.mkDerivation rec {
name = "qtox-${version}";
src = fetchFromGitHub {
owner = "tux3";
repo = "qTox";
rev = revision;
2016-03-13 20:34:51 +00:00
sha256 = "0z2rxsa23vpl4q0h63mybw7kv8n1sm6nwb93l0cc046a3n9axid8";
};
2015-03-24 15:31:27 +00:00
buildInputs =
[
2015-06-29 18:43:40 +01:00
libtoxcore-dev openal opencv libsodium filter-audio
2016-01-10 08:45:27 +00:00
qtbase qttools qtsvg libXScrnSaver glib gtk2 cairo
2015-12-20 02:45:45 +00:00
pango atk qrencode ffmpeg qttranslations makeWrapper
sqlcipher
2015-03-24 15:31:27 +00:00
];
2015-06-29 18:43:40 +01:00
2015-03-24 15:31:27 +00:00
nativeBuildInputs = [ pkgconfig ];
2015-06-29 18:43:40 +01:00
preConfigure = ''
2015-09-25 17:36:23 +01: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 18:43:40 +01: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)"
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE $(pkg-config --cflags sqlcipher)"
2015-06-29 18:43:40 +01:00
'';
configurePhase = ''
runHook preConfigure
qmake
'';
installPhase = ''
2014-12-04 10:26:00 +00:00
mkdir -p $out/bin
cp qtox $out/bin
wrapProgram $out/bin/qtox \
2015-12-20 02:45:45 +00:00
--prefix QT_PLUGIN_PATH : ${qtsvg}/lib/qt5/plugins
'';
enableParallelBuilding = true;
meta = with stdenv.lib; {
2015-09-25 17:36:23 +01:00
description = "Qt Tox client";
license = licenses.gpl3;
2015-09-25 17:36:23 +01:00
maintainers = with maintainers; [ viric jgeerds akaWolf ];
platforms = platforms.all;
};
2015-08-21 17:51:12 +01:00
}