130 lines
3.9 KiB
Markdown
130 lines
3.9 KiB
Markdown
# skate3recomp — NixOS package
|
|
|
|
Nix packaging for [skate3recomp](https://github.com/mchughalex/skate3recomp), an unofficial native
|
|
recompilation of the Xbox 360 version of Skate 3 for Windows and Linux.
|
|
|
|
> **You must own a legitimate Xbox 360 copy of Skate 3.**
|
|
> This package does not include retail game files.
|
|
|
|
---
|
|
|
|
## Files
|
|
|
|
| File | Purpose |
|
|
|---|---|
|
|
| `package.nix` | `stdenv.mkDerivation` derivation (nixpkgs-style) |
|
|
| `default.nix` | Entry-point for `nix-build` / `nix-shell` local testing |
|
|
|
|
---
|
|
|
|
## Before you build — get the SHA256 hash
|
|
|
|
The `hash` field in `package.nix` is a placeholder. Fill it in by running:
|
|
|
|
```bash
|
|
nix store prefetch-file --hash-type sha256 --unpack \
|
|
https://github.com/mchughalex/skate3recomp/releases/download/v1.0.4/Skate3Recomp-Linux.zip
|
|
```
|
|
|
|
Paste the printed `sha256-…` value into the `hash =` line in `package.nix`.
|
|
|
|
---
|
|
|
|
## Local test build
|
|
|
|
```bash
|
|
# Build (requires allowUnfree — the upstream has no OSS licence)
|
|
NIXPKGS_ALLOW_UNFREE=1 nix-build
|
|
|
|
# Run directly from the result symlink
|
|
./result/bin/skate3recomp
|
|
```
|
|
|
|
---
|
|
|
|
## NixOS module / overlay usage
|
|
|
|
Add this to your flake or configuration:
|
|
|
|
```nix
|
|
# flake.nix (packages output)
|
|
packages.x86_64-linux.skate3recomp = pkgs.callPackage ./skate3recomp/package.nix { };
|
|
|
|
# or as an overlay
|
|
nixpkgs.overlays = [
|
|
(final: prev: {
|
|
skate3recomp = final.callPackage ./skate3recomp/package.nix { };
|
|
})
|
|
];
|
|
|
|
# then in environment.systemPackages or home.packages:
|
|
environment.systemPackages = [ pkgs.skate3recomp ];
|
|
```
|
|
|
|
---
|
|
|
|
## Runtime setup
|
|
|
|
On first launch the app shows a file-picker dialog to select your Skate 3 ISO.
|
|
Game data is extracted to `~/.local/share/skate3recomp` by default.
|
|
|
|
To use a custom location, set `SKATE3_DATA_DIR` before launching:
|
|
|
|
```bash
|
|
SKATE3_DATA_DIR=/mnt/games/skate3 skate3recomp
|
|
```
|
|
|
|
The wrapper also passes `--input_backend=sdl` automatically, which is the correct
|
|
mode for Linux (matches the upstream `run-linux.sh` script).
|
|
|
|
### Controller input
|
|
|
|
An Xbox controller is the recommended input method. DualShock and other
|
|
controllers work through SDL's generic XInput mapping. Keyboard controls can be
|
|
enabled in the in-game settings menu (Escape to open).
|
|
|
|
### AMD GPU (RX 580) notes
|
|
|
|
- The game uses **Vulkan**. Your system needs `amdvlk` or `mesa` (radv) in
|
|
`hardware.opengl.extraPackages` / `hardware.graphics.extraPackages` (NixOS 26.05+):
|
|
|
|
```nix
|
|
hardware.graphics = {
|
|
enable = true;
|
|
extraPackages = with pkgs; [ amdvlk mesa.drivers ];
|
|
};
|
|
```
|
|
|
|
- RADV (Mesa) is generally preferred over AMDVLK for this type of workload.
|
|
- If you see a blank screen on Wayland, try forcing X11:
|
|
`SDL_VIDEODRIVER=x11 skate3recomp`
|
|
|
|
---
|
|
|
|
## Troubleshooting
|
|
|
|
| Symptom | Fix |
|
|
|---|---|
|
|
| `error: ... is not licensed` | Set `NIXPKGS_ALLOW_UNFREE=1` or add `nixpkgs.config.allowUnfree = true` |
|
|
| `libvulkan.so.1: cannot open` | Add `vulkan-loader` to your system packages or check GPU driver packages |
|
|
| `librexruntime.so: cannot open` | The wrapper sets `LD_LIBRARY_PATH`; if running the binary directly, set it manually: `LD_LIBRARY_PATH=$out/lib/skate3recomp ./skate3` |
|
|
| App opens but no ISO dialog | Make sure `gtk3` is available; it provides the file-picker |
|
|
| Audio crackling | v1.0.4 fixed most audio issues; if it persists, try `SDL_AUDIODRIVER=pipewire skate3recomp` |
|
|
| Wayland black screen | Set `SDL_VIDEODRIVER=x11` to fall back to XWayland |
|
|
|
|
---
|
|
|
|
## How autoPatchelfHook works here
|
|
|
|
The zip contains two prebuilt ELFs compiled on Ubuntu 24.04:
|
|
|
|
- `skate3` — the main executable
|
|
- `librexruntime.so` — the rexglue runtime shared library
|
|
|
|
`autoPatchelfHook` patches both binaries' `RPATH` and interpreter (`PT_INTERP`)
|
|
so they resolve against the correct Nix store paths rather than
|
|
`/lib/x86_64-linux-gnu/`. The wrapper then adds `$out/lib/skate3recomp` to
|
|
`LD_LIBRARY_PATH` so `skate3` can find `librexruntime.so` at runtime.
|
|
|
|
No AppImage, no SquashFS offset, no FHS env needed — the zip is a plain ELF bundle.
|