Skip to content

Instantly share code, notes, and snippets.

@Profpatsch
Last active December 13, 2015 00:24
Show Gist options
  • Save Profpatsch/55daeb53d5c77c6c9840 to your computer and use it in GitHub Desktop.
Save Profpatsch/55daeb53d5c77c6c9840 to your computer and use it in GitHub Desktop.
QT packaging
cutegram =
let f = ../applications/networking/instant-messengers/telegram;
cp = qt5Libs.callPackage;
# templorary all three packages in attrset, for bettor debugging
# in cp "${f}/cutegram" rec {
in rec {
cutegram = cp "${f}/cutegram" {inherit libqtelegram-aseman-edition telegram-qml;};
libqtelegram-aseman-edition = cp "${f}/libqtelegram-aseman-edition" { };
telegram-qml = cp "${f}/telegram-qml" { inherit libqtelegram-aseman-edition; };
};
{ stdenv, fetchFromGitHub
, qt5Libs, qtbase, qtquick1, qtmultimedia, makeQtWrapper
, telegram-qml, libqtelegram-aseman-edition }:
stdenv.mkDerivation rec {
name = "cutegram-${version}";
version = "v2.7.0-stable";
src = fetchFromGitHub {
owner = "Aseman-Land";
repo = "Cutegram";
rev = version;
sha256 = "0qhy30gb8zdrphz1b7zcnv8hmm5fd5qwlvrg7wpsh3hk5niz3zxk";
};
# TODO appindicator, for system tray plugin
buildInputs = [ qtbase qtquick1 qtmultimedia telegram-qml libqtelegram-aseman-edition ];
nativeBuildInputs = [ makeQtWrapper ];
enableParallelBuild = true;
fixupPhase = "wrapQtProgram $out/bin/cutegram";
configurePhase = "qmake -r PREFIX=$out";
}
QQmlComponent: Component is not ready
"file:///nix/store/4l928x2qa09zplqkgwmzfxf25883lj8v-cutegram-v2.7.0-stable/share/cutegram/themes/Abrisham.qml:26 Type AsemanStyles.SpinBoxStyle unavailable\nqrc://///asemantools/qml/AsemanTools/Controls/Styles/Desktop/SpinBoxStyle.qml:2 module \"QtQuick.Controls.Styles\" is not installed\nqrc://///asemantools/qml/AsemanTools/Controls/Styles/Desktop/SpinBoxStyle.qml:3 module \"QtGraphicalEffects\" is not installed\nqrc://///asemantools/qml/AsemanTools/Controls/Styles/Desktop/SpinBoxStyle.qml:2 module \"QtQuick.Controls.Styles\" is not installed\nqrc://///asemantools/qml/AsemanTools/Controls/Styles/Desktop/SpinBoxStyle.qml:3 module \"QtGraphicalEffects\" is not installed\n"
qrc:/qml/Cutegram/main.qml:5:1: module "QtGraphicalEffects" is not installed
qrc:/qml/Cutegram/main.qml:4:1: module "QtQuick.Controls" is not installed
qrc:/qml/Cutegram/main.qml:5:1: module "QtGraphicalEffects" is not installed
qrc:/qml/Cutegram/main.qml:4:1: module "QtQuick.Controls" is not installed
{ stdenv, fetchFromGitHub
, qtbase, qtmultimedia, qtquick1 }:
stdenv.mkDerivation rec {
name = "libqtelegram-aseman-edition-${version}";
version = "v6.0";
src = fetchFromGitHub {
owner = "Aseman-Land";
repo = "libqtelegram-aseman-edition";
rev = 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 = {
description = "A fork of libqtelegram by Aseman Team which is porting to windows and mac alongside linux support. It's also build using qmake instead of cmake.";
license = stdenv.lib.licenses.gpl3;
};
}
{ stdenv, fetchFromGitHub
, qt5Libs, qtbase, qtmultimedia, qtquick1
, libqtelegram-aseman-edition }:
stdenv.mkDerivation rec {
name = "telegram-qml-${version}";
version = "v0.9.1-stable";
src = fetchFromGitHub {
owner = "Aseman-Land";
repo = "TelegramQML";
rev = 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 = {
description = "Telegram API tools for QtQml and Qml. It's based on Cutegram-Core and libqtelegram.";
license = stdenv.lib.licenses.gpl3;
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment