74 attrs.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
76 platform = selectSystem {
77 x86_64-linux = "amd64";
78 aarch64-linux = "arm64";
82 x86_64-linux = "sha256-jOE6Nsna1R6kNp/wXaY60rNmgy4y2UViHiK+KphSNFo=";
83 aarch64-linux = "sha256-yemy1Eajq7uHfGGEf3bgnp2Uz+NcI0cSp65ZvKUQAEg=";
88 pname = "mullvad-vpn";
92 url = "https://github.com/mullvad/mullvadvpn-app/releases/download/${version}/MullvadVPN-${version}_${platform}.deb";
105 dontConfigure = true;
107 runtimeDependencies = [
118 mkdir -p $out/share/mullvad $out/bin
120 mv usr/share/* $out/share
121 mv usr/bin/* $out/bin
122 mv opt/Mullvad\ VPN/* $out/share/mullvad
124 ln -s $out/share/mullvad/mullvad-{gui,vpn} $out/bin/
125 ln -sf $out/share/mullvad/resources/mullvad-problem-report $out/bin/mullvad-problem-report
127 wrapProgram $out/bin/mullvad-vpn \
128 --set MULLVAD_DISABLE_UPDATE_NOTIFICATION 1 \
136 wrapProgram $out/bin/mullvad-daemon \
137 --set-default MULLVAD_RESOURCE_DIR "$out/share/mullvad/resources"
139 wrapProgram $out/bin/mullvad-gui \
140 --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--enable-features=UseOzonePlatform --ozone-platform=wayland --enable-wayland-ime=true}}"
142 sed -i "s|Exec.*$|Exec=$out/bin/mullvad-vpn $U|" $out/share/applications/mullvad-vpn.desktop
147 nativeInstallCheckInputs = [
150 versionCheckProgramArg = [ "--version" ];
151 doInstallCheck = true;
153 passthru.updateScript = ./update.sh;
156 homepage = "https://github.com/mullvad/mullvadvpn-app";
157 description = "Client for Mullvad VPN";
158 changelog = "https://github.com/mullvad/mullvadvpn-app/blob/${version}/CHANGELOG.md";
159 sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
160 license = lib.licenses.gpl3Only;
161 platforms = lib.platforms.unix;
162 badPlatforms = [ lib.systems.inspect.patterns.isDarwin ];
163 maintainers = with lib.maintainers; [