2023-05-24 13:37:59 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchurl
|
|
|
|
, dpkg
|
|
|
|
, alsa-lib
|
|
|
|
, atk
|
|
|
|
, cairo
|
|
|
|
, cups
|
|
|
|
, dbus
|
|
|
|
, expat
|
|
|
|
, fontconfig
|
|
|
|
, freetype
|
|
|
|
, gdk-pixbuf
|
|
|
|
, glib
|
|
|
|
, pango
|
|
|
|
, nspr
|
|
|
|
, nss
|
|
|
|
, gtk3
|
|
|
|
, mesa
|
|
|
|
, libGL
|
|
|
|
, wayland
|
|
|
|
, xorg
|
|
|
|
, autoPatchelfHook
|
|
|
|
, systemd
|
|
|
|
, libnotify
|
|
|
|
, libappindicator
|
2022-01-27 00:19:43 +00:00
|
|
|
, makeWrapper
|
2023-05-24 13:37:59 +00:00
|
|
|
, coreutils
|
|
|
|
, gnugrep
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
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
|
|
|
|
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
|
2021-12-19 01:06:50 +00:00
|
|
|
xorg.libxshmfence
|
2020-04-24 23:36:52 +00:00
|
|
|
nspr
|
|
|
|
nss
|
|
|
|
systemd
|
|
|
|
];
|
|
|
|
|
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "mullvad-vpn";
|
2023-04-29 16:46:19 +00:00
|
|
|
version = "2023.3";
|
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";
|
2023-04-29 16:46:19 +00:00
|
|
|
sha256 = "sha256-+XK9xUeSs93egmtsQ7qATug/n9taeQkmc4ZgObPYvn4=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
autoPatchelfHook
|
|
|
|
dpkg
|
2022-01-27 00:19:43 +00:00
|
|
|
makeWrapper
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = deps;
|
|
|
|
|
|
|
|
dontBuild = true;
|
|
|
|
dontConfigure = true;
|
|
|
|
|
|
|
|
unpackPhase = "dpkg-deb -x $src .";
|
|
|
|
|
2023-02-09 11:40:11 +00:00
|
|
|
runtimeDependencies = [ (lib.getLib systemd) libGL libnotify libappindicator wayland ];
|
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
|
|
|
|
|
|
|
|
ln -s $out/share/mullvad/mullvad-{gui,vpn} $out/bin/
|
|
|
|
ln -sf $out/share/mullvad/resources/mullvad-problem-report $out/bin/mullvad-problem-report
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
wrapProgram $out/bin/mullvad-vpn \
|
|
|
|
--set MULLVAD_DISABLE_UPDATE_NOTIFICATION 1 \
|
|
|
|
--prefix PATH : ${lib.makeBinPath [ coreutils gnugrep ]}
|
2022-01-27 00:19:43 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
wrapProgram $out/bin/mullvad-daemon \
|
|
|
|
--set-default MULLVAD_RESOURCE_DIR "$out/share/mullvad/resources"
|
|
|
|
|
2022-01-27 00:19:43 +00:00
|
|
|
sed -i "s|Exec.*$|Exec=$out/bin/mullvad-vpn $U|" $out/share/applications/mullvad-vpn.desktop
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
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";
|
2022-06-26 10:26:21 +00:00
|
|
|
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
2021-02-13 14:23:35 +00:00
|
|
|
license = licenses.gpl3Only;
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = [ "x86_64-linux" ];
|
2022-11-21 17:40:18 +00:00
|
|
|
maintainers = with maintainers; [ Br1ght0ne ymarkus ataraxiasjel ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|