43 # Please keep the version x.y.0.z and do not update to x.y.76.z because the
44 # source of the latter disappears much faster.
45 version = "8.129.0.202";
99 + ":${stdenv.cc.cc.lib}/lib64";
102 if stdenv.hostPlatform.system == "x86_64-linux" then
104 name = "skypeforlinux-${version}-${revision}.snap";
105 url = "https://api.snapcraft.io/api/v1/snaps/download/QRDEfjn4WJYnm0FzDKwqqRZZI77awQEV_${revision}.snap";
106 hash = "sha512-pxLh/dU/RK1H5gjFLB0V4mVddgQkO8ZcJowpNNihECsLaELgoeXmWXflhYFs2G7fdEzNMeujuc4/ZoGCFSZCvw==";
109 throw "Skype for linux is not supported on ${stdenv.hostPlatform.system}";
112 stdenv.mkDerivation {
113 pname = "skypeforlinux";
114 inherit version revision;
116 system = "x86_64-linux";
120 nativeBuildInputs = [
122 glib # For setup hook populating GSETTINGS_SCHEMA_PATH
125 buildInputs = [ squashfsTools ];
130 unsquashfs "$src" '/meta/gui/*.desktop' \
131 /usr/share/{doc/skypeforlinux,'icons/hicolor/*/apps/skypeforlinux.png',kservices5,pixmaps,skypeforlinux}
132 sourceRoot=squashfs-root
141 mv meta/gui usr/share/applications
143 ln -s "$out/share/skypeforlinux/skypeforlinux" "$out/bin"
149 for file in $(find $out -type f \( -perm /0111 -o -name \*.so\* -or -name \*.node\* \) ); do
150 patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$file" || true
151 patchelf --set-rpath ${rpath}:$out/share/skypeforlinux $file || true
154 # Fix the desktop link
155 substituteInPlace "$out/share/applications/"*.desktop \
156 --replace-fail 'Exec=skype ' 'Exec=skypeforlinux ' \
157 --replace-fail 'Icon=''${SNAP}/meta/gui/skypeforlinux.png' 'Icon=skypeforlinux'
158 substituteInPlace "$out/share/kservices5/ServiceMenus/skypeforlinux.desktop" \
159 --replace-fail 'Exec=/usr/bin/skypeforlinux ' 'Exec=skypeforlinux '
162 passthru.updateScript = writeScript "update-skypeforlinux" ''
163 #!/usr/bin/env nix-shell
164 #!nix-shell -i bash -p common-updater-scripts curl jq
168 data=$(curl -H 'X-Ubuntu-Series: 16' \
169 'https://api.snapcraft.io/api/v1/snaps/details/skype?channel=stable&fields=download_sha512,revision,version')
171 version=$(jq -r .version <<<"$data")
173 if [[ "x$UPDATE_NIX_OLD_VERSION" != "x$version" ]]; then
175 revision=$(jq -r .revision <<<"$data")
176 hash=$(nix hash to-sri "sha512:$(jq -r .download_sha512 <<<"$data")")
178 update-source-version "$UPDATE_NIX_ATTR_PATH" "$version" "$hash"
179 update-source-version --ignore-same-hash --version-key=revision "$UPDATE_NIX_ATTR_PATH" "$revision" "$hash"
185 description = "Linux client for Skype";
186 homepage = "https://www.skype.com";
187 changelog = "https://support.microsoft.com/en-us/skype/what-s-new-in-skype-for-windows-mac-linux-and-web-d32f674c-abb3-40a5-a0b7-ee269ca60831";
188 sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
189 license = lib.licenses.unfree;
190 maintainers = [ lib.maintainers.mjoerg ];
191 platforms = [ "x86_64-linux" ];
192 mainProgram = "skypeforlinux";