1- { stdenv
2- , lib
3- , fetchurl
4- , dpkg
5- , alsa-lib
6- , atk
7- , cairo
8- , cups
9- , dbus
10- , expat
11- , fontconfig
12- , freetype
13- , gdk-pixbuf
14- , glib
15- , pango
16- , nspr
17- , nss
18- , gtk3
19- , mesa
20- , libGL
21- , wayland
22- , xorg
23- , autoPatchelfHook
24- , systemd
25- , libnotify
26- , libappindicator
27- , makeWrapper
28- , coreutils
29- , gnugrep
1+ {
2+ stdenv ,
3+ lib ,
4+ fetchurl ,
5+ dpkg ,
6+ alsa-lib ,
7+ atk ,
8+ cairo ,
9+ cups ,
10+ dbus ,
11+ expat ,
12+ fontconfig ,
13+ freetype ,
14+ gdk-pixbuf ,
15+ glib ,
16+ pango ,
17+ nspr ,
18+ nss ,
19+ gtk3 ,
20+ mesa ,
21+ libGL ,
22+ wayland ,
23+ xorg ,
24+ autoPatchelfHook ,
25+ systemd ,
26+ libnotify ,
27+ libappindicator ,
28+ makeWrapper ,
29+ coreutils ,
30+ gnugrep ,
31+
32+ versionCheckHook ,
3033} :
3134
3235let
6669
6770 version = "2024.7" ;
6871
69- selectSystem = attrs : attrs . ${ stdenv . hostPlatform . system } or ( throw "Unsupported system: ${ stdenv . hostPlatform . system } " ) ;
72+ selectSystem =
73+ attrs :
74+ attrs . ${ stdenv . hostPlatform . system } or ( throw "Unsupported system: ${ stdenv . hostPlatform . system } " ) ;
7075
7176 platform = selectSystem {
7277 x86_64-linux = "amd64" ;
@@ -99,7 +104,13 @@ stdenv.mkDerivation {
99104 dontBuild = true ;
100105 dontConfigure = true ;
101106
102- runtimeDependencies = [ ( lib . getLib systemd ) libGL libnotify libappindicator wayland ] ;
107+ runtimeDependencies = [
108+ ( lib . getLib systemd )
109+ libGL
110+ libnotify
111+ libappindicator
112+ wayland
113+ ] ;
103114
104115 installPhase = ''
105116 runHook preInstall
@@ -115,7 +126,12 @@ stdenv.mkDerivation {
115126
116127 wrapProgram $out/bin/mullvad-vpn \
117128 --set MULLVAD_DISABLE_UPDATE_NOTIFICATION 1 \
118- --prefix PATH : ${ lib . makeBinPath [ coreutils gnugrep ] }
129+ --prefix PATH : ${
130+ lib . makeBinPath [
131+ coreutils
132+ gnugrep
133+ ]
134+ }
119135
120136 wrapProgram $out/bin/mullvad-daemon \
121137 --set-default MULLVAD_RESOURCE_DIR "$out/share/mullvad/resources"
@@ -128,17 +144,26 @@ stdenv.mkDerivation {
128144 runHook postInstall
129145 '' ;
130146
147+ nativeInstallCheckInputs = [
148+ versionCheckHook
149+ ] ;
150+ versionCheckProgramArg = [ "--version" ] ;
151+ doInstallCheck = true ;
152+
131153 passthru . updateScript = ./update.sh ;
132154
133- meta = with lib ; {
155+ meta = {
134156 homepage = "https://github.com/mullvad/mullvadvpn-app" ;
135157 description = "Client for Mullvad VPN" ;
136158 changelog = "https://github.com/mullvad/mullvadvpn-app/blob/${ version } /CHANGELOG.md" ;
137- sourceProvenance = with sourceTypes ; [ binaryNativeCode ] ;
138- license = licenses . gpl3Only ;
139- platforms = platforms . unix ;
159+ sourceProvenance = with lib . sourceTypes ; [ binaryNativeCode ] ;
160+ license = lib . licenses . gpl3Only ;
161+ platforms = lib . platforms . unix ;
140162 badPlatforms = [ lib . systems . inspect . patterns . isDarwin ] ;
141- maintainers = with maintainers ; [ Br1ght0ne ymarkus ataraxiasjel ] ;
163+ maintainers = with lib . maintainers ; [
164+ Br1ght0ne
165+ ymarkus
166+ ataraxiasjel
167+ ] ;
142168 } ;
143-
144169}
0 commit comments