File tree Expand file tree Collapse file tree 5 files changed +19
-18
lines changed
Expand file tree Collapse file tree 5 files changed +19
-18
lines changed Original file line number Diff line number Diff line change 33} :
44let
55 vortexVersion = "1.13.7" ;
6+ homeDir = builtins . getEnv "HOME" ;
7+ winePrefix = "${ homeDir } /.vortex-linux/compatdata/pfx" ;
68
79 vortexInstaller = builtins . fetchurl {
810 url = "https://github.com/Nexus-Mods/Vortex/releases/download/v${ vortexVersion } /vortex-setup-${ vortexVersion } .exe" ;
1820 umuLauncher = "${ pkgs . umu-launcher } " ;
1921 vortexInstaller = "${ vortexInstaller } " ;
2022 dotnetInstaller = "${ dotnetInstaller } " ;
23+ winePrefix = "${ winePrefix } " ;
2124 } ;
2225
23-
2426 preInstall = pkgs . writeShellScriptBin "vortex-install" ''
2527 exec ${ installScript }
2628 '' ;
2729
28- vortexWrapperScript = pkgs . replaceVars ./vortex-wrapper.sh {
29- umuLauncher = "${ pkgs . umu-launcher } " ;
30- } ;
30+ vortexWrapperScript = pkgs . writeShellScript "vortex-wrapper.sh" ''
31+ #!/usr/bin/env bash
32+ set -euo pipefail
33+
34+ export WINEPREFIX="${ winePrefix } "
35+
36+ exec ${ pkgs . steam-run } /bin/steam-run ${ pkgs . umu-launcher } /bin/umu-run "$WINEPREFIX/drive_c/Program Files/Black Tree Gaming Ltd/Vortex/Vortex.exe" "$@"
37+ '' ;
3138
3239 installPhaseScript = pkgs . replaceVars ./install-phase.sh {
3340 vortexWrapperScript = "${ vortexWrapperScript } " ;
3441 desktopItem = "${ ./vortex.desktop } " ;
3542 desktopItemIcon = "${ ./vortex.ico } " ;
43+ homeDir = "${ homeDir } " ;
3644 } ;
3745
3846in
Original file line number Diff line number Diff line change 22
33set -euo pipefail
44
5- # Create output directories
6- mkdir -p " $out /bin"
75mkdir -p " $out /share/applications"
86
9-
107cp " @vortexWrapperScript@" " $out /share/applications/vortex-wrapper.sh"
118chmod +x " $out /share/applications/vortex-wrapper.sh"
12- cp " @desktopItem@" " $out /share/applications/vortex.desktop"
9+ sed " s|\$ out|$out |g" " @desktopItem@" | \
10+ sed " s|\$ home|@homeDir@|g" > temp
11+ mv temp " $out /share/applications/vortex.desktop"
1312cp " @desktopItemIcon@" " $out /share/applications/vortex.ico"
Original file line number Diff line number Diff line change 22
33set -euxo pipefail
44
5- export WINEPREFIX=" $HOME /.vortex-linux/compatdata/pfx "
5+ export WINEPREFIX=@winePrefix@
66
77mkdir -p " $WINEPREFIX "
88
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -5,6 +5,6 @@ Name=Vortex
55MimeType =x-scheme-handler/nxm;x-scheme-handler/nxm-protocol
66Terminal =false
77X-KeepTerminal =false
8- Path =$HOME /.vortex-linux/compatdata/pfx/drive_c/Program Files/Black Tree Gaming Ltd/Vortex
9- Exec =vortex-wrapper.sh -d %u
10- Icon =vortex.ico
8+ Path =$home /.vortex-linux/compatdata/pfx/drive_c/Program Files/Black Tree Gaming Ltd/Vortex
9+ Exec =$out/share/applications/ vortex-wrapper.sh
10+ Icon =$out/share/applications/ vortex.ico
You can’t perform that action at this time.
0 commit comments