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

opengamepadui: init at 0.35.7 #368017

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

Conversation

ShadowApex
Copy link
Contributor

Description of changes

Adds a derivation to run OpenGamepadUI on NixOS.

OpenGamepadUI is a free and open source game launcher and overlay written using the Godot Game Engine designed for a console-like, gamepad native experience in mind. Features include:

  • In-game overlay menus
  • Power tools (TDP control, SMT, etc.) through PowerStation
  • Fully configurable gamepad input (buttons, axes, mouse & keyboard, etc.) through InputPlumber
  • Per-game customizable gamepad profiles
  • Launch games from multiple sources
  • Automatic artwork downloading
  • Plugin architecture

The gamescope session config for OpenGamepadUI is based off of the equivalent Steam gamescope session.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • 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/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 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 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: documentation This PR adds or changes documentation 8.has: changelog 8.has: module (update) This PR changes an existing module in `nixos/` labels Dec 24, 2024
pkgs/by-name/op/opengamepadui/package.nix Outdated Show resolved Hide resolved
pkgs/by-name/op/opengamepadui/package.nix Show resolved Hide resolved
pkgs/by-name/op/opengamepadui/package.nix Outdated Show resolved Hide resolved
pkgs/by-name/op/opengamepadui/package.nix Outdated Show resolved Hide resolved
pkgs/by-name/op/opengamepadui/package.nix Outdated Show resolved Hide resolved
pkgs/by-name/op/opengamepadui/package.nix Outdated Show resolved Hide resolved
pkgs/by-name/op/opengamepadui/package.nix Outdated Show resolved Hide resolved
pkgs/by-name/op/opengamepadui/package.nix Show resolved Hide resolved
pkgs/by-name/op/opengamepadui/package.nix Outdated Show resolved Hide resolved
nixos/modules/programs/opengamepadui.nix Outdated Show resolved Hide resolved
nixos/modules/programs/opengamepadui.nix Show resolved Hide resolved
nixos/modules/programs/opengamepadui.nix Outdated Show resolved Hide resolved
nixos/modules/programs/opengamepadui.nix Outdated Show resolved Hide resolved
@ShadowApex ShadowApex force-pushed the add-opengamepadui branch 4 times, most recently from 7280eee to a6cdd74 Compare December 27, 2024 02:56
@github-actions github-actions bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 labels Dec 27, 2024
@ofborg ofborg bot added 8.has: package (new) This PR adds a new package 11.by: package-maintainer This PR was created by the maintainer of the package it changes labels Dec 27, 2024
nixos/modules/programs/opengamepadui.nix Outdated Show resolved Hide resolved
nixos/modules/programs/opengamepadui.nix Outdated Show resolved Hide resolved
nixos/modules/programs/opengamepadui.nix Outdated Show resolved Hide resolved
pkgs/by-name/op/opengamepadui/package.nix Outdated Show resolved Hide resolved
pkgs/by-name/op/opengamepadui/package.nix Outdated Show resolved Hide resolved
pkgs/by-name/op/opengamepadui/package.nix Outdated Show resolved Hide resolved
pkgs/by-name/op/opengamepadui/package.nix Outdated Show resolved Hide resolved
pkgs/by-name/op/opengamepadui/package.nix Show resolved Hide resolved
pkgs/by-name/op/opengamepadui/package.nix Show resolved Hide resolved
@ShadowApex ShadowApex force-pushed the add-opengamepadui branch 2 times, most recently from 95fbc21 to 1a85906 Compare December 28, 2024 21:16
@ShadowApex ShadowApex requested a review from pluiedev December 28, 2024 21:25
hardware.graphics = {
# this fixes the "glXChooseVisual failed" bug, context: https://github.com/NixOS/nixpkgs/issues/47932
enable = true;
enable32Bit = true;
Copy link
Member

Choose a reason for hiding this comment

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

This prevents use on aarch64-linux. Is it absolutely needed?

Copy link
Member

Choose a reason for hiding this comment

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

assertion = cfg.enable32Bit -> pkgs.stdenv.hostPlatform.isx86_64;

Copy link
Contributor

@Pandapip1 Pandapip1 Jan 11, 2025

Choose a reason for hiding this comment

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

Then how about

Suggested change
enable32Bit = true;
enable32Bit = pkgs.stdenv.hostPlatform.isx86_64;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

While this OpenGamepadUI derivation won't support aarch64-linux right now, I'll add this suggestion so it will be ready when we can support that architecture.

description = "Open source gamepad-native game launcher and overlay";
homepage = "https://github.com/ShadowBlip/OpenGamepadUI";
license = lib.licenses.gpl3Only;
platforms = lib.platforms.linux;
Copy link
Member

Choose a reason for hiding this comment

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

The Makefile of OpenGamepadUI is tied to x86_64, so platforms should be restricted to just x86_64-linux.

https://github.com/ShadowBlip/OpenGamepadUI/blob/dccb96705cc622948dbe9f09008d808c3d69b384/Makefile#L111

Copy link
Member

@puffnfresh puffnfresh Jan 11, 2025

Choose a reason for hiding this comment

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

It compiles on aarch64-linux, but it generates an x86_64-linux executable:

$ file /nix/store/*-opengamepadui-0.35.4/share/opengamepadui/opengamepad-ui.x86_64
/nix/store/0x13bbsy7jik93kh1ilkx5w2chf6sjx2-opengamepadui-0.35.4/share/opengamepadui/opengamepad-ui.x86_64: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 5.15.0, stripped

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Arm support should be possible, but adding support for it will require a bit of work to factor out all of the architecture assumptions. Ideally OpenGamepadUI should also be paired with Gamescope, which I'm not sure works very well on arm at the moment.

I will update this to be x86_64-linux only for now and hopefully can add arm support in the future.

Copy link
Contributor

Choose a reason for hiding this comment

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

I briefly looked into this. It looks like Godot right now only supports compiling to x86-64.

@ShadowApex ShadowApex changed the title opengamepadui: init at 0.35.1 opengamepadui: init at 0.35.7 Jan 11, 2025
@h7x4 h7x4 added the 8.has: module (new) This PR adds a module in `nixos/` label Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: changelog 8.has: documentation This PR adds or changes documentation 8.has: module (new) This PR adds a module in `nixos/` 8.has: module (update) This PR changes an existing module in `nixos/` 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 11.by: package-maintainer This PR was created by the maintainer of the package it changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants