2021-02-13 14:23:35 +00:00
|
|
|
{ stdenv, lib, fetchurl, dpkg
|
2021-06-28 23:13:55 +00:00
|
|
|
, alsa-lib, atk, cairo, cups, dbus, expat, fontconfig, freetype
|
2021-04-26 19:14:03 +00:00
|
|
|
, gdk-pixbuf, glib, gnome2, pango, nspr, nss, gtk3, mesa
|
2020-04-24 23:36:52 +00:00
|
|
|
, xorg, autoPatchelfHook, systemd, libnotify, libappindicator
|
|
|
|
}:
|
|
|
|
|
|
|
|
let deps = [
|
2021-06-28 23:13:55 +00:00
|
|
|
alsa-lib
|
2020-04-24 23:36:52 +00:00
|
|
|
atk
|
|
|
|
cairo
|
|
|
|
cups
|
|
|
|
dbus
|
|
|
|
expat
|
|
|
|
fontconfig
|
|
|
|
freetype
|
|
|
|
gdk-pixbuf
|
|
|
|
glib
|
|
|
|
gnome2.GConf
|
|
|
|
pango
|
|
|
|
gtk3
|
|
|
|
libappindicator
|
|
|
|
libnotify
|
2021-04-26 19:14:03 +00:00
|
|
|
mesa
|
2020-04-24 23:36:52 +00: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
|
|
|
|
nspr
|
|
|
|
nss
|
|
|
|
systemd
|
|
|
|
];
|
|
|
|
|
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "mullvad-vpn";
|
2021-07-14 22:03:04 +00:00
|
|
|
version = "2021.4";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-02-19 19:06:45 +00:00
|
|
|
url = "https://github.com/mullvad/mullvadvpn-app/releases/download/${version}/MullvadVPN-${version}_amd64.deb";
|
2021-07-14 22:03:04 +00:00
|
|
|
sha256 = "sha256-JnHG4qD6nH2l7RCYHmb7Uszn0mrMsFtMHQ3cKpXcq00=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
autoPatchelfHook
|
|
|
|
dpkg
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = deps;
|
|
|
|
|
|
|
|
dontBuild = true;
|
|
|
|
dontConfigure = true;
|
|
|
|
|
|
|
|
unpackPhase = "dpkg-deb -x $src .";
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
runtimeDependencies = [ (lib.getLib systemd) libnotify libappindicator ];
|
2020-04-24 23:36:52 +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
|
|
|
|
|
|
|
|
ln -s $out/share/mullvad/mullvad-{gui,vpn} $out/bin/
|
|
|
|
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
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00: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-13 14:23:35 +00:00
|
|
|
license = licenses.gpl3Only;
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = [ "x86_64-linux" ];
|
2021-02-13 14:23:35 +00:00
|
|
|
maintainers = with maintainers; [ Br1ght0ne ymarkus ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|