Skip to content
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

olympus: init at 24.11.23.03 #309327

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

olympus: init at 24.11.23.03 #309327

wants to merge 2 commits into from

Conversation

Petingoso
Copy link
Contributor

@Petingoso Petingoso commented May 5, 2024

This is an attempt to package Olympus, a GUI for installing Everest and managing Celeste mods.
This is based on this draft, with the authors permission.

It is able to launch game instances if the user overrides celesteWrapper, at least steam-run is known to be working.

If the proper mime types weren't set by Olympurs properly, there will be a popup.
That can be toggled using the skipHandlerCheck variable if desired.

Finally, Lönn works as expected, being the installation managed by the program.

Ahorn is deprecated (in favor of Loenn) and it crashes over trying to run dynamic
executables

fixes #162887
Closes #295258

Description of changes

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added the 8.has: maintainer-list (update) This PR changes `maintainers/maintainer-list.nix` label May 5, 2024
@DontEatOreo
Copy link
Member

I would recommend you have the maintainers commit to be the first one and squash 2eeae0f01e5224dc59e9bd13ebf71d5d9dc77794 into a75b006a4fc0b1a837fcebf04212eafd3218ec88 so you can comply with the Commit Conventions

@Petingoso
Copy link
Contributor Author

Petingoso commented May 5, 2024

Just cherry picked the commits from https://github.com/NixOS/nixpkgs/pull/309026/commits to make the package cleaner
Edit: Commits have been removed as they have been merged.

@Petingoso Petingoso force-pushed the olympus branch 3 times, most recently from e545230 to 5dda007 Compare May 9, 2024 14:06
@IogaMaster
Copy link
Contributor

This seems to work great!

@DontEatOreo
Copy link
Member

Last commit should be squashed

@UlyssesZh
Copy link
Contributor

@ofborg eval

@UlyssesZh
Copy link
Contributor

I think you need to cherry-pick f705702?

@L1Z3
Copy link

L1Z3 commented Jul 6, 2024

Just tried this, and Lönn doesn't seem to be able to launch for me:

Expand for log
Error

[love "boot.lua"]:276: utils/filesystem.lua:2: module 'nfd' not found:
no field package.preload['nfd']no file 'selene/selene/lib/nfd.lua'
no file 'selene/selene/lib/nfd/init.lua'
no file 'nfd/nfd.lua'
no file 'olympUI/nfd.lua'
no file 'olympUI/nfd/init.lua'
no file 'nfd.lua'
no file 'nfd/init.lua'
no 'nfd' in LOVE game directories.
no file 'nfd' in LOVE paths.
no file './nfd.lua'
no file '/nix/store/8apx02hrz7bb9pmhcw88dj2k6jgj7pxl-luajit-2.1.1693350652/share/luajit-2.1/nfd.lua'
no file '/usr/local/share/lua/5.1/nfd.lua'
no file '/usr/local/share/lua/5.1/nfd/init.lua'
no file '/nix/store/8apx02hrz7bb9pmhcw88dj2k6jgj7pxl-luajit-2.1.1693350652/share/lua/5.1/nfd.lua'
no file '/nix/store/8apx02hrz7bb9pmhcw88dj2k6jgj7pxl-luajit-2.1.1693350652/share/lua/5.1/nfd/init.lua'
no file '/nix/store/z64mi9bhk1ypkl1znq9h4a3yf60500p1-nfd-22.12/lib/lua/5.1/nfd.so'
no file '/nix/store/77bibyn8ar44jfp2g3hk607jh4xaa0xj-lua5.1-subprocess-bfa8e9/lib/lua/5.1/nfd.so'
no file '/nix/store/bds733hnlwi1nmx4j2q9ipw8im5wc386-lua5.1-lsqlite3-0.9.6-1/lib/lua/5.1/nfd.so'


Traceback

[love "callbacks.lua"]:228: in function 'handler'
[C]: in function 'error'
[C]: in function 'xpcall'
[C]: in function 'xpcall'

@Petingoso
Copy link
Contributor Author

Huh I think I didn't put it as a runtime input, I'm checking if that might be the issue.

@Petingoso
Copy link
Contributor Author

Just tried this, and Lönn doesn't seem to be able to launch for me:
Expand for log

I figured it out, when I removed the patch from nfd I was using "nfd" instead of lua51Packages.nfd, meaning I wasn't installing lua modules.
I'll push the fix right now

@L1Z3
Copy link

L1Z3 commented Jul 7, 2024

Works great now, thanks!

Copy link
Contributor

@IogaMaster IogaMaster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks just started using Loenn

kylelovestoad pushed a commit to kylelovestoad/nixos-dotfiles that referenced this pull request Jul 15, 2024
@L1Z3
Copy link

L1Z3 commented Jul 21, 2024

Can be bumped to latest commit hash (5f3e40687eb825c57021f52d83a3bc9a82c04bdb) (which has official version number 24.07.06.02 according to the Azure Pipeline page.)

@Petingoso
Copy link
Contributor Author

I'll just check if stuff works fine and if all's good I'll edit the PR then.

@Petingoso
Copy link
Contributor Author

Petingoso commented Jul 22, 2024

Not sure if its reproduceable for anyone else but going from 6b4ceee45b51b913cf1d50bfb3ae645b21bba4f1 to 8f6e3ec1ab520904b1e0429ac194541d68a897b5 ( the following commit) gives an error relating to luajit-request.luajit-request.init. I'm trying to figure out what might be the issue but it doesn't seem to be making sense.

EDIT: it seems to be missing luajit-request? I dont see why it should be called from that commit

@L1Z3
Copy link

L1Z3 commented Jul 22, 2024

No, I don't get that error on commit 8f6e3ec1ab520904b1e0429ac194541d68a897b5 or on the latest commit. On both commits, it builds and runs fine for me. Are you doing something within Olympus that's causing the error to happen?

@Petingoso
Copy link
Contributor Author

No, I don't get that error on commit 8f6e3ec1ab520904b1e0429ac194541d68a897b5 or on the latest commit. On both commits, it builds and runs fine for me. Are you doing something within Olympus that's causing the error to happen?

I'm simply going from

      rev = "6b4ceee45b51b913cf1d50bfb3ae645b21bba4f1";
      fetchSubmodules = true; # Required. See upstream's README.
      hash = "sha256-FtvTELf8EZCkoAmMbgwxftxXOzdXy0P69RRMyPlRXUA=";

to

      rev = "5f3e40687eb825c57021f52d83a3bc9a82c04bdb";
      fetchSubmodules = true; # Required. See upstream's README.
      hash = "sha256-aSE0g2YzmFnbSRB8QZ9B+H1HCn92HZqKunVtbdn7oQc=";

and just launching the binary gives me an error. Are you bumping the revision in another way?

pre-initializing
cwd:	/nix/store/x1lzrlzjp8mwy7qj0s2yhfz7kkbb5wyg-olympus-24.04.23.02/lib/olympus
src:	/nix/store/x1lzrlzjp8mwy7qj0s2yhfz7kkbb5wyg-olympus-24.04.23.02/lib/olympus
storageDir:	/home/petnix/.config/Olympus
luajit-request not loaded
module 'luajit-request.luajit-request.init' not found:
	no field package.preload['luajit-request.luajit-request.init']
	no 'luajit-request/luajit-request/init' in LOVE game directories.
	no file 'luajit-request/luajit-request/init' in LOVE paths.
	no file './luajit-request/luajit-request/init.lua'
	no file '/nix/store/kvc6zy9pavv5k2vd419zzb992kwjjqqr-luajit-2.1.1713773202/share/luajit-2.1/luajit-request/luajit-request/init.lua'
	no file '/usr/local/share/lua/5.1/luajit-request/luajit-request/init.lua'
	no file '/usr/local/share/lua/5.1/luajit-request/luajit-request/init/init.lua'
	no file '/nix/store/kvc6zy9pavv5k2vd419zzb992kwjjqqr-luajit-2.1.1713773202/share/lua/5.1/luajit-request/luajit-request/init.lua'
	no file '/nix/store/kvc6zy9pavv5k2vd419zzb992kwjjqqr-luajit-2.1.1713773202/share/lua/5.1/luajit-request/luajit-request/init/init.lua'
	no file '/nix/store/gqsjg9k1gvyrfpv5h5vgp9pky4gz0dpa-lua5.1-nfd-scm-1/lib/lua/5.1/luajit-request/luajit-request/init.so'
	no file '/nix/store/br24aizl64vk638xkw7gq479grz4fxnq-lua5.1-subprocess-bfa8e9/lib/lua/5.1/luajit-request/luajit-request/init.so'
	no file '/nix/store/6p90k0szyd052csv8x4cdzs35m77k5h6-lua5.1-lsqlite3-0.9.6-1/lib/lua/5.1/luajit-request/luajit-request/init.so'
	no file '/nix/store/gqsjg9k1gvyrfpv5h5vgp9pky4gz0dpa-lua5.1-nfd-scm-1/lib/lua/5.1/luajit-request.so'
	no file '/nix/store/br24aizl64vk638xkw7gq479grz4fxnq-lua5.1-subprocess-bfa8e9/lib/lua/5.1/luajit-request.so'
	no file '/nix/store/6p90k0szyd052csv8x4cdzs35m77k5h6-lua5.1-lsqlite3-0.9.6-1/lib/lua/5.1/luajit-request.so'
Error: [love "boot.lua"]:276: utils.lua:24: module 'ui.utils' not found:
	no field package.preload['ui.utils']
	no 'ui/utils' in LOVE game directories.
	no file 'ui/utils' in LOVE paths.
	no file './ui/utils.lua'
	no file '/nix/store/kvc6zy9pavv5k2vd419zzb992kwjjqqr-luajit-2.1.1713773202/share/luajit-2.1/ui/utils.lua'
	no file '/usr/local/share/lua/5.1/ui/utils.lua'
	no file '/usr/local/share/lua/5.1/ui/utils/init.lua'
	no file '/nix/store/kvc6zy9pavv5k2vd419zzb992kwjjqqr-luajit-2.1.1713773202/share/lua/5.1/ui/utils.lua'
	no file '/nix/store/kvc6zy9pavv5k2vd419zzb992kwjjqqr-luajit-2.1.1713773202/share/lua/5.1/ui/utils/init.lua'
	no file '/nix/store/gqsjg9k1gvyrfpv5h5vgp9pky4gz0dpa-lua5.1-nfd-scm-1/lib/lua/5.1/ui/utils.so'
	no file '/nix/store/br24aizl64vk638xkw7gq479grz4fxnq-lua5.1-subprocess-bfa8e9/lib/lua/5.1/ui/utils.so'
	no file '/nix/store/6p90k0szyd052csv8x4cdzs35m77k5h6-lua5.1-lsqlite3-0.9.6-1/lib/lua/5.1/ui/utils.so'
	no file '/nix/store/gqsjg9k1gvyrfpv5h5vgp9pky4gz0dpa-lua5.1-nfd-scm-1/lib/lua/5.1/ui.so'
	no file '/nix/store/br24aizl64vk638xkw7gq479grz4fxnq-lua5.1-subprocess-bfa8e9/lib/lua/5.1/ui.so'
	no file '/nix/store/6p90k0szyd052csv8x4cdzs35m77k5h6-lua5.1-lsqlite3-0.9.6-1/lib/lua/5.1/ui.so'
stack traceback:
	[love "boot.lua"]:352: in function <[love "boot.lua"]:348>
	[C]: in function 'error'
	[love "boot.lua"]:276: in function <[love "boot.lua"]:126>
	[C]: in function 'xpcall'
	[love "boot.lua"]:362: in function <[love "boot.lua"]:355>
	[C]: in function 'xpcall'

@L1Z3
Copy link

L1Z3 commented Jul 22, 2024

Nope, I did the same (though I seem to have a different hash from you?), see my copy of the package here.

@Popax21
Copy link

Popax21 commented Nov 22, 2024

As a member of the Everest API org (who maintains Everest / Olympus), I have a few minor nitpicks which would be nice to see addressed here (which are by no means required for this package to be functional though!):

  • Olympus.Sharp builds just fine using the dotnet CLI; as such using mono's MSBuild to build it should not be required, a vanilla buildDotnetModule should work as well.
  • Löve uses LuaJIT by default, so lua51Packages should probably be swapped for luajitPackages
  • there's no need to use 0x0ade's lua-subprocess fork; the standard NixOS luajitPackages.lua-subprocess suffices. The repository is mainly aimed at Windows compatibility (not a concern here), and adding a .rockspec (not required since Nix can already build it on its own)
  • MiniInstaller uses Piton, which is a custom .NET apphost which downloads the .NET runtime on-demand if needed. As such I would recommend adding dotnet-runtime to the FHS, otherwise Piton will download its own copy of the runtime.
  • Olympus reads its own version from a file called version.txt. It would probably be a good idea if your package could create this file as well.
  • (very nitpicky) the only part of Olympus which requires a FHS is launching MiniInstaller / Lönn, both of which is handled by Olympus.Sharp. As such it would suffice if you FHS-wrapped only Olympus.Sharp, and left the Löve frontend running as-is (switching this over has no direct advantages afaik, but thought I would still put this here).
  • if you can think of a generic, non-invasive way of bypassing the Steam launch issue upstream, please let me know, and I'll look into getting it merged

@UlyssesZh
Copy link
Contributor

if you can think of a generic, non-invasive way of bypassing the Steam launch issue upstream, please let me know, and I'll look into getting it merged

I think using steam:// URL to launch can be a fix. This sounds simple but may have difficulties. I looked into this long time ago and forgot what the difficulties are. Related: EverestAPI/Olympus#94.

@Petingoso Petingoso force-pushed the olympus branch 8 times, most recently from f6e669d to 96279d3 Compare November 23, 2024 19:00
@Petingoso Petingoso changed the title olympus: init at 24.07.06.02 olympus: init at 24.11.23.01 Nov 23, 2024
maintainers: add ulysseszhan
pkgs/by-name/ol/olympus/package.nix Outdated Show resolved Hide resolved
pkgs/by-name/ol/olympus/package.nix Outdated Show resolved Hide resolved
pkgs/by-name/ol/olympus/package.nix Outdated Show resolved Hide resolved
@ofborg ofborg bot requested a review from UlyssesZh November 26, 2024 12:45
This is an attempt to package [Olympus](https://everestapi.github.io/), a GUI for installing Everest and managing Celeste mods.
This is based on this [draft](NixOS#295258), with the authors permission.

It maintains the previous issue of not being able to launch Steam
versions of Celeste from the command line but that's not feasible
without upstream changes.

I only have to note that it has a popup complaining about
finishing the installation but that's due to xdg-mime
x-scheme-handler/everest not being set.

Finally I want to note that it depends on lua51Packages.nfd, which
is broken while [this](NixOS#309026)
isn't merged so currently has the fix there.

Finally, [Lönn](https://github.com/CelestialCartographers/Loenn) works
as expected, being the installation managed by the program.

Ahorn is deprecated(in favor of Loenn) and it crashes over trying to run dynamic
executables

olympus: fixed zenity argument

olympus: bugfix add openssl to fhs

olympus: fixed to use the default nfd instead of patched version

olympus: changed location of ndf arg

olympus: bugfix: add xdg-utils as runtime dependency to fix pop-up

olympus: deleted zenity.patch

Due to nfd lua package being fixed, this patch is no longer needed

olympus: fix use of wrong nfd package

olympus: bumped up version to 24.07.06.02

olympus: format files with nixfmt-rfc

olympus: chores: comments, fixed lib conventions

olympus: make wrappers properly, use standard build process, misc fixes

* olympus: update version, src; add updateScript

* olympus: avoid rec; use lib.getExe; remove redundant .out; minor changes

* olympus: use standard build process for dotnet; remove -nixos suffix in version; use new mono; add dotnet-runtime to fhs env

* olympus: 24.10.27.02 -> 24.11.23.01; fix version.txt; remove unnecessary dependencies; add miniinstaller and celeste wrapper; other misc change
olympus-with-steam-run: init

* olympus: more flexible celeste wrapper

* olympus: accept emptry string and path as celeste wrapper; minor fix with lua cpath

* olympus: minor fix with lua cpath; add xdg-utils to path

olympus: use standard lua-subprocess instead of fork

olympus: make MiniInstaller be properly wrapped

olympus: add option to skip handler

olympus: tweaked platforms, tweaked miniinstaller-fhs

olympus-with-steam-run: comment for reminder on fixing issues with
relative paths

olympus: removed extraneous package

olympus: add extra wrapper options for mininstaller and loenn

olympus: add more explicit comments, bump version
@Petingoso Petingoso changed the title olympus: init at 24.11.23.01 olympus: init at 24.11.23.03 Nov 27, 2024
@wegank wegank added the 12.approvals: 2 This PR was reviewed and approved by two reputable people label Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.has: maintainer-list (update) This PR changes `maintainers/maintainer-list.nix` 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 1-10 10.rebuild-darwin: 1 10.rebuild-linux: 1-10 10.rebuild-linux: 1 11.by: package-maintainer This PR was created by the maintainer of the package it changes 12.approvals: 2 This PR was reviewed and approved by two reputable people
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Packaging request: olympus
10 participants