3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/networking/mullvad-vpn/default.nix

95 lines
2.1 KiB
Nix
Raw Normal View History

{ stdenv, lib, fetchurl, dpkg
, alsa-lib, atk, cairo, cups, dbus, expat, fontconfig, freetype
2021-04-09 12:32:08 +01:00
, gdk-pixbuf, glib, gnome2, pango, nspr, nss, gtk3, mesa
, xorg, autoPatchelfHook, systemd, libnotify, libappindicator
2019-06-18 08:26:35 +01:00
}:
let deps = [
alsa-lib
2019-06-18 08:26:35 +01:00
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
libappindicator
2019-06-18 08:26:35 +01:00
libnotify
2021-04-09 12:32:08 +01:00
mesa
2019-06-18 08:26:35 +01:00
xorg.libX11
xorg.libXScrnSaver
xorg.libXcomposite
xorg.libXcursor
xorg.libXdamage
xorg.libXext
xorg.libXfixes
xorg.libXi
xorg.libXrandr
xorg.libXrender
xorg.libXtst
xorg.libxcb
2021-12-10 11:38:06 +00:00
xorg.libxshmfence
2019-06-18 08:26:35 +01:00
nspr
nss
systemd
];
in
stdenv.mkDerivation rec {
pname = "mullvad-vpn";
2021-12-10 11:38:06 +00:00
version = "2021.6";
2019-06-18 08:26:35 +01:00
src = fetchurl {
url = "https://github.com/mullvad/mullvadvpn-app/releases/download/${version}/MullvadVPN-${version}_amd64.deb";
2021-12-10 11:38:06 +00:00
sha256 = "0vpahryw4hm1k9p4vang84ji88znz67s7wxnwqndf02a627n7fcm";
2019-06-18 08:26:35 +01:00
};
nativeBuildInputs = [
autoPatchelfHook
dpkg
];
buildInputs = deps;
dontBuild = true;
dontConfigure = true;
unpackPhase = "dpkg-deb -x $src .";
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
2021-11-04 17:09:12 +00:00
sed -i 's|"\/opt\/Mullvad.*VPN|env MULLVAD_DISABLE_UPDATE_NOTIFICATION=1 "'$out'/bin|g' $out/share/applications/mullvad-vpn.desktop
2019-06-18 08:26:35 +01:00
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
ln -sf $out/share/mullvad/resources/mullvad-problem-report $out/bin/mullvad-problem-report
2019-06-18 08:26:35 +01:00
runHook postInstall
'';
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";
license = licenses.gpl3Only;
2019-06-18 08:26:35 +01:00
platforms = [ "x86_64-linux" ];
2021-10-28 11:37:27 +01:00
maintainers = with maintainers; [ Br1ght0ne ymarkus flexagoon ];
2019-06-18 08:26:35 +01:00
};
}