Compare commits
9 commits
3c877e26b2
...
a504430d15
| Author | SHA1 | Date | |
|---|---|---|---|
| a504430d15 | |||
| 95ab58c200 | |||
| caa4615ad9 | |||
| 8069f8a446 | |||
| e0f34f557d | |||
| 4c10132893 | |||
| 9eee136c7d | |||
| b1c276f761 | |||
| 4c3cea9758 |
1 changed files with 67 additions and 2 deletions
|
|
@ -10,6 +10,41 @@
|
||||||
agenix.packages.aarch64-darwin.default
|
agenix.packages.aarch64-darwin.default
|
||||||
iterm2
|
iterm2
|
||||||
tailscale
|
tailscale
|
||||||
|
(pkgs.writeShellScriptBin "portalpatch" ''
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
# Automatically patch the game Portal for use on Apple Silicon using the
|
||||||
|
# hl2 source leak
|
||||||
|
#
|
||||||
|
# Instructions adapted from the Apple Gaming Wiki
|
||||||
|
# https://www.applegamingwiki.com/wiki/Half-Life_2#Native
|
||||||
|
#
|
||||||
|
# Note that this script **does not** download the dependencies from
|
||||||
|
# Homebrew: that is assumed to be handled by nix-darwin
|
||||||
|
HL2_SOURCE_DIR=$(mktemp -d)
|
||||||
|
HL2_DEST_DIR=$(mktemp -d)
|
||||||
|
|
||||||
|
git clone --recursive https://github.com/nillerusr/source-engine "$HL2_SOURCE_DIR"
|
||||||
|
cd "$HL2_SOURCE_DIR" || exit 1
|
||||||
|
|
||||||
|
export PKG_CONFIG_PATH="/opt/homebrew/opt/jpeg/lib/pkgconfig"
|
||||||
|
|
||||||
|
python3 waf configure -T release --prefix="" --build-games=portal && \
|
||||||
|
python3 waf build && \
|
||||||
|
python3 waf install --destdir "$HL2_DEST_DIR"
|
||||||
|
|
||||||
|
PORTAL_GAME_DIR="$HOME/Library/Application Support/Steam/steamapps/common/Portal"
|
||||||
|
mv "$PORTAL_GAME_DIR/bin" "$PORTAL_GAME_DIR/bin.bak"
|
||||||
|
mv "$PORTAL_GAME_DIR/portal/bin" "$PORTAL_GAME_DIR/portal/bin.bak"
|
||||||
|
mv "$PORTAL_GAME_DIR/hl2_osx" "$PORTAL_GAME_DIR/hl2_osx.bak"
|
||||||
|
|
||||||
|
cp -r "$HL2_DEST_DIR/bin" "$PORTAL_GAME_DIR/bin"
|
||||||
|
cp -r "$HL2_DEST_DIR/portal/bin" "$PORTAL_GAME_DIR/portal/bin"
|
||||||
|
cp -r "$HL2_DEST_DIR/hl2_launcher" "$PORTAL_GAME_DIR/hl2_osx"
|
||||||
|
|
||||||
|
cp "$PORTAL_GAME_DIR/steam_appid.txt" "$PORTAL_GAME_DIR/hl2/steam_appid.txt"
|
||||||
|
|
||||||
|
cd -1 || exit 1
|
||||||
|
'')
|
||||||
];
|
];
|
||||||
|
|
||||||
# Use a custom configuration.nix location.
|
# Use a custom configuration.nix location.
|
||||||
|
|
@ -49,7 +84,34 @@
|
||||||
no_quarantine = true;
|
no_quarantine = true;
|
||||||
|
|
||||||
};
|
};
|
||||||
brews = [ "borgbackup/tap/borgbackup-fuse" "firefoxpwa" "r" ];
|
taps = [
|
||||||
|
"homebrew/services"
|
||||||
|
"ybeapps/sourcegit"
|
||||||
|
{
|
||||||
|
name = "millironx/millironx";
|
||||||
|
clone_target =
|
||||||
|
"https://code.millironx.com/millironx/homebrew-millironx.git";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
brews = [
|
||||||
|
"borgbackup/tap/borgbackup-fuse"
|
||||||
|
{
|
||||||
|
name = "colima";
|
||||||
|
restart_service = true;
|
||||||
|
}
|
||||||
|
"docker"
|
||||||
|
"firefoxpwa"
|
||||||
|
"r"
|
||||||
|
|
||||||
|
# Portal built via hl2 source leak dependencies
|
||||||
|
"sdl2"
|
||||||
|
"freetype2"
|
||||||
|
"fontconfig"
|
||||||
|
"pkg-config"
|
||||||
|
"opus"
|
||||||
|
"libpng"
|
||||||
|
"libedit"
|
||||||
|
];
|
||||||
casks = [
|
casks = [
|
||||||
"alt-tab"
|
"alt-tab"
|
||||||
"anki"
|
"anki"
|
||||||
|
|
@ -59,17 +121,19 @@
|
||||||
"firefox"
|
"firefox"
|
||||||
"freetube"
|
"freetube"
|
||||||
"inkscape"
|
"inkscape"
|
||||||
|
"kdeconnect@nightly"
|
||||||
"logseq"
|
"logseq"
|
||||||
"macfuse"
|
"macfuse"
|
||||||
"musescore"
|
"musescore"
|
||||||
"nextcloud"
|
"nextcloud"
|
||||||
"obs"
|
"obs"
|
||||||
|
"ollama"
|
||||||
"openrct2"
|
"openrct2"
|
||||||
"porting-kit"
|
"porting-kit"
|
||||||
"qownnotes"
|
"qownnotes"
|
||||||
"rancher"
|
|
||||||
"rstudio"
|
"rstudio"
|
||||||
"signal"
|
"signal"
|
||||||
|
"stats"
|
||||||
"steam"
|
"steam"
|
||||||
"textmate"
|
"textmate"
|
||||||
"thunderbird@esr"
|
"thunderbird@esr"
|
||||||
|
|
@ -82,6 +146,7 @@
|
||||||
];
|
];
|
||||||
masApps = {
|
masApps = {
|
||||||
"Bitwarden" = 1352778147;
|
"Bitwarden" = 1352778147;
|
||||||
|
"Hidden Bar" = 1452453066;
|
||||||
"Tailscale" = 1475387142;
|
"Tailscale" = 1475387142;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue