2011-08-02 17:55:55 +02:00
|
|
|
{ stdenv, fetchurl, alsaLib, libXv, libXi, libXrender, libXrandr, zlib, glib
|
|
|
|
, libXext, libX11, libXScrnSaver, libSM, qt4, libICE, freetype, fontconfig
|
2012-02-01 23:09:35 +01:00
|
|
|
, pulseaudio, usePulseAudio, lib }:
|
2010-02-13 00:19:37 +01:00
|
|
|
|
|
|
|
assert stdenv.system == "i686-linux";
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2012-06-18 14:39:44 +02:00
|
|
|
name = "skype-4.0.0.7";
|
2007-09-12 09:26:37 +02:00
|
|
|
|
2008-01-30 18:20:48 +01:00
|
|
|
src = fetchurl {
|
2010-02-13 00:19:37 +01:00
|
|
|
url = "http://download.skype.com/linux/${name}.tar.bz2";
|
2012-06-18 14:39:44 +02:00
|
|
|
sha256 = "0mrswawqsv53mfghqlj1bzq0jfswha6b0c06px7snd85pd4gn5fn";
|
2007-09-12 09:26:37 +02:00
|
|
|
};
|
|
|
|
|
2012-02-01 23:09:35 +01:00
|
|
|
buildInputs =
|
|
|
|
lib.optional usePulseAudio pulseaudio ++ [
|
2011-08-02 17:55:55 +02:00
|
|
|
alsaLib
|
2010-02-13 00:19:37 +01:00
|
|
|
stdenv.glibc
|
|
|
|
stdenv.gcc.gcc
|
2009-01-12 22:12:07 +01:00
|
|
|
libXv
|
2008-03-10 14:09:47 +01:00
|
|
|
libXext
|
|
|
|
libX11
|
2010-08-11 15:25:30 +02:00
|
|
|
qt4
|
2010-02-13 00:19:37 +01:00
|
|
|
libXScrnSaver
|
|
|
|
libSM
|
|
|
|
libICE
|
|
|
|
libXi
|
|
|
|
libXrender
|
|
|
|
libXrandr
|
|
|
|
freetype
|
|
|
|
fontconfig
|
|
|
|
zlib
|
|
|
|
glib
|
2008-03-10 14:09:47 +01:00
|
|
|
];
|
2007-09-12 09:26:37 +02:00
|
|
|
|
2008-03-10 14:09:47 +01:00
|
|
|
phases = "unpackPhase installPhase";
|
2007-09-12 09:26:37 +02:00
|
|
|
|
2010-02-13 00:19:37 +01:00
|
|
|
installPhase = ''
|
2012-01-18 21:16:00 +01:00
|
|
|
mkdir -p $out/{opt/skype/,bin}
|
2010-02-13 00:19:37 +01:00
|
|
|
cp -r * $out/opt/skype/
|
|
|
|
|
|
|
|
fullPath=
|
|
|
|
for i in $buildNativeInputs; do
|
|
|
|
fullPath=$fullPath''${fullPath:+:}$i/lib
|
|
|
|
done
|
2007-09-12 09:26:37 +02:00
|
|
|
|
2010-02-13 00:19:37 +01:00
|
|
|
dynlinker="$(cat $NIX_GCC/nix-support/dynamic-linker)"
|
2007-09-12 09:26:37 +02:00
|
|
|
|
2010-02-13 00:19:37 +01:00
|
|
|
cat > $out/bin/skype << EOF
|
|
|
|
#!${stdenv.shell}
|
|
|
|
export LD_LIBRARY_PATH=$fullPath:$LD_LIBRARY_PATH
|
|
|
|
$dynlinker $out/opt/skype/skype --resources=$out/opt/skype "\$@"
|
|
|
|
EOF
|
|
|
|
|
|
|
|
chmod +x $out/bin/skype
|
2012-01-13 23:21:48 +01:00
|
|
|
|
|
|
|
# Desktop icon for Skype
|
|
|
|
patch skype.desktop << EOF
|
|
|
|
5c5
|
|
|
|
< Icon=skype.png
|
|
|
|
---
|
|
|
|
> Icon=$out/opt/skype/icons/SkypeBlue_48x48.png
|
|
|
|
EOF
|
2012-01-18 21:16:00 +01:00
|
|
|
mkdir -p $out/share/applications
|
2012-01-13 23:21:48 +01:00
|
|
|
mv skype.desktop $out/share/applications
|
2010-02-13 00:19:37 +01:00
|
|
|
'';
|
2007-09-12 09:26:37 +02:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "A P2P-VoiceIP client";
|
|
|
|
homepage = http://www.skype.com;
|
|
|
|
license = "skype-eula";
|
|
|
|
};
|
2010-02-13 00:19:37 +01:00
|
|
|
}
|