···11-#!/usr/bin/env nix-shell
22-#!nix-shell -i bash -p curl jq common-updater-scripts
33-44-set -euo pipefail
55-66-# URL to check for the latest version
77-latestUrl="https://dl.todesktop.com/210203cqcj00tw1/linux/deb/x64"
88-99-# Fetch the latest version information
1010-latestInfo=$(curl -sI -X GET $latestUrl | grep -oP 'morgen-\K\d+(\.\d+)*(?=[^\d])')
1111-1212-if [[ -z "$latestInfo" ]]; then
1313- echo "Could not find the latest version number."
1414- exit 1
1515-fi
1616-1717-# Extract the version number
1818-latestVersion=$(echo "$latestInfo" | head -n 1)
1919-2020-echo "Latest version of Morgen is $latestVersion"
2121-2222-# Update the package definition
2323-update-source-version morgen "$latestVersion"
2424-2525-# Fetch and update the hash
2626-nix-prefetch-url --unpack "https://dl.todesktop.com/210203cqcj00tw1/versions/${latestVersion}/linux/deb"
···11+#!/usr/bin/env nix-shell
22+#!nix-shell -i bash -p curl jq common-updater-scripts
33+44+set -euo pipefail
55+66+# URL to check for the latest version
77+latestUrl="https://dl.todesktop.com/210203cqcj00tw1/linux/deb/x64"
88+99+# Fetch the latest version information
1010+latestInfo=$(curl -sI -X GET $latestUrl | grep -oP 'morgen-\K\d+(\.\d+)*(?=[^\d])')
1111+1212+if [[ -z "$latestInfo" ]]; then
1313+ echo "Could not find the latest version number."
1414+ exit 1
1515+fi
1616+1717+# Extract the version number
1818+latestVersion=$(echo "$latestInfo" | head -n 1)
1919+2020+echo "Latest version of Morgen is $latestVersion"
2121+2222+# Update the package definition
2323+update-source-version morgen "$latestVersion"
2424+2525+# Fetch and update the hash
2626+nix-prefetch-url "https://dl.todesktop.com/210203cqcj00tw1/versions/${latestVersion}/linux/deb"
···166166 runHook postInstall
167167 '';
168168169169+ # This can be removed with version 469e as that contains this file already
170170+ # Workaround for bug https://github.com/OldUnreal/UnrealTournamentPatches/issues/1578
171171+ # that prevented starting or joining a multi player game
172172+ missing-file = fetchurl {
173173+ url = "https://gist.github.com/dwt/733d620fbbfd5c49da88683aef60d889/raw/73b271ef019412cf1be5ce1966842ef63a18ba39/de.u";
174174+ hash = "sha256-M14imMl35KUT0tG8dgB+DBoXve/1saVL7hPNgUFo1hY=";
175175+ };
176176+ postInstall = lib.optionalString (stdenv.hostPlatform.isDarwin) ''
177177+ cp ${finalAttrs.missing-file} $out/Applications/UnrealTournament.app/Contents/MacOS/System/de.u
178178+ '';
179179+169180 # Bring in game's .so files into lookup. Otherwise game fails to start
170181 # as: `Object not found: Class Render.Render`
171182 appendRunpaths = [