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

Package request: moondeck-buddy #354802

Open
keenanweaver opened this issue Nov 9, 2024 · 6 comments
Open

Package request: moondeck-buddy #354802

keenanweaver opened this issue Nov 9, 2024 · 6 comments
Labels
0.kind: packaging request Request for a new package to be added 6.topic: games

Comments

@keenanweaver
Copy link
Member

Project description

A server-side part of the MoonDeck plugin for the SteamDeck.

Metadata


Add a 👍 reaction to issues you find important.

@keenanweaver keenanweaver added 0.kind: packaging request Request for a new package to be added 6.topic: games labels Nov 9, 2024
@ccalhoun1999
Copy link

ccalhoun1999 commented Jan 10, 2025

I tried getting this working a bit ago in a flake but gave up. There seem to be some dependencies that I'm either too incompetent to find, or simply don't exist yet in nixpkgs. Would love if we could get this though.

https://discourse.nixos.org/t/problem-building-a-package-using-cmake-depending-on-proc-procps-in-flake/57201/5

Someone could also try repacking / wrapping (probably the wrong term) the app image, but I couldn't get the app image to run. It seems to require external dependencies.

@keenanweaver
Copy link
Member Author

Yeah, the appimage has never worked for me on NixOS. I've tried to package it a few times before as well and didn't have the patience to figure it out.

@nuko2MB
Copy link

nuko2MB commented Jan 10, 2025

I packaged this in my flake a while ago. I don't use it anymore, but it worked when I tried it. As long as you open the required port (default: 5999). The latest release (1.6.2) only builds on 24.05, upgraded dependencies broke it. This was recently fixed upstream, but there is no stable release yet.

Needs to be built with qt6Packages.callPackage.

{
  stdenv,
  lib,
  fetchFromGitHub,
  qt6,
  ninja,
  cmake,
  wrapQtAppsHook,
  procps,
  libXrandr,
  fuse,
  xcb-util-cursor,
  steam,
}:
let
  pname = "moondeck-buddy";
  #version = "1.6.2";
  version = "ffb52260e08f6aa354c147ffe957f323f386d737";
  src = fetchFromGitHub {
    owner = "FrogTheFrog";
    repo = "moondeck-buddy";
    #rev = "v${version}";
    rev = version;
    sha256 = "sha256-wPkMryosIltohWssVHbpBe+8WlHWJA4Tcb5AXBZGIHo=";
    fetchSubmodules = true;
  };
in
stdenv.mkDerivation {
  inherit pname version src;
  nativeBuildInputs = [
    ninja
    cmake
    wrapQtAppsHook
  ];
  buildInputs = [
    qt6.qtbase
    qt6.qthttpserver
    libXrandr
    procps
    steam
    qt6.qtwebsockets
    fuse
    xcb-util-cursor
  ];

  postPatch = ''
    substituteInPlace src/lib/os/linux/steamregistryobserver.cpp \
        --replace-fail /usr/bin/steam ${lib.getExe steam};
  '';
}

@keenanweaver
Copy link
Member Author

That's awesome! Thanks for sharing. I'll probably wait for a new stable release before futzing with it again.

@redxtech
Copy link
Contributor

redxtech commented Jan 24, 2025

I opened a PR to add this (#375287) a couple days ago, hopefully it doesn't take too long to get merged!

@nuko2MB thanks for the snippet! I was handling the steam binary issue by setting the path in the settings file, so patching the file is a much better way to go about this, I've just updated my PR to include it!

Question: would it make more sense to change the path to /usr/bin/env steam?

@nuko2MB
Copy link

nuko2MB commented Jan 24, 2025

@redxtech

Using /usr/bin/env steam (or just steam) is possible but I don't think it's preferred. This also requires patching out a call to QFile::exists. This works but will break error messages when setting the path via config. And, while unlikely, it could cause issues in future versions as the code is expecting an absolute file path.

Not patching it is always an option, but since the code expects an absolute path it would require something like a home-manager module to properly set the config value to the store path.


I believe the best option is to patch using an absolute nix store path. The only downside is that this pulls in steam as a dependency when it may not be needed. Such as using flatpak steam or using a non nixos system.

This seems somewhat niche to me and if desired could be mitigated with useNixSteam ? true and lib.optional, but I would ask a maintainer what is preferred.


While I'm here, in your derivation cmake and ninja should be moved to nativeBuildInputs. Then remove cmakeFlags. I also don't think pkg-config is required, but may be wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: packaging request Request for a new package to be added 6.topic: games
Projects
None yet
Development

No branches or pull requests

4 participants