kde-telepathy-0.4.0, tweak update script etc.

svn path=/nixpkgs/trunk/; revision=34493
This commit is contained in:
Yury G. Kudryashov 2012-06-13 07:09:15 +00:00
parent c6d9ead047
commit 28aabd6311
3 changed files with 68 additions and 48 deletions

View file

@ -0,0 +1,16 @@
[
{name="ktp-accounts-kcm";key="accounts_kcm";sha256="1a312cfm1i8ipqp0r09zfhlk7vacp006pbhwwvyf0sgracizr0cp";}
{name="ktp-approver";key="approver";sha256="0wfpwlk5f3n37xl619jzjxmgrq81qnr9kg9m955zbcad2jsx3z35";}
{name="ktp-auth-handler";key="auth_handler";sha256="1q5jjj3np3kg7py28jb74q8lpi6camw7907950igpnwzbzmacxwa";}
{name="ktp-call-ui";key="call_ui";sha256="08k59q0gf6fq0mmz72akiqkldqy6grw1gs7jz44gzmr82jvaqjb3";}
{name="ktp-common-internals";key="common_internals";sha256="1cmil7wp6rgqzl0bciphqmvdzipm856c45kx2mzrk6n1vnl9l500";}
{name="ktp-contact-applet";key="contact_applet";sha256="1j42yqq06bkpfb4jgm88qqbwnz9538ys5aghyfg147jr50h9pk8k";}
{name="ktp-contact-list";key="contact_list";sha256="1ndpr2z99clmy8f7l8l6ws7bljmmqvfrb5f0nrym91lyvcdz7sb2";}
{name="ktp-contact-runner";key="contact_runner";sha256="1v8mcp8q1cfmxdg65qqh159q9pynz3pc3y0ycr6hn1nrgxncs48k";}
{name="ktp-filetransfer-handler";key="filetransfer_handler";sha256="0dj2if34wxajwylgfxwd5chvxk63lxmsq52sc039dsj9p174cp3y";}
{name="ktp-kded-integration-module";key="kded_integration_module";sha256="0p873h6cjdinfinfz1cggyw611v2gllmkvzczszxnl8q2hcprx96";}
{name="ktp-presence-applet";key="presence_applet";sha256="1y8yhbbjp9qgycn93lqd6ss7jln1hpxa0dnqgirijfjn15c20nfl";}
{name="ktp-send-file";key="send_file";sha256="0sacvda2xs5g7w2xca9p6z61f2w69sgw0g3sj2fazrsm0x7a0z0d";}
{name="ktp-text-ui";key="text_ui";sha256="1xsslwaisk90wa45rgps3500wl1fbxq4qp6njljf4qbysyw4wfdb";}
{name="telepathy-logger-qt";key="telepathy_logger_qt";sha256="1398iyb72grhwwi0idxdwj1qdi2s02cp2wvjv72wvv3vyfwb51kn";}
]

View file

@ -1,15 +1,34 @@
{ stdenv, fetchurl, fetchgit, telepathy_qt, kdelibs, gettext, pkgconfig
, qt_gstreamer }:
{ stdenv, fetchurl, fetchgit, telepathy_qt, kdelibs, kde_workspace, gettext, dbus_libs
, pkgconfigUpstream , qt_gstreamer, telepathy_glib, telepathy_logger, qjson, flex, bison }:
let
version = "0.3.1";
pkgconfig = pkgconfigUpstream;
version = "0.4.0";
manifest = import (./. + "/${version}.nix");
overrides = { };
overrides = {
telepathy_logger_qt = x : x // {
NIX_CFLAGS_COMPILE = "-I${dbus_libs}/include/dbus-1.0";
};
};
extraBuildInputs = {
auth_handler = [ qjson ];
call_ui = [ qt_gstreamer telepathy_glib ];
contact_applet = [ kde_workspace ];
telepathy_logger_qt = [ telepathy_logger qt_gstreamer ];
text_ui = [ ktp.telepathy_logger_qt qt_gstreamer telepathy_logger ];
};
extraBuildNativeInputs = {
telepathy_logger_qt = [ flex bison ];
};
ktpFun = { name, key, sha256 }:
{
name = key;
value = stdenv.mkDerivation (
(if builtins.hasAttr key overrides then builtins.getAttr key overrides else (x: x))
(stdenv.lib.attrByPath [ key ] (x : x) overrides)
{
name = "${name}-${version}";
@ -18,9 +37,10 @@ let
inherit sha256;
};
buildNativeInputs = [ gettext pkgconfig ];
buildNativeInputs = [ gettext pkgconfig ] ++ (stdenv.lib.attrByPath [ key ] [] extraBuildNativeInputs);
buildInputs = [ kdelibs telepathy_qt ]
++ stdenv.lib.optional (name != "ktp-common-internals") common_internals;
++ stdenv.lib.optional (name != "ktp-common-internals") ktp.common_internals
++ (stdenv.lib.attrByPath [ key ] [] extraBuildInputs);
meta = {
inherit (kdelibs.meta) platforms;
@ -30,26 +50,10 @@ let
);
};
stable = builtins.listToAttrs (map ktpFun manifest);
unstable = {
call_ui = stdenv.mkDerivation {
name = "ktp-call-ui-20120314";
src = fetchgit {
url = git://anongit.kde.org/ktp-call-ui;
rev = "3587166d1ace83b115e113853514a7acc04d9d86";
sha256 = "0yv386rqy4vkwmd38wvvsrbam59sbv5k2lwimv96kf93xgkp5g0l";
};
buildInputs = [ kdelibs telepathy_qt common_internals qt_gstreamer ];
buildNativeInputs = [ gettext pkgconfig ];
};
};
common_internals = pkgs.common_internals;
pkgs = unstable // stable;
ktp = builtins.listToAttrs (map ktpFun manifest);
in
pkgs // {
ktp // {
inherit version;
recurseForDerivations = true;
full = stdenv.lib.attrValues stable;
full = stdenv.lib.attrValues ktp;
}

View file

@ -1,38 +1,38 @@
#!/bin/sh
usage() {
echo "$0 version|directory"
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
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"
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
version=$1
directory=src-$version
download $version $directory
fi
packages=$(ls $directory/* | sed -e "s,$directory/ktp-\\(.*\\)-$version.*,\\1,")
packages=$(ls $directory/* | sed -e "s,$directory/\\(.*\\)-$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}\";}"
for name in $packages; do
hash=$(nix-hash --flat --type sha256 --base32 $directory/$name-$version.*)
key=${name#ktp-}
echo "{name=\"${name}\";key=\"${key//-/_}\";sha256=\"${hash}\";}"
done
echo "]"
echo "]"