From 9c5cd4990362ca41fe294851fa850f30ab669c3c Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Sun, 13 Dec 2015 01:26:38 +0100 Subject: [PATCH] cutegram: init at 2.7.0-stable --- lib/maintainers.nix | 1 + .../telegram/cutegram/default.nix | 31 ++++++++++++++++ .../libqtelegram-aseman-edition/default.nix | 34 ++++++++++++++++++ .../telegram/telegram-qml/default.nix | 35 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 8 +++++ 5 files changed, 109 insertions(+) create mode 100644 pkgs/applications/networking/instant-messengers/telegram/cutegram/default.nix create mode 100644 pkgs/applications/networking/instant-messengers/telegram/libqtelegram-aseman-edition/default.nix create mode 100644 pkgs/applications/networking/instant-messengers/telegram/telegram-qml/default.nix diff --git a/lib/maintainers.nix b/lib/maintainers.nix index 596b8a49a10d..3d2144b0e31f 100644 --- a/lib/maintainers.nix +++ b/lib/maintainers.nix @@ -239,6 +239,7 @@ pmahoney = "Patrick Mahoney "; pmiddend = "Philipp Middendorf "; prikhi = "Pavan Rikhi "; + profpatsch = "Profpatsch "; psibi = "Sibi "; pSub = "Pascal Wittmann "; puffnfresh = "Brian McKenna "; diff --git a/pkgs/applications/networking/instant-messengers/telegram/cutegram/default.nix b/pkgs/applications/networking/instant-messengers/telegram/cutegram/default.nix new file mode 100644 index 000000000000..0a1e79365c39 --- /dev/null +++ b/pkgs/applications/networking/instant-messengers/telegram/cutegram/default.nix @@ -0,0 +1,31 @@ +{ stdenv, fetchFromGitHub +, qt5Libs, qtbase, qtquick1, qtmultimedia, qtquickcontrols, qtgraphicaleffects, makeQtWrapper +, telegram-qml, libqtelegram-aseman-edition }: + +stdenv.mkDerivation rec { + name = "cutegram-v${version}"; + version = "2.7.0-stable"; + + src = fetchFromGitHub { + owner = "Aseman-Land"; + repo = "Cutegram"; + rev = "v${version}"; + sha256 = "0qhy30gb8zdrphz1b7zcnv8hmm5fd5qwlvrg7wpsh3hk5niz3zxk"; + }; + # TODO appindicator, for system tray plugin + buildInputs = [ qtbase qtquick1 qtmultimedia qtquickcontrols qtgraphicaleffects telegram-qml libqtelegram-aseman-edition ]; + nativeBuildInputs = [ makeQtWrapper ]; + enableParallelBuild = true; + + fixupPhase = "wrapQtProgram $out/bin/cutegram"; + + configurePhase = "qmake -r PREFIX=$out"; + + meta = with stdenv.lib; { + description = "Telegram client forked from sigram"; + homepage = "http://aseman.co/en/products/cutegram/"; + license = licenses.gpl3; + maintainer = [ maintainers.profpatsch ]; + }; + +} diff --git a/pkgs/applications/networking/instant-messengers/telegram/libqtelegram-aseman-edition/default.nix b/pkgs/applications/networking/instant-messengers/telegram/libqtelegram-aseman-edition/default.nix new file mode 100644 index 000000000000..31e0a0dc3996 --- /dev/null +++ b/pkgs/applications/networking/instant-messengers/telegram/libqtelegram-aseman-edition/default.nix @@ -0,0 +1,34 @@ +{ stdenv, fetchFromGitHub +, qtbase, qtmultimedia, qtquick1 }: + +stdenv.mkDerivation rec { + name = "libqtelegram-aseman-edition-v${version}"; + version = "6.0"; + + src = fetchFromGitHub { + owner = "Aseman-Land"; + repo = "libqtelegram-aseman-edition"; + rev = "v${version}"; + sha256 = "17hlxf43xwic8m06q3gwbxjpvz31ks6laffjw6ny98d45zfnfwra"; + }; + + buildInputs = [ qtbase qtmultimedia qtquick1 ]; + enableParallelBuild = true; + + patchPhase = '' + substituteInPlace libqtelegram-ae.pro --replace "/libqtelegram-ae" "" + substituteInPlace libqtelegram-ae.pro --replace "/\$\$LIB_PATH" "" + ''; + + configurePhase = '' + qmake -r PREFIX=$out + ''; + + meta = with stdenv.lib; { + description = "A fork of libqtelegram by Aseman, using qmake"; + homepage = src.meta.homepage; + license = stdenv.lib.licenses.gpl3; + maintainer = [ maintainers.profpatsch ]; + }; + +} diff --git a/pkgs/applications/networking/instant-messengers/telegram/telegram-qml/default.nix b/pkgs/applications/networking/instant-messengers/telegram/telegram-qml/default.nix new file mode 100644 index 000000000000..709dce5e755e --- /dev/null +++ b/pkgs/applications/networking/instant-messengers/telegram/telegram-qml/default.nix @@ -0,0 +1,35 @@ +{ stdenv, fetchFromGitHub +, qt5Libs, qtbase, qtmultimedia, qtquick1 +, libqtelegram-aseman-edition }: + +stdenv.mkDerivation rec { + name = "telegram-qml-v${version}"; + version = "0.9.1-stable"; + + src = fetchFromGitHub { + owner = "Aseman-Land"; + repo = "TelegramQML"; + rev = "v${version}"; + sha256 = "077j06lfr6qccqv664hn0ln023xlh5cfm50kapjc2inapxj2yqmn"; + }; + + buildInputs = [ qtbase qtmultimedia qtquick1 libqtelegram-aseman-edition ]; + enableParallelBuild = true; + + patchPhase = '' + substituteInPlace telegramqml.pro --replace "/\$\$LIB_PATH" "" + substituteInPlace telegramqml.pro --replace "INSTALL_HEADERS_PREFIX/telegramqml" "INSTALL_HEADERS_PREFIX" + ''; + + configurePhase = '' + qmake -r PREFIX=$out BUILD_MODE+=lib + ''; + + meta = with stdenv.lib; { + description = "Telegram API tools for QtQml and Qml"; + homepage = src.meta.homepage; + license = stdenv.lib.licenses.gpl3; + maintainer = [ maintainers.profpatsch ]; + }; + +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 11f433b7b060..9be86ed7a77c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11298,6 +11298,14 @@ let cutecom = callPackage ../tools/misc/cutecom { }; + cutegram = + let f = ../applications/networking/instant-messengers/telegram; + cp = qt5Libs.callPackage; + in cp "${f}/cutegram" rec { + libqtelegram-aseman-edition = cp "${f}/libqtelegram-aseman-edition" { }; + telegram-qml = cp "${f}/telegram-qml" { inherit libqtelegram-aseman-edition; }; + }; + cvs = callPackage ../applications/version-management/cvs { }; cvsps = callPackage ../applications/version-management/cvsps { };