2018-08-07 14:36:26 +01:00
|
|
|
{ stdenv, fetchurl, dpkg
|
2018-07-09 23:34:32 +01:00
|
|
|
, alsaLib, atk, cairo, cups, curl, dbus, expat, fontconfig, freetype, gdk_pixbuf, glib, glibc, gnome2, gnome3
|
2018-08-07 14:36:26 +01:00
|
|
|
, gtk3, libnotify, libpulseaudio, libsecret, libv4l, nspr, nss, pango, systemd, wrapGAppsHook, xorg }:
|
2017-04-23 16:22:59 +01:00
|
|
|
|
|
|
|
let
|
|
|
|
|
2017-12-14 21:36:52 +00:00
|
|
|
# Please keep the version x.y.0.z and do not update to x.y.76.z because the
|
|
|
|
# source of the latter disappears much faster.
|
2018-08-18 03:14:25 +01:00
|
|
|
version = "8.28.0.41";
|
2017-04-23 16:22:59 +01:00
|
|
|
|
|
|
|
rpath = stdenv.lib.makeLibraryPath [
|
|
|
|
alsaLib
|
|
|
|
atk
|
|
|
|
cairo
|
|
|
|
cups
|
|
|
|
curl
|
|
|
|
dbus
|
|
|
|
expat
|
|
|
|
fontconfig
|
|
|
|
freetype
|
|
|
|
glib
|
2017-09-08 17:05:44 +01:00
|
|
|
glibc
|
2017-11-10 04:12:57 +00:00
|
|
|
libsecret
|
2017-04-23 16:22:59 +01:00
|
|
|
|
2018-07-09 23:34:32 +01:00
|
|
|
gnome2.GConf
|
2018-05-29 20:54:42 +01:00
|
|
|
gdk_pixbuf
|
2018-06-20 17:15:44 +01:00
|
|
|
gtk3
|
2017-04-23 16:22:59 +01:00
|
|
|
|
2018-05-29 20:54:42 +01:00
|
|
|
gnome3.gnome-keyring
|
2017-06-03 18:52:20 +01:00
|
|
|
|
2017-04-23 16:22:59 +01:00
|
|
|
libnotify
|
2017-11-10 04:12:57 +00:00
|
|
|
libpulseaudio
|
2017-04-23 16:22:59 +01:00
|
|
|
nspr
|
|
|
|
nss
|
2018-05-29 20:54:42 +01:00
|
|
|
pango
|
2017-04-23 16:22:59 +01:00
|
|
|
stdenv.cc.cc
|
|
|
|
systemd
|
2017-09-08 17:05:44 +01:00
|
|
|
libv4l
|
2017-04-23 16:22:59 +01:00
|
|
|
|
|
|
|
xorg.libxkbfile
|
|
|
|
xorg.libX11
|
|
|
|
xorg.libXcomposite
|
|
|
|
xorg.libXcursor
|
|
|
|
xorg.libXdamage
|
|
|
|
xorg.libXext
|
|
|
|
xorg.libXfixes
|
|
|
|
xorg.libXi
|
|
|
|
xorg.libXrandr
|
|
|
|
xorg.libXrender
|
|
|
|
xorg.libXtst
|
|
|
|
xorg.libXScrnSaver
|
|
|
|
xorg.libxcb
|
|
|
|
] + ":${stdenv.cc.cc.lib}/lib64";
|
|
|
|
|
|
|
|
src =
|
2018-08-20 20:11:29 +01:00
|
|
|
if stdenv.hostPlatform.system == "x86_64-linux" then
|
2017-04-23 16:22:59 +01:00
|
|
|
fetchurl {
|
2017-06-03 18:52:20 +01:00
|
|
|
url = "https://repo.skype.com/deb/pool/main/s/skypeforlinux/skypeforlinux_${version}_amd64.deb";
|
2018-08-18 03:14:25 +01:00
|
|
|
sha256 = "1kydf71qbz35dx4674h3nxfx8a88k620217906i54ic4qq2mgy2x";
|
2017-04-23 16:22:59 +01:00
|
|
|
}
|
|
|
|
else
|
2018-08-20 20:11:29 +01:00
|
|
|
throw "Skype for linux is not supported on ${stdenv.hostPlatform.system}";
|
2017-04-23 16:22:59 +01:00
|
|
|
|
|
|
|
in stdenv.mkDerivation {
|
|
|
|
name = "skypeforlinux-${version}";
|
|
|
|
|
|
|
|
system = "x86_64-linux";
|
|
|
|
|
|
|
|
inherit src;
|
|
|
|
|
2018-08-07 14:36:26 +01:00
|
|
|
nativeBuildInputs = [
|
|
|
|
wrapGAppsHook
|
|
|
|
glib # For setup hook populating GSETTINGS_SCHEMA_PATH
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [ dpkg ];
|
2017-04-23 16:22:59 +01:00
|
|
|
|
|
|
|
unpackPhase = "true";
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out
|
|
|
|
dpkg -x $src $out
|
|
|
|
cp -av $out/usr/* $out
|
|
|
|
rm -rf $out/opt $out/usr
|
|
|
|
rm $out/bin/skypeforlinux
|
|
|
|
|
2018-08-19 14:06:43 +01:00
|
|
|
ln -s "$out/share/skypeforlinux/skypeforlinux" "$out/bin/skypeforlinux"
|
|
|
|
|
2017-04-23 16:22:59 +01:00
|
|
|
# Otherwise it looks "suspicious"
|
|
|
|
chmod -R g-w $out
|
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup = ''
|
2017-09-08 17:05:44 +01:00
|
|
|
for file in $(find $out -type f \( -perm /0111 -o -name \*.so\* -or -name \*.node\* \) ); do
|
2017-11-10 04:12:57 +00:00
|
|
|
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$file" || true
|
|
|
|
patchelf --set-rpath ${rpath}:$out/share/skypeforlinux $file || true
|
2017-09-08 17:05:44 +01:00
|
|
|
done
|
2017-04-23 16:22:59 +01:00
|
|
|
|
|
|
|
# Fix the desktop link
|
|
|
|
substituteInPlace $out/share/applications/skypeforlinux.desktop \
|
|
|
|
--replace /usr/bin/ $out/bin/ \
|
|
|
|
--replace /usr/share/ $out/share/
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Linux client for skype";
|
2017-08-01 21:03:30 +01:00
|
|
|
homepage = https://www.skype.com;
|
2017-04-23 16:22:59 +01:00
|
|
|
license = licenses.unfree;
|
2017-11-10 04:12:57 +00:00
|
|
|
maintainers = with stdenv.lib.maintainers; [ panaeon jraygauthier ];
|
2017-04-23 16:22:59 +01:00
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
};
|
|
|
|
}
|