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

osu-lazer: init at 2020.714.0 #85021

Merged
merged 3 commits into from Jul 16, 2020
Merged

osu-lazer: init at 2020.714.0 #85021

merged 3 commits into from Jul 16, 2020

Conversation

oxalica
Copy link
Contributor

@oxalica oxalica commented Apr 11, 2020

Motivation for this change

Add a new package osu-lazer, a rhythm game.
Home page: https://osu.ppy.sh
Repository (osu!lazer): https://github.com/ppy/osu

It seems to have darwin releases, but I'm not familiar with it. Anyone help?
Now it is built from source, targeting only x86_64-linux.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
    • 441.2M
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

pkgs/games/osu/default.nix Outdated Show resolved Hide resolved
Copy link
Member

@cole-h cole-h left a comment

Choose a reason for hiding this comment

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

It runs just fine, but I get no sound, and the following is printed:

ALSA lib dlmisc.c:285:(snd1_dlobj_cache_get) Cannot open shared library /nix/store/gac5607idcq82hmlr2filyjlygizwgky-alsa-lib-1.1.9/lib/alsa-lib/libasound_module_pcm_pulse.so ((null): /nix/store/gac5607idcq82hmlr2filyjlygizwgky-alsa-lib-1.1.9/lib/alsa-lib/libasound_module_pcm_pulse.so: cannot open shared object file: No such file or directory)

Could just be a quirk of me not being on NixOS, though. I'd recommend finding someone else to verify or refute my claim.

@symphorien
Copy link
Member

It's easier said than done, but did you try building from source ? Apparently there are utilities to build dot net projects in nixpkgs, see an example with keepass: https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/misc/keepass/default.nix

@dramforever
Copy link
Contributor

It seems that osu!lazer's code is licensed under MIT as shown here, but the assets are licensed under CC-BY-NC 4.0 as shown here. I don't know where that puts the binary releases, and I also don't know how to describe 'part MIT, part CC', but it's something to take note of.

@oxalica
Copy link
Contributor Author

oxalica commented Apr 13, 2020

@symphorien
Simply using buildDotnetPackage results in build failure as below.

The default XML namespace of the project must be the MSBuild XML namespace. If the project is authored in the MSBuild 2003 format, please add xmlns="http://schemas.microsoft.com/developer/msbuild/2003" to the element. If the project has been authored in the old 1.0 or 1.2 format, please convert it to MSBuild 2003 format.

Seems the format of project file is too new for mono xbuild. And if you add xmlns as the description, it will produce more errors about unrecognized attributes.

@symphorien
Copy link
Member

Ah ok. Thanks for trying anyway.

@oxalica
Copy link
Contributor Author

oxalica commented Apr 15, 2020

  • Re-package to build from source with dotnet.
  • Fix license.
  • Bump to 2020.413.0
  • Rename package name to osu-lazer (following AUR)

It works on nixos but still crash in my lubuntu VM. It seems to be something wrong with X11 and/or OpenGL.
Here's the error log:

Unhandled exception. osuTK.Graphics.GraphicsContextException: Invalid window
   at osuTK.Platform.SDL2.Sdl2GraphicsContext..ctor(GraphicsMode mode, IWindowInfo win, IGraphicsContext shareContext, Int32 major, Int32 minor, GraphicsContextFlags flags)
   at osuTK.Platform.SDL2.Sdl2Factory.CreateGLContext(GraphicsMode mode, IWindowInfo window, IGraphicsContext shareContext, Boolean directRendering, Int32 major, Int32 minor, GraphicsContextFlags flags)
   at osuTK.Graphics.GraphicsContext..ctor(GraphicsMode mode, IWindowInfo window, IGraphicsContext shareContext, Int32 major, Int32 minor, GraphicsContextFlags flags)
   at osuTK.Graphics.GraphicsContext..ctor(GraphicsMode mode, IWindowInfo window, Int32 major, Int32 minor, GraphicsContextFlags flags)
   at osuTK.GameWindow..ctor(Int32 width, Int32 height, GraphicsMode mode, String title, GameWindowFlags options, DisplayDevice device, Int32 major, Int32 minor, GraphicsContextFlags flags, IGraphicsContext sharedContext, Boolean isSingleThreaded)
   at osuTK.GameWindow..ctor(Int32 width, Int32 height, GraphicsMode mode, String title, GameWindowFlags options, DisplayDevice device, Int32 major, Int32 minor, GraphicsContextFlags flags, IGraphicsContext sharedContext)
   at osuTK.GameWindow..ctor(Int32 width, Int32 height, GraphicsMode mode, String title, GameWindowFlags options, DisplayDevice device, Int32 major, Int32 minor, GraphicsContextFlags flags)
   at osuTK.GameWindow..ctor(Int32 width, Int32 height, GraphicsMode mode, String title, GameWindowFlags options, DisplayDevice device)
   at osuTK.GameWindow..ctor(Int32 width, Int32 height, GraphicsMode mode)
   at osu.Framework.Platform.GameWindow..ctor(Int32 width, Int32 height)
   at osu.Framework.Platform.DesktopGameWindow..ctor()
   at osu.Framework.Platform.Linux.LinuxGameWindow..ctor()
   at osu.Framework.Platform.Linux.LinuxGameHost.CreateWindow()
   at osu.Framework.Platform.GameHost.Run(Game game)
   at osu.Desktop.Program.Main(String[] args) in /build/source/osu.Desktop/Program.cs:line 57

@symphorien
Copy link
Member

OpenGL is impure and sometimes does not work on non NixOS: see https://github.com/guibou/nixGL for a possible solution.

@oxalica
Copy link
Contributor Author

oxalica commented Apr 28, 2020

Bumped to 2020.421.0 with some tiny fixes.

OpenGL is impure and sometimes does not work on non NixOS: see https://github.com/guibou/nixGL for a possible solution.

I checked nixGL and it run successfully in my lubuntu VM, without display or audio problem.
Well, I don't think the OpenGL issue should be solved by package itself, since hard-coding drivers is a bad idea.

@cole-h What do you think?

@oxalica oxalica requested a review from cole-h April 28, 2020 14:00
@oxalica oxalica changed the title osu: init at 2020.408.1 osu-lazer: init at 2020.421.0 Apr 28, 2020
Copy link
Member

@cole-h cole-h left a comment

Choose a reason for hiding this comment

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

I get a build failure using nixpkgs-review:

builder for '/nix/store/1nrhdv1cgyh9r8dqmdsss9z82f3na340-osu-lazer-2020.421.0.drv' failed with exit code 2; last 10 log lines:
      0 Warning(s)
      0 Error(s)

  Time Elapsed 00:00:14.51
  installing
  Microsoft (R) Build Engine version 16.4.0+e901037fe for .NET Core
  Copyright (C) Microsoft Corporation. All rights reserved.

    osu.Desktop -> /nix/store/ghp1mgw009wnzdia1swg5piwmhba5llx-osu-lazer-2020.421.0/lib/osu/
  /nix/store/shr8mc5hx0vasv92b307mzymj2b5fxxl-stdenv-linux/setup: eval: line 1307: syntax error near unexpected token `('
cannot build derivation '/nix/store/ysx6famjfkaqn93dnb9c99i0lpbzbz07-env.drv': 1 dependencies couldn't be built
[288 built (1 failed), 10 copied (60.1 MiB), 38.4 MiB DL]
error: build of '/nix/store/ysx6famjfkaqn93dnb9c99i0lpbzbz07-env.drv' failed
https://github.com/NixOS/nixpkgs/pull/85021
1 package failed to build:
osu-lazer

pkgs/games/osu-lazer/default.nix Outdated Show resolved Hide resolved
@oxalica oxalica requested a review from cole-h April 28, 2020 16:06
@oxalica
Copy link
Contributor Author

oxalica commented May 1, 2020

Ping @cole-h

Copy link
Member

@cole-h cole-h left a comment

Choose a reason for hiding this comment

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

I can't really approve this because I still don't get audio on my Arch+Nix system. But it builds fine and runs fine apart from that.

ALSA lib dlmisc.c:283:(snd_dlobj_cache_get0) Cannot open shared library /nix/store/i58krnmjdd5aq47jxxljz99csk91v1s8-alsa-lib-1.2.2/lib/alsa-lib/libasound_module_pcm_pulse.so ((null): /nix/store/i58krnmjdd5aq47jxxljz99csk91v1s8-alsa-lib-1.2.2/lib/alsa-lib/libasound_module_pcm_pulse.so: cannot open shared object file: No such file or directory)

LGTM, otherwise.

[5 built, 0.0 MiB DL]
https://github.com/NixOS/nixpkgs/pull/85021
1 package built:
osu-lazer

EDIT: Also, please update the PR title again ;)

@oxalica oxalica changed the title osu-lazer: init at 2020.421.0 osu-lazer: init at 2020.429.0 May 1, 2020
@oxalica
Copy link
Contributor Author

oxalica commented May 10, 2020

Rebased and bumped to 2020.508.2

@cole-h I've setup-ed an clean Arch Linux virtual machine but cannot reproduce the ALSA error. Audio and video both works fine. Is LD_LIBRARY_PATH set in your environment? (Mine is empty)

Screenshot_20200510_165931

Installed packages in my test environment:

> pacman -Qet
base 2-2
dhcpcd 9.0.2-1
gpicview 0.2.5-4
grub 2:2.04-6
lxappearance-obconf 0.2.3-2
lxde-common 0.99.2-2
lxdm 0.5.3-6
lxhotkey 0.1.0-2
lxinput 0.3.5-2
lxlauncher 0.2.5-3
lxmusic 0.4.7-2
lxpanel 0.10.0-1
lxrandr 0.3.2-1
lxsession 1:0.5.5-1
lxtask 0.1.9-1
lxterminal 0.3.2-2
openssh 8.2p1-3
pcmanfm 1.3.1-1
rsync 3.1.3-3
screenfetch 3.9.1-1
sudo 1.8.31.p1-1
vim 8.2.0717-2

@oxalica oxalica changed the title osu-lazer: init at 2020.429.0 osu-lazer: init at 2020.508.2 May 10, 2020
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/2-large-files-in-nix-store-how-to-remove-them/7120/2

@oxalica
Copy link
Contributor Author

oxalica commented May 13, 2020

Ping @cole-h

Copy link
Member

@cole-h cole-h left a comment

Choose a reason for hiding this comment

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

Diff LGTM, binary runs. Still no sound, which means it's a problem with my crufty machine (and thus not a blocker for merging this).

[4 built, 7 copied (700.8 MiB), 171.9 MiB DL]
https://github.com/NixOS/nixpkgs/pull/85021
1 package built:
osu-lazer

@oxalica oxalica changed the title osu-lazer: init at 2020.508.2 osu-lazer: init at 2020.523.0 May 27, 2020
@oxalica
Copy link
Contributor Author

oxalica commented May 27, 2020

@cole-h What is blocking this now?

@cole-h
Copy link
Member

cole-h commented May 27, 2020

@cole-h What is blocking this now?

Waiting on an interested party that has merge capabilities and is willing to exercise that ability.

@oxalica oxalica changed the title osu-lazer: init at 2020.523.0 osu-lazer: init at 2020.603.0 Jun 11, 2020
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-in-distress/3604/28

@oxalica
Copy link
Contributor Author

oxalica commented Jul 8, 2020

  • Squash and bumped to 2020.707.0
  • Add passthru.updateScript

@oxalica oxalica changed the title osu-lazer: init at 2020.603.0 osu-lazer: init at 2020.707.0 Jul 8, 2020
Copy link
Member

@dali99 dali99 left a comment

Choose a reason for hiding this comment

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

Built and tested

2020.714.0 is out now too so needs a bump

@dali99 dali99 mentioned this pull request Jul 16, 2020
13 tasks
@skykanin
Copy link
Contributor

skykanin commented Jul 16, 2020

Hey, I made a PR for this back in May, but was never able to get it working properly so I closed it in favour of this one. Built this on my NixOS machine and it worked perfectly including no audio issues. Other than needing a bump to version 2020.714.0 this looks good to me. ❤️

@skykanin
Copy link
Contributor

Also the PR title needs to be updated to reflect version bump

@oxalica oxalica changed the title osu-lazer: init at 2020.707.0 osu-lazer: init at 2020.714.0 Jul 16, 2020
@infinisil infinisil merged commit 2a74034 into NixOS:master Jul 16, 2020
@oxalica oxalica deleted the osu branch July 17, 2020 11:22
@catern
Copy link
Contributor

catern commented Nov 5, 2020

I'm mentioning this here because maybe it's a packaging bug, it looks like none of the networked functionality of osu is working - downloading beatmaps, making an osu account, etc. Anyone else observing this? I'm guessing this might be because of the disabled tamper-detection?

Kind of makes it unusable since you need to have osu to even make an osu account, which is necessary even to download beatmaps out-of-band :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants