2021-02-12 07:40:21 +00:00
|
|
|
{ stdenv, lib, fetchurl, dpkg
|
2019-06-18 08:26:35 +01:00
|
|
|
, alsaLib, atk, cairo, cups, dbus, expat, fontconfig, freetype
|
2019-05-22 12:03:39 +01:00
|
|
|
, gdk-pixbuf, glib, gnome2, pango, nspr, nss, gtk3
|
2020-03-28 20:45:23 +00:00
|
|
|
, xorg, autoPatchelfHook, systemd, libnotify, libappindicator
|
2019-06-18 08:26:35 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
let deps = [
|
|
|
|
alsaLib
|
|
|
|
atk
|
|
|
|
cairo
|
|
|
|
cups
|
|
|
|
dbus
|
|
|
|
expat
|
|
|
|
fontconfig
|
|
|
|
freetype
|
2019-05-22 12:03:39 +01:00
|
|
|
gdk-pixbuf
|
2019-06-18 08:26:35 +01:00
|
|
|
glib
|
|
|
|
gnome2.GConf
|
|
|
|
pango
|
|
|
|
gtk3
|
2020-03-28 20:45:23 +00:00
|
|
|
libappindicator
|
2019-06-18 08:26:35 +01:00
|
|
|
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";
|
2021-02-12 07:40:21 +00:00
|
|
|
version = "2021.1";
|
2019-06-18 08:26:35 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://www.mullvad.net/media/app/MullvadVPN-${version}_amd64.deb";
|
2021-02-12 07:40:21 +00:00
|
|
|
sha256 = "1ksa327zaiwmcmzv4n4ycfzc4sqhj2492c5ir0mqlx7x2nnhx6q7";
|
2019-06-18 08:26:35 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
autoPatchelfHook
|
|
|
|
dpkg
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = deps;
|
|
|
|
|
|
|
|
dontBuild = true;
|
|
|
|
dontConfigure = true;
|
|
|
|
|
|
|
|
unpackPhase = "dpkg-deb -x $src .";
|
|
|
|
|
2020-08-12 19:14:44 +01:00
|
|
|
runtimeDependencies = [ (lib.getLib systemd) libnotify libappindicator ];
|
2019-06-18 08:26:35 +01:00
|
|
|
|
|
|
|
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 18:27:36 +01:00
|
|
|
ln -s $out/share/mullvad/mullvad-{gui,vpn} $out/bin/
|
2019-06-18 08:26:35 +01:00
|
|
|
ln -s $out/share/mullvad/resources/mullvad-daemon $out/bin/mullvad-daemon
|
2020-03-28 21:24:24 +00:00
|
|
|
ln -sf $out/share/mullvad/resources/mullvad-problem-report $out/bin/mullvad-problem-report
|
2019-06-18 08:26:35 +01:00
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-06-18 08:26:35 +01:00
|
|
|
homepage = "https://github.com/mullvad/mullvadvpn-app";
|
|
|
|
description = "Client for Mullvad VPN";
|
|
|
|
changelog = "https://github.com/mullvad/mullvadvpn-app/blob/${version}/CHANGELOG.md";
|
2021-02-12 07:40:21 +00:00
|
|
|
license = licenses.gpl3Only;
|
2019-06-18 08:26:35 +01:00
|
|
|
platforms = [ "x86_64-linux" ];
|
2021-02-12 07:40:21 +00:00
|
|
|
maintainers = with maintainers; [ Br1ght0ne ymarkus ];
|
2019-06-18 08:26:35 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|