slippi-launcher-bin: init

AppImage build
This commit is contained in:
2025-06-24 15:01:53 -06:00
parent 4e6643fc53
commit 4183e23bcb
3 changed files with 77 additions and 0 deletions

2
.gitignore vendored
View File

@@ -1,3 +1,5 @@
result result
result-* result-*
slippi-ld-log.*

View File

@@ -19,5 +19,22 @@
lib.filterAttrs lib.filterAttrs
(_: v: lib.isDerivation v) (_: v: lib.isDerivation v)
self.legacyPackages.${system}); self.legacyPackages.${system});
devShells.x86_64-linux.slippi =
let
pkgs = import inputs.nixpkgs { system = "x86_64-linux"; };
in self.packages.x86_64-linux.slippi-launcher.env.overrideAttrs
(final: prev: {
shellHook =
builtins.replaceStrings
["exec \"\${cmd[@]}\""]
[''
echo "''${cmd[-1]}"
unset cmd[-1]
cmd+=("$SHELL")
exec "''${cmd[@]}"
'']
prev.shellHook;
});
}; };
} }

View File

@@ -0,0 +1,58 @@
{ lib
, appimageTools
, fetchurl
, fuse3
, makeWrapper
}:
# WARNING: This package is a fucking hack! Two things:
#
# - You must manually patch the Dolphin emulator installed by Slippi. After
# Dolphin is installed (i.e. once the 'play' button is clickable), you must
# navigate to ~/.cache/appimage-run/*/apprun-hooks/linux-env.sh and
# delete/comment the lines modifying LD_LIBRARY_PATH. I hope to fix this at
# some point, but it took me like 15 hours just to attain this bare minimum
# functionality, rofl. Good luck. Open an issue or contact me (msyds) if you
# need assistance.
#
# - Requires
# programs.appimage = {
# enable = true;
# binfmt = true;
# };
# in your NixOS config. This is because Slippi tries to run the Dolphin
# AppImage like a normal executable.
appimageTools.wrapType2 rec {
pname = "slippi-launcher";
version = "2.11.10";
src = fetchurl {
url = "https://github.com/project-slippi/slippi-launcher/releases/download/v${version}/Slippi-Launcher-${version}-x86_64.AppImage";
hash = "sha256-OrWd0jVqe6CzNbVRNlm2alt2NZ8uBYeHiASaB74ouW4=";
};
nativeBuildInputs = [
makeWrapper
];
extraPkgs = pkgs: [
pkgs.fuse3
];
extraInstallCommands = ''
wrapProgram $out/bin/slippi-launcher \
--set FUSERMOUNT_PROG "${fuse3}/bin/fusermount3" \
--add-flags "''${NIXOS_OZONE_WL:+''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime=true}}"
'';
# note to madddy./.. DELETE "ubuntu is stupid" LINE FROM ~/.cache/appimage-run/XXXXX/shell-hooks/a
meta = {
description = "The way to play Slippi Online and watch replays.";
homepage = "https://github.com/project-slippi/slippi-launcher";
downloadPage = "https://github.com/project-slippi/slippi-launcher/releases";
license = lib.licenses.gpl3;
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
platforms = [ "x86_64-linux" ];
};
}