nixpkgs/pkgs/applications/networking/mullvad-vpn/default.nix

93 lines
2.0 KiB
Nix
Raw Normal View History

{ stdenv, lib, makeWrapper, fetchurl, dpkg
2019-06-18 07:26:35 +00:00
, alsaLib, atk, cairo, cups, dbus, expat, fontconfig, freetype
2019-05-22 11:03:39 +00:00
, gdk-pixbuf, glib, gnome2, pango, nspr, nss, gtk3
, xorg, autoPatchelfHook, systemd, libnotify, libappindicator
2019-06-18 07:26:35 +00:00
}:
let deps = [
alsaLib
atk
cairo
cups
dbus
expat
fontconfig
freetype
2019-05-22 11:03:39 +00:00
gdk-pixbuf
2019-06-18 07:26:35 +00:00
glib
gnome2.GConf
pango
gtk3
libappindicator
2019-06-18 07:26:35 +00: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";
2020-11-22 00:20:47 +00:00
version = "2020.7";
2019-06-18 07:26:35 +00:00
src = fetchurl {
url = "https://www.mullvad.net/media/app/MullvadVPN-${version}_amd64.deb";
2020-11-22 00:20:47 +00:00
sha256 = "07vryz1nq8r4m5y9ry0d0v62ykz1cnnsv628x34yvwiyazbav4ri";
2019-06-18 07:26:35 +00:00
};
nativeBuildInputs = [
autoPatchelfHook
dpkg
];
buildInputs = deps;
dontBuild = true;
dontConfigure = true;
unpackPhase = "dpkg-deb -x $src .";
runtimeDependencies = [ (lib.getLib systemd) libnotify libappindicator ];
2019-06-18 07:26:35 +00: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 17:27:36 +00:00
ln -s $out/share/mullvad/mullvad-{gui,vpn} $out/bin/
2019-06-18 07:26:35 +00:00
ln -s $out/share/mullvad/resources/mullvad-daemon $out/bin/mullvad-daemon
ln -sf $out/share/mullvad/resources/mullvad-problem-report $out/bin/mullvad-problem-report
2019-06-18 07:26:35 +00:00
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" ];
maintainers = with maintainers; [ Br1ght0ne ];
2019-06-18 07:26:35 +00:00
};
}