-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NixOS Support #164
base: slippi
Are you sure you want to change the base?
NixOS Support #164
Conversation
94feec2
to
6edefd3
Compare
First of all, nice to see a fellow smasher+nixOS user! :) edit: Nevermind, your suggestion does build, I messed up. Nevertheless, I'll leave my solution here for future reference. It uses the appimage and gives it its runtime dependencies through a nix-shell:
I'm currently using this. It's a little hacky with the nix-shell and it's just the netplay client for now, but it's also got the user config set correctly. It puts I didn't want to add an extra PR for this, as it addresses the same problem. But since this is a working, simple solution, It might be worth including as an option. |
Thanks @boogewooge! Just for your information, I've started packaging SSBM utilities ( This is an updated derivation for Slippi from 6 days ago when my build on nixos-unstable stopped working: https://github.com/djanatyn/ssbm-nix/blob/9ccbeb2543a19bc8be195b1ad3e7f3489489f1de/slippi/default.nix There is a broken derivation for some unreleased chat code, which I think needs to integrate with: https://github.com/project-slippi/slippi-ssbm-asm I haven't ported everything over yet, but I'm hoping to keep |
Btw, with bd7da42 you can do a nonportable install so you can use the ordinary .config path for user.json instead of specifying it manually. I've been using this for my local 2.2.3 slippi derivation and am able to play online. I'm also working on a devkitPPC derivation based on pkgsCross.powerpc-embedded, so I'm definitely interested in reproducible asm codes. Would love to help out with Nix efforts, and hopefully we can get these upstreamed into nixpkgs so they're in the binary cache. |
Oh, and here's a simple AppImage wrapper: { stdenv
, appimage-run
, fetchurl
, gmp
, vulkan-loader
, writeScriptBin
}:
let
src = fetchurl {
url = "https://github.com/project-slippi/Ishiiruka/releases/download/v2.2.3/Slippi_Online-x86_64.AppImage";
sha256 = "1jnkj78l8dfwkx8gxhlxnnli0hvgancxjb60fmgplgk6fpp9jxpg";
};
in
writeScriptBin "slippi-appimage" ''
#!/usr/bin/env bash
export LD_LIBRARY_PATH=${gmp}/lib:${vulkan-loader}/lib
${appimage-run}/bin/appimage-run ${src}
'' |
That's awesome! I'll definitely keep my eyes on this. You've got some cool plans there. I haven't heard of niv before. Maybe I should read up a bit, it seems useful?
I didn't know about |
Hmm, works fine for me. The appimage itself doesn't need to be executable because it's loaded by appimage-run. What error are you getting? |
Hmm. I'm getting Edit: Running |
Maybe try pinning to the same nixpkgs as me? See if this will run: with import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/40a7c98c1c56ff646cc03e938d980423483b2641.tar.gz") {};
callPackage ./slippi-appimage.nix {} (where slippi-appimage.nix is the snippet I posted before) Also, fetchurl takes an optional executable arg, so failing that you could modify the src to src = fetchurl {
url = "https://github.com/project-slippi/Ishiiruka/releases/download/v2.2.3/Slippi_Online-x86_64.AppImage";
sha256 = "14564slvqb6rr2y2vxn8h668bdxhmi6pci0ncibnj6fcdw9pqsay";
executable = true;
}; |
Hello fellow nixers/smashers! Just though I'd share how I've been running it since the approach hasn't been shown yet. { appimageTools }:
let
version = "2.2.3";
in
appimageTools.wrapType2 {
name = "slippi-online";
extraPkgs = pkgs: [ pkgs.gmp ];
src = builtins.fetchurl {
url = "https://github.com/project-slippi/Ishiiruka/releases/download/v${version}/Slippi_Online-x86_64.AppImage";
sha256 = "1jnkj78l8dfwkx8gxhlxnnli0hvgancxjb60fmgplgk6fpp9jxpg";
};
} |
b0868c6
to
aaad1a2
Compare
I was able to get it working in 2023 for 23.05 by adding to environment.systemPackages:
Based on the previous comment I had an issue that appeared with the AppImage related to mpg123, so I added those two |
This PR seems a bit old and stale but I do want to shout out my #407 which actually adds an "install mode" for global installation (similar to just This allows for native installation but does not use the native launcher which it seems you want (?). Otherwise it's fine if you still want to play online, but you need the launcher or fixed-up appimage for replays Obviously allows support for non-AppImage builds because I can't use AppImage either here |
NixOS isn't able to run the AppImages built from CI:
This PR provides a workaround, which can be used either from checking out the repository:
or from including a reference to a commit in a NixOS system configuration file:
The upstream dependencies are vendored using
niv
, so every user runningnix-build
will download the same set of upstream dependency packages. There are instructions inUSAGE.md
for updating the vendored upstream dependencies.Because NixOS packages are installed to read-only filesystems, you need to use a user config directory to persist any configuration changes:
The
user.json
file should be installed in this config directory as well. This is not managed by the package.I've been using and developing this derivation since the initial release of Slippi netplay. Thanks for creating something incredible!