From cddd413130b5f3fc7965b1f800743c2a7ed28e23 Mon Sep 17 00:00:00 2001 From: "Yury G. Kudryashov" Date: Wed, 14 Mar 2012 09:52:21 +0000 Subject: [PATCH] Add KDE-Telepathy It compiles but I haven't tried to run it. svn path=/nixpkgs/trunk/; revision=33063 --- .../telepathy/kde/0.3.0.nix | 13 +++++++ .../telepathy/kde/contact-applet-po.patch | 24 ++++++++++++ .../telepathy/kde/default.nix | 37 ++++++++++++++++++ .../telepathy/kde/presence-applet-po.patch | 24 ++++++++++++ .../telepathy/kde/update.sh | 38 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 6 files changed, 138 insertions(+) create mode 100644 pkgs/applications/networking/instant-messengers/telepathy/kde/0.3.0.nix create mode 100644 pkgs/applications/networking/instant-messengers/telepathy/kde/contact-applet-po.patch create mode 100644 pkgs/applications/networking/instant-messengers/telepathy/kde/default.nix create mode 100644 pkgs/applications/networking/instant-messengers/telepathy/kde/presence-applet-po.patch create mode 100755 pkgs/applications/networking/instant-messengers/telepathy/kde/update.sh diff --git a/pkgs/applications/networking/instant-messengers/telepathy/kde/0.3.0.nix b/pkgs/applications/networking/instant-messengers/telepathy/kde/0.3.0.nix new file mode 100644 index 00000000000..f2340415be7 --- /dev/null +++ b/pkgs/applications/networking/instant-messengers/telepathy/kde/0.3.0.nix @@ -0,0 +1,13 @@ +[ +{name="ktp-accounts-kcm";key="accounts_kcm";sha256="0i4x4z6w4l9ngx0j258p2vjmsnsdn8hckq7cfld1iliq6fxb1vwv";} +{name="ktp-approver";key="approver";sha256="0nj89jsina8b736sygxia8jmz6l81n6j0ffin8cpqbp9mczzpv9f";} +{name="ktp-auth-handler";key="auth_handler";sha256="1fggj8aa56m7ycwi4q44kfzlx6gfigk0zaq8lhms4wdhm6736fhs";} +{name="ktp-common-internals";key="common_internals";sha256="196f6gkfb3w11qdbamwvkq6hxk2zbdc3js53mh352yhmdyf3cya6";} +{name="ktp-contact-applet";key="contact_applet";sha256="1vhv78qcyna1r4lmzpixb2a0p973ywjyi1izy8jf1vfhy3kk28dw";} +{name="ktp-contact-list";key="contact_list";sha256="15gnm09j4g6ip7vgisayd3ixv2sryjazakzkfksxfkdxl3mgfzg3";} +{name="ktp-filetransfer-handler";key="filetransfer_handler";sha256="1mq48clrlqwbg08211pr7hm24kagjzd8zs287mk9xl2wbv70jgc1";} +{name="ktp-kded-integration-module";key="kded_integration_module";sha256="1p47dks5cvda4i8xhij01z1qmcv2vw27az0la15rhzqlf8kh4sam";} +{name="ktp-presence-applet";key="presence_applet";sha256="1npr59g42yxb67dnplingqa2paaxdw60p99kilbvw15chfbrh47r";} +{name="ktp-send-file";key="send_file";sha256="1961zh4b1bamjyqw3wkm2aclx5sbfbr84i3x7lvfr74vw6cky8mc";} +{name="ktp-text-ui";key="text_ui";sha256="184zyw6l779nkgpc5dx9lcmh543kmr4ay8cvm8vsnrsknn6p0dgp";} +] diff --git a/pkgs/applications/networking/instant-messengers/telepathy/kde/contact-applet-po.patch b/pkgs/applications/networking/instant-messengers/telepathy/kde/contact-applet-po.patch new file mode 100644 index 00000000000..6b73781af5c --- /dev/null +++ b/pkgs/applications/networking/instant-messengers/telepathy/kde/contact-applet-po.patch @@ -0,0 +1,24 @@ +commit eaf09e1242408ac8652ba3ffd1d698326e4b2360 +Author: Rohan Garg +Date: Wed Feb 8 00:19:19 2012 +0530 + + Do not use CMake 2.8 just yet + + CMake 2.8 has some scope issues which cause the pofile target to + interfere while building translations in the tarball releases. + Not requiring CMake 2.8 fixes the build issue. + + BUGS: 292593 293030 + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 0b34038..50e94f3 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,7 +1,5 @@ + project(ktp-contact-applet) + +-cmake_minimum_required(VERSION 2.8) +- + set(CMAKE_MODULE_PATH + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules" + ${CMAKE_MODULE_PATH} diff --git a/pkgs/applications/networking/instant-messengers/telepathy/kde/default.nix b/pkgs/applications/networking/instant-messengers/telepathy/kde/default.nix new file mode 100644 index 00000000000..45af35b9022 --- /dev/null +++ b/pkgs/applications/networking/instant-messengers/telepathy/kde/default.nix @@ -0,0 +1,37 @@ +{ stdenv, fetchurl, telepathy_qt, kdelibs, gettext, pkgconfig }: + +let + version = "0.3.0"; + manifest = import (./. + "/${version}.nix"); + overrides = { + presence_applet = x : (x // { patches = [ ./presence-applet-po.patch ]; }); + contact_applet = x: (x // { patches = [ ./contact-applet-po.patch ]; }); + }; + ktpFun = { name, key, sha256 }: + { + name = key; + value = stdenv.mkDerivation ( + (if builtins.hasAttr key overrides then builtins.getAttr key overrides else (x: x)) + { + name = "${name}-${version}"; + + src = fetchurl { + url = "mirror://kde/unstable/kde-telepathy/${version}/src/${name}-${version}.tar.bz2"; + inherit sha256; + }; + + buildNativeInputs = [ gettext pkgconfig ]; + buildInputs = [ kdelibs telepathy_qt ] + ++ stdenv.lib.optional (name != "ktp-common-internals") common_internals; + } + ); + }; + + pkgs = builtins.listToAttrs (map ktpFun manifest); + common_internals = pkgs.common_internals; +in +pkgs //{ + inherit version; + recurseForDerivations = true; + full = stdenv.lib.attrValues pkgs; +} diff --git a/pkgs/applications/networking/instant-messengers/telepathy/kde/presence-applet-po.patch b/pkgs/applications/networking/instant-messengers/telepathy/kde/presence-applet-po.patch new file mode 100644 index 00000000000..10d190a6294 --- /dev/null +++ b/pkgs/applications/networking/instant-messengers/telepathy/kde/presence-applet-po.patch @@ -0,0 +1,24 @@ +commit bf59d0488708eb57ca91a9b6d0ce8951b99ba778 +Author: Rohan Garg +Date: Wed Feb 8 01:19:42 2012 +0530 + + Do not use CMake 2.8 just yet + + CMake 2.8 has some scope issues which cause the pofile target to + interfere while building translations in the tarball releases. + Not requiring CMake 2.8 fixes the build issue. + + BUG: 292593 + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8e2c1de..80add26 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,7 +1,5 @@ + project(ktp-presence-applet) + +-cmake_minimum_required(VERSION 2.8) +- + set(CMAKE_MODULE_PATH + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules" + ${CMAKE_MODULE_PATH} diff --git a/pkgs/applications/networking/instant-messengers/telepathy/kde/update.sh b/pkgs/applications/networking/instant-messengers/telepathy/kde/update.sh new file mode 100755 index 00000000000..19a8e2053bf --- /dev/null +++ b/pkgs/applications/networking/instant-messengers/telepathy/kde/update.sh @@ -0,0 +1,38 @@ +#!/bin/sh + +usage() { + echo "$0 version|directory" +} + +download() { + URL=ftp://ftp.kde.org/pub/kde/unstable/kde-telepathy/$1/src + destdir=$2 + if test -n "$KDE_FULL_SESSION"; then + kioclient copy $URL $destdir + else + mkdir $destdir + lftp -c "open $URL; lcd $destdir; mget -c *" + fi +} + +if [[ -d $1 ]]; then + directory=$1 + version=$(ls $directory/* | head -n1 | + sed -e "s,$directory/[^0-9.]*\\([0-9.]\\+\\)\\.tar.*,\\1,") + echo "Version $version" +else + version=$1 + directory=src-$version + download $version $directory +fi + +packages=$(ls $directory/* | sed -e "s,$directory/ktp-\\(.*\\)-$version.*,\\1,") +echo $packages +exec >$version.nix +echo "[" +for pkg in $packages; do + hash=$(nix-hash --flat --type sha256 --base32 $directory/ktp-$pkg-$version.*) + echo "{name=\"ktp-${pkg}\";key=\"${pkg//-/_}\";sha256=\"${hash}\";}" +done +echo "]" + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7c3887d8991..297f8228cb8 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8129,6 +8129,8 @@ let skrooge = callPackage ../applications/office/skrooge { }; + telepathy = callPackage ../applications/networking/instant-messengers/telepathy/kde {}; + yakuake = callPackage ../applications/misc/yakuake { }; zanshin = callPackage ../applications/office/zanshin { };