2021-02-12 07:40:21 +00:00
|
|
|
{ stdenv, lib, fetchurl, dpkg
|
2021-06-10 02:57:09 +00:00
|
|
|
, alsa-lib, atk, cairo, cups, dbus, expat, fontconfig, freetype
|
2022-02-11 14:05:09 +00:00
|
|
|
, gdk-pixbuf, glib, pango, nspr, nss, gtk3, mesa
|
2020-03-28 20:45:23 +00:00
|
|
|
, xorg, autoPatchelfHook, systemd, libnotify, libappindicator
|
2022-01-24 05:23:52 +00:00
|
|
|
, makeWrapper
|
2019-06-18 07:26:35 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
let deps = [
|
2021-06-10 02:57:09 +00:00
|
|
|
alsa-lib
|
2019-06-18 07:26:35 +00:00
|
|
|
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
|
|
|
|
pango
|
|
|
|
gtk3
|
2020-03-28 20:45:23 +00:00
|
|
|
libappindicator
|
2019-06-18 07:26:35 +00:00
|
|
|
libnotify
|
2021-04-09 11:32:08 +00:00
|
|
|
mesa
|
2019-06-18 07:26:35 +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
|
2021-12-10 11:38:06 +00:00
|
|
|
xorg.libxshmfence
|
2019-06-18 07:26:35 +00: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 07:26:35 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-02-18 16:29:19 +00:00
|
|
|
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 07:26:35 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
autoPatchelfHook
|
|
|
|
dpkg
|
2022-01-24 05:23:52 +00:00
|
|
|
makeWrapper
|
2019-06-18 07:26:35 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = deps;
|
|
|
|
|
|
|
|
dontBuild = true;
|
|
|
|
dontConfigure = true;
|
|
|
|
|
|
|
|
unpackPhase = "dpkg-deb -x $src .";
|
|
|
|
|
2020-08-12 18:14:44 +00:00
|
|
|
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
|
|
|
|
|
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
|
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 07:26:35 +00:00
|
|
|
|
2022-01-24 05:23:52 +00:00
|
|
|
wrapProgram $out/bin/mullvad-vpn --set MULLVAD_DISABLE_UPDATE_NOTIFICATION 1
|
|
|
|
|
|
|
|
sed -i "s|Exec.*$|Exec=$out/bin/mullvad-vpn $U|" $out/share/applications/mullvad-vpn.desktop
|
|
|
|
|
2019-06-18 07:26:35 +00:00
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-06-18 07:26:35 +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-12 07:40:21 +00:00
|
|
|
license = licenses.gpl3Only;
|
2019-06-18 07:26:35 +00:00
|
|
|
platforms = [ "x86_64-linux" ];
|
2021-10-28 10:37:27 +00:00
|
|
|
maintainers = with maintainers; [ Br1ght0ne ymarkus flexagoon ];
|
2019-06-18 07:26:35 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|