mullvad-vpn: use makeWrapper instead of env hack

This commit is contained in:
Bernardo Meurer 2022-01-23 21:23:52 -08:00
parent e8d0231396
commit 76c35ec839
No known key found for this signature in database
GPG Key ID: F4C0D53B8D14C246

View File

@ -2,6 +2,7 @@
, alsa-lib, atk, cairo, cups, dbus, expat, fontconfig, freetype
, gdk-pixbuf, glib, gnome2, pango, nspr, nss, gtk3, mesa
, xorg, autoPatchelfHook, systemd, libnotify, libappindicator
, makeWrapper
}:
let deps = [
@ -53,6 +54,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [
autoPatchelfHook
dpkg
makeWrapper
];
buildInputs = deps;
@ -73,12 +75,14 @@ stdenv.mkDerivation rec {
mv usr/bin/* $out/bin
mv opt/Mullvad\ VPN/* $out/share/mullvad
sed -i 's|"\/opt\/Mullvad.*VPN|env MULLVAD_DISABLE_UPDATE_NOTIFICATION=1 "'$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
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
runHook postInstall
'';