-
Notifications
You must be signed in to change notification settings - Fork 21
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 #252
Comments
Would it be possible to do Nix detection in a different way, like compiling with a specific env variable set, and then adjusting the start command automatically? |
this sounds like a reasonable thing, so we don't need to do anything our side if i understand correctly? |
Yes. And maybe also adding some reference to such a nix package for nix users that visit the project. |
whats the link to the nix package? |
Nix binaries aren't compatible with FHS Linux distros so you can't patch the one supplied here without breaking it for everyone else. I'm not sure what the actual problem described here is, so not sure why you need I had a quick look at the code, and it only searches for Steam / proton, those playing via GOG could also be using wine or a launcher for wine like lutris, so maybe that would be a use case for a flag like this. With that being said, steam-run does work fine here, and it's basically expected for your average nix user to know about using steam-run for non-nix packaged binaries. Something worth noting is that the app seems to save data in the same directory as the binary[1], this won't work for packaging as most linux distros install apps in read-only directories. Something like this should build the package: { lib, fetchFromGitHub, rustPlatform, python3, wayland, xorg, libxkbcommon, libGL }:
rustPlatform.buildRustPackage rec {
pname = "noita_entangled_worlds";
version = "v0.32.6";
src = fetchFromGitHub {
owner = "IntQuant";
repo = pname;
rev = version;
hash = "sha256-fpj4vBhMws3o3Gs/hq94+ITd4AtuKoVHnAlt/PWwLIU=";
};
sourceRoot = "source/noita-proxy";
cargoHash = "sha256-AMnI0mvSuEDRPolcBgR6aCXaiRgMn1qpWjlksLjhvwQ=";
# tests fail due to no internet
doCheck = false;
nativeBuildInputs = [ python3 ];
buildInputs = [
libxkbcommon
libGL
# WINIT_UNIX_BACKEND=wayland
wayland
# WINIT_UNIX_BACKEND=x11
xorg.libXcursor
xorg.libXrandr
xorg.libXi
xorg.libX11
];
postInstall = ''
mkdir -p $out/lib
cp $src/redist/libsteam_api.so $out/lib/libsteam_api.so
'';
postFixup = ''
patchelf --add-rpath "${lib.makeLibraryPath buildInputs}" $out/bin/noita-proxy
'';
meta = {
description = "Noita Co-op multiplayer mod";
homepage = "https://github.com/IntQuant/noita_entangled_worlds";
license = lib.licenses.mit;
maintainers = [ ];
};
} Error log:
|
Nix's default steam package comes with a default
steam-run
launcher that ensures all needed dependencies are present to run steam-related applications, such asv2_entry-point
.There are some possible solutions I have thought of:
steam-run
for nix users.noita_proxy
) and as such is best served as a third-party nix derivation.The first one is significantly simpler if you're okay with adding a sub-section to the README. I can do a PR.
The text was updated successfully, but these errors were encountered: