···1-#!/usr/bin/env nix-shell
2-#!nix-shell -i bash -p curl jq common-updater-scripts
3-4-set -euo pipefail
5-6-# URL to check for the latest version
7-latestUrl="https://dl.todesktop.com/210203cqcj00tw1/linux/deb/x64"
8-9-# Fetch the latest version information
10-latestInfo=$(curl -sI -X GET $latestUrl | grep -oP 'morgen-\K\d+(\.\d+)*(?=[^\d])')
11-12-if [[ -z "$latestInfo" ]]; then
13- echo "Could not find the latest version number."
14- exit 1
15-fi
16-17-# Extract the version number
18-latestVersion=$(echo "$latestInfo" | head -n 1)
19-20-echo "Latest version of Morgen is $latestVersion"
21-22-# Update the package definition
23-update-source-version morgen "$latestVersion"
24-25-# Fetch and update the hash
26-nix-prefetch-url --unpack "https://dl.todesktop.com/210203cqcj00tw1/versions/${latestVersion}/linux/deb"
···1+#!/usr/bin/env nix-shell
2+#!nix-shell -i bash -p curl jq common-updater-scripts
3+4+set -euo pipefail
5+6+# URL to check for the latest version
7+latestUrl="https://dl.todesktop.com/210203cqcj00tw1/linux/deb/x64"
8+9+# Fetch the latest version information
10+latestInfo=$(curl -sI -X GET $latestUrl | grep -oP 'morgen-\K\d+(\.\d+)*(?=[^\d])')
11+12+if [[ -z "$latestInfo" ]]; then
13+ echo "Could not find the latest version number."
14+ exit 1
15+fi
16+17+# Extract the version number
18+latestVersion=$(echo "$latestInfo" | head -n 1)
19+20+echo "Latest version of Morgen is $latestVersion"
21+22+# Update the package definition
23+update-source-version morgen "$latestVersion"
24+25+# Fetch and update the hash
26+nix-prefetch-url "https://dl.todesktop.com/210203cqcj00tw1/versions/${latestVersion}/linux/deb"
···166 runHook postInstall
167 '';
16800000000000169 # Bring in game's .so files into lookup. Otherwise game fails to start
170 # as: `Object not found: Class Render.Render`
171 appendRunpaths = [
···166 runHook postInstall
167 '';
168169+ # This can be removed with version 469e as that contains this file already
170+ # Workaround for bug https://github.com/OldUnreal/UnrealTournamentPatches/issues/1578
171+ # that prevented starting or joining a multi player game
172+ missing-file = fetchurl {
173+ url = "https://gist.github.com/dwt/733d620fbbfd5c49da88683aef60d889/raw/73b271ef019412cf1be5ce1966842ef63a18ba39/de.u";
174+ hash = "sha256-M14imMl35KUT0tG8dgB+DBoXve/1saVL7hPNgUFo1hY=";
175+ };
176+ postInstall = lib.optionalString (stdenv.hostPlatform.isDarwin) ''
177+ cp ${finalAttrs.missing-file} $out/Applications/UnrealTournament.app/Contents/MacOS/System/de.u
178+ '';
179+180 # Bring in game's .so files into lookup. Otherwise game fails to start
181 # as: `Object not found: Class Render.Render`
182 appendRunpaths = [