3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/networking/instant-messengers/skypeforlinux/default.nix

128 lines
3.2 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchurl, dpkg
, alsaLib, atk, cairo, cups, curl, dbus, expat, fontconfig, freetype, gdk-pixbuf, glib, glibc, gnome2, gnome
, gtk3, libappindicator-gtk3, libnotify, libpulseaudio, libsecret, libv4l, nspr, nss, pango, systemd, wrapGAppsHook, xorg
2021-03-19 22:31:48 +00:00
, at-spi2-atk, libuuid, at-spi2-core, libdrm, mesa, libxkbcommon }:
let
# 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.
2021-03-19 22:31:48 +00:00
version = "8.69.0.77";
2021-01-15 05:42:41 +00:00
rpath = lib.makeLibraryPath [
alsaLib
atk
at-spi2-atk
at-spi2-core
cairo
cups
curl
dbus
expat
fontconfig
freetype
glib
glibc
2017-11-10 04:12:57 +00:00
libsecret
libuuid
2018-07-09 23:34:32 +01:00
gnome2.GConf
2019-05-22 12:03:39 +01:00
gdk-pixbuf
2018-06-20 17:15:44 +01:00
gtk3
libappindicator-gtk3
gnome.gnome-keyring
2017-06-03 18:52:20 +01:00
libnotify
2017-11-10 04:12:57 +00:00
libpulseaudio
nspr
nss
pango
stdenv.cc.cc
systemd
2021-03-19 22:31:48 +00:00
libv4l
libdrm
mesa
libxkbcommon
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 =
if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl {
urls = [
"https://repo.skype.com/deb/pool/main/s/skypeforlinux/skypeforlinux_${version}_amd64.deb"
"https://mirror.cs.uchicago.edu/skype/pool/main/s/skypeforlinux/skypeforlinux_${version}_amd64.deb"
"https://web.archive.org/web/https://repo.skype.com/deb/pool/main/s/skypeforlinux/skypeforlinux_${version}_amd64.deb"
];
2021-03-19 22:31:48 +00:00
sha256 = "PaqlPp+BRS0cH7XI4x1/5HqYti63rQThmTtPaghIQH0=";
}
else
throw "Skype for linux is not supported on ${stdenv.hostPlatform.system}";
in stdenv.mkDerivation {
2019-08-13 22:52:01 +01:00
pname = "skypeforlinux";
inherit version;
system = "x86_64-linux";
inherit src;
nativeBuildInputs = [
wrapGAppsHook
glib # For setup hook populating GSETTINGS_SCHEMA_PATH
];
buildInputs = [ dpkg ];
2019-06-19 16:45:34 +01:00
dontUnpack = true;
installPhase = ''
mkdir -p $out
dpkg -x $src $out
cp -av $out/usr/* $out
rm -rf $out/opt $out/usr
rm $out/bin/skypeforlinux
ln -s "$out/share/skypeforlinux/skypeforlinux" "$out/bin/skypeforlinux"
# Otherwise it looks "suspicious"
chmod -R g-w $out
'';
postFixup = ''
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
done
# Fix the desktop link
substituteInPlace $out/share/applications/skypeforlinux.desktop \
--replace /usr/bin/ $out/bin/
substituteInPlace $out/share/applications/skypeforlinux-share.desktop \
--replace /usr/bin/ $out/bin/
substituteInPlace $out/share/kservices5/ServiceMenus/skypeforlinux.desktop \
--replace /usr/bin/ $out/bin/
'';
meta = with lib; {
description = "Linux client for skype";
homepage = "https://www.skype.com";
license = licenses.unfree;
2021-01-15 05:42:41 +00:00
maintainers = with lib.maintainers; [ panaeon jraygauthier ];
platforms = [ "x86_64-linux" ];
};
}