2018-08-27 18:03:42 +02:00
|
|
|
{ stdenv, fetchurl, rpmextract, autoPatchelfHook
|
2019-12-21 11:11:49 +01:00
|
|
|
, xorg, gtk3, gnome2, nss, alsaLib, udev, libnotify
|
|
|
|
, wrapGAppsHook }:
|
2018-08-27 18:03:42 +02:00
|
|
|
|
|
|
|
let
|
2020-02-26 17:32:13 +01:00
|
|
|
version = "5.0.1";
|
2018-08-27 18:03:42 +02:00
|
|
|
in stdenv.mkDerivation {
|
2019-08-13 23:52:01 +02:00
|
|
|
pname = "vk-messenger";
|
|
|
|
inherit version;
|
2018-08-27 18:03:42 +02:00
|
|
|
src = {
|
|
|
|
i686-linux = fetchurl {
|
|
|
|
url = "https://desktop.userapi.com/rpm/master/vk-${version}.i686.rpm";
|
2020-02-26 17:32:13 +01:00
|
|
|
sha256 = "1ji23x13lzbkiqfrrwx1pj6gmms0p58cjmjc0y4g16kqhlxl60v6";
|
2018-08-27 18:03:42 +02:00
|
|
|
};
|
|
|
|
x86_64-linux = fetchurl {
|
|
|
|
url = "https://desktop.userapi.com/rpm/master/vk-${version}.x86_64.rpm";
|
2020-02-26 17:32:13 +01:00
|
|
|
sha256 = "01vvmia2qrxvrvavk9hkkyvfg4pg15m01grwb28884vy4nqw400y";
|
2018-08-27 18:03:42 +02:00
|
|
|
};
|
|
|
|
}.${stdenv.system} or (throw "Unsupported system: ${stdenv.system}");
|
|
|
|
|
2019-12-21 11:11:49 +01:00
|
|
|
nativeBuildInputs = [ rpmextract autoPatchelfHook wrapGAppsHook ];
|
2018-08-27 18:03:42 +02:00
|
|
|
buildInputs = (with xorg; [
|
|
|
|
libXdamage libXtst libXScrnSaver libxkbfile
|
|
|
|
]) ++ [
|
2019-10-26 12:36:51 +02:00
|
|
|
gtk3 nss alsaLib
|
2018-08-27 18:03:42 +02:00
|
|
|
];
|
|
|
|
runtimeDependencies = [ udev.lib libnotify ];
|
|
|
|
|
|
|
|
unpackPhase = ''
|
|
|
|
rpmextract $src
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
substituteInPlace usr/share/applications/vk.desktop \
|
|
|
|
--replace /usr/share/pixmaps/vk.png vk
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir $out
|
|
|
|
cd usr
|
|
|
|
cp -r --parents bin $out
|
|
|
|
cp -r --parents share/vk $out
|
|
|
|
cp -r --parents share/applications $out
|
|
|
|
cp -r --parents share/pixmaps $out
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Simple and Convenient Messaging App for VK";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://vk.com/messenger";
|
2018-08-27 18:03:42 +02:00
|
|
|
license = licenses.unfree;
|
|
|
|
maintainers = [ maintainers.gnidorah ];
|
|
|
|
platforms = ["i686-linux" "x86_64-linux"];
|
|
|
|
};
|
|
|
|
}
|