2019-06-18 09:26:35 +02:00
|
|
|
{ stdenv, makeWrapper, fetchurl, dpkg
|
|
|
|
, alsaLib, atk, cairo, cups, dbus, expat, fontconfig, freetype
|
2019-05-22 13:03:39 +02:00
|
|
|
, gdk-pixbuf, glib, gnome2, pango, nspr, nss, gtk3
|
2019-06-18 09:26:35 +02:00
|
|
|
, xorg, autoPatchelfHook, systemd, libnotify
|
|
|
|
}:
|
|
|
|
|
|
|
|
let deps = [
|
|
|
|
alsaLib
|
|
|
|
atk
|
|
|
|
cairo
|
|
|
|
cups
|
|
|
|
dbus
|
|
|
|
expat
|
|
|
|
fontconfig
|
|
|
|
freetype
|
2019-05-22 13:03:39 +02:00
|
|
|
gdk-pixbuf
|
2019-06-18 09:26:35 +02:00
|
|
|
glib
|
|
|
|
gnome2.GConf
|
|
|
|
pango
|
|
|
|
gtk3
|
|
|
|
libnotify
|
|
|
|
xorg.libX11
|
|
|
|
xorg.libXScrnSaver
|
|
|
|
xorg.libXcomposite
|
|
|
|
xorg.libXcursor
|
|
|
|
xorg.libXdamage
|
|
|
|
xorg.libXext
|
|
|
|
xorg.libXfixes
|
|
|
|
xorg.libXi
|
|
|
|
xorg.libXrandr
|
|
|
|
xorg.libXrender
|
|
|
|
xorg.libXtst
|
|
|
|
xorg.libxcb
|
|
|
|
nspr
|
|
|
|
nss
|
|
|
|
systemd
|
|
|
|
];
|
|
|
|
|
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "mullvad-vpn";
|
2020-02-15 03:54:45 +01:00
|
|
|
version = "2020.2";
|
2019-06-18 09:26:35 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://www.mullvad.net/media/app/MullvadVPN-${version}_amd64.deb";
|
2020-02-15 03:54:45 +01:00
|
|
|
sha256 = "4f5970714684a86fba44b742d77f9bbe1147a111330e487d160d9844f34ae3d5";
|
2019-06-18 09:26:35 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
autoPatchelfHook
|
|
|
|
dpkg
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = deps;
|
|
|
|
|
|
|
|
dontBuild = true;
|
|
|
|
dontConfigure = true;
|
|
|
|
|
|
|
|
unpackPhase = "dpkg-deb -x $src .";
|
|
|
|
|
|
|
|
runtimeDependencies = [ systemd.lib libnotify ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
mkdir -p $out/share/mullvad $out/bin
|
|
|
|
|
|
|
|
mv usr/share/* $out/share
|
|
|
|
mv usr/bin/* $out/bin
|
|
|
|
mv opt/Mullvad\ VPN/* $out/share/mullvad
|
|
|
|
|
|
|
|
sed -i 's|\/opt\/Mullvad.*VPN|'$out'/bin|g' $out/share/applications/mullvad-vpn.desktop
|
|
|
|
|
2019-10-08 19:27:36 +02:00
|
|
|
ln -s $out/share/mullvad/mullvad-{gui,vpn} $out/bin/
|
2019-06-18 09:26:35 +02:00
|
|
|
ln -s $out/share/mullvad/resources/mullvad-daemon $out/bin/mullvad-daemon
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = "https://github.com/mullvad/mullvadvpn-app";
|
|
|
|
description = "Client for Mullvad VPN";
|
|
|
|
changelog = "https://github.com/mullvad/mullvadvpn-app/blob/${version}/CHANGELOG.md";
|
|
|
|
license = licenses.gpl3;
|
|
|
|
platforms = [ "x86_64-linux" ];
|
2020-03-18 18:37:29 +01:00
|
|
|
maintainers = with maintainers; [ filalex77 ];
|
2019-06-18 09:26:35 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|