2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchurl, dpkg
|
2022-02-11 14:07:57 +00:00
|
|
|
, alsa-lib, atk, cairo, cups, curl, dbus, expat, fontconfig, freetype, gdk-pixbuf, glib, glibc, gnome
|
2020-03-18 07:09:40 +00:00
|
|
|
, gtk3, libappindicator-gtk3, libnotify, libpulseaudio, libsecret, libv4l, nspr, nss, pango, systemd, wrapGAppsHook, xorg
|
2021-08-31 12:31:46 +00:00
|
|
|
, at-spi2-atk, libuuid, at-spi2-core, libdrm, mesa, libxkbcommon, libxshmfence }:
|
2017-04-23 15:22:59 +00: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.
|
2022-08-16 22:36:20 +00:00
|
|
|
version = "8.87.0.406";
|
2017-04-23 15:22:59 +00:00
|
|
|
|
2021-01-15 05:42:41 +00:00
|
|
|
rpath = lib.makeLibraryPath [
|
2021-06-10 02:57:09 +00:00
|
|
|
alsa-lib
|
2017-04-23 15:22:59 +00:00
|
|
|
atk
|
2019-04-03 04:42:11 +00:00
|
|
|
at-spi2-atk
|
2019-08-22 21:16:00 +00:00
|
|
|
at-spi2-core
|
2017-04-23 15:22:59 +00:00
|
|
|
cairo
|
|
|
|
cups
|
|
|
|
curl
|
|
|
|
dbus
|
|
|
|
expat
|
|
|
|
fontconfig
|
|
|
|
freetype
|
|
|
|
glib
|
2017-09-08 16:05:44 +00:00
|
|
|
glibc
|
2017-11-10 04:12:57 +00:00
|
|
|
libsecret
|
2019-08-22 21:16:00 +00:00
|
|
|
libuuid
|
2017-04-23 15:22:59 +00:00
|
|
|
|
2019-05-22 11:03:39 +00:00
|
|
|
gdk-pixbuf
|
2018-06-20 16:15:44 +00:00
|
|
|
gtk3
|
2020-03-18 07:09:40 +00:00
|
|
|
libappindicator-gtk3
|
2017-04-23 15:22:59 +00:00
|
|
|
|
2021-05-07 21:18:14 +00:00
|
|
|
gnome.gnome-keyring
|
2017-06-03 17:52:20 +00:00
|
|
|
|
2017-04-23 15:22:59 +00:00
|
|
|
libnotify
|
2017-11-10 04:12:57 +00:00
|
|
|
libpulseaudio
|
2017-04-23 15:22:59 +00:00
|
|
|
nspr
|
|
|
|
nss
|
2018-05-29 19:54:42 +00:00
|
|
|
pango
|
2017-04-23 15:22:59 +00:00
|
|
|
stdenv.cc.cc
|
|
|
|
systemd
|
|
|
|
|
2021-03-19 22:31:48 +00:00
|
|
|
libv4l
|
|
|
|
libdrm
|
|
|
|
mesa
|
|
|
|
libxkbcommon
|
2021-08-31 12:31:46 +00:00
|
|
|
libxshmfence
|
2017-04-23 15:22:59 +00: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 19:11:29 +00:00
|
|
|
if stdenv.hostPlatform.system == "x86_64-linux" then
|
2017-04-23 15:22:59 +00:00
|
|
|
fetchurl {
|
2019-11-19 16:25:31 +00:00
|
|
|
urls = [
|
|
|
|
"https://repo.skype.com/deb/pool/main/s/skypeforlinux/skypeforlinux_${version}_amd64.deb"
|
2020-04-28 20:48:35 +00:00
|
|
|
"https://mirror.cs.uchicago.edu/skype/pool/main/s/skypeforlinux/skypeforlinux_${version}_amd64.deb"
|
2019-11-19 16:25:31 +00:00
|
|
|
"https://web.archive.org/web/https://repo.skype.com/deb/pool/main/s/skypeforlinux/skypeforlinux_${version}_amd64.deb"
|
|
|
|
];
|
2022-08-16 22:36:20 +00:00
|
|
|
sha256 = "sha256-lWnQIdMmfz90h3tOWkQv0vo3HnRi3z6W27vK28+Ksjo=";
|
2017-04-23 15:22:59 +00:00
|
|
|
}
|
|
|
|
else
|
2018-08-20 19:11:29 +00:00
|
|
|
throw "Skype for linux is not supported on ${stdenv.hostPlatform.system}";
|
2017-04-23 15:22:59 +00:00
|
|
|
|
|
|
|
in stdenv.mkDerivation {
|
2019-08-13 21:52:01 +00:00
|
|
|
pname = "skypeforlinux";
|
|
|
|
inherit version;
|
2017-04-23 15:22:59 +00:00
|
|
|
|
|
|
|
system = "x86_64-linux";
|
|
|
|
|
|
|
|
inherit src;
|
|
|
|
|
2018-08-07 13:36:26 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
wrapGAppsHook
|
|
|
|
glib # For setup hook populating GSETTINGS_SCHEMA_PATH
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [ dpkg ];
|
2017-04-23 15:22:59 +00:00
|
|
|
|
2019-06-19 15:45:34 +00:00
|
|
|
dontUnpack = true;
|
2017-04-23 15:22:59 +00:00
|
|
|
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 13:06:43 +00:00
|
|
|
ln -s "$out/share/skypeforlinux/skypeforlinux" "$out/bin/skypeforlinux"
|
|
|
|
|
2017-04-23 15:22:59 +00:00
|
|
|
# Otherwise it looks "suspicious"
|
|
|
|
chmod -R g-w $out
|
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup = ''
|
2017-09-08 16:05:44 +00: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 16:05:44 +00:00
|
|
|
done
|
2017-04-23 15:22:59 +00:00
|
|
|
|
|
|
|
# Fix the desktop link
|
|
|
|
substituteInPlace $out/share/applications/skypeforlinux.desktop \
|
2022-10-29 21:39:29 +00:00
|
|
|
--replace /usr/bin/ ""
|
2020-12-27 21:50:41 +00:00
|
|
|
substituteInPlace $out/share/applications/skypeforlinux-share.desktop \
|
2022-10-29 21:39:29 +00:00
|
|
|
--replace /usr/bin/ ""
|
2020-12-27 21:50:41 +00:00
|
|
|
substituteInPlace $out/share/kservices5/ServiceMenus/skypeforlinux.desktop \
|
2022-10-29 21:39:29 +00:00
|
|
|
--replace /usr/bin/ ""
|
2017-04-23 15:22:59 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2017-04-23 15:22:59 +00:00
|
|
|
description = "Linux client for skype";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://www.skype.com";
|
2022-06-04 22:19:25 +00:00
|
|
|
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
2017-04-23 15:22:59 +00:00
|
|
|
license = licenses.unfree;
|
2021-08-31 12:31:46 +00:00
|
|
|
maintainers = with maintainers; [ panaeon jraygauthier ];
|
2017-04-23 15:22:59 +00:00
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
};
|
|
|
|
}
|