NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18k stars 14.01k forks source link

Packaging for Gnome Games (libretro frontend) #68863

Open murdos opened 5 years ago

murdos commented 5 years ago

Project description Games is a GNOME application to browse your video games library and to easily pick and play a game from it. It uses libretro.

Metadata

worldofpeace commented 5 years ago

We could probably pick this up with #68318.

stale[bot] commented 4 years ago

Thank you for your contributions. This has been automatically marked as stale because it has had no activity for 180 days. If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity. Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse. 3. Ask on the #nixos channel on irc.freenode.net.
murdos commented 4 years ago

I still think it could be a nice addition to nixos

stale[bot] commented 3 years ago

I marked this as stale due to inactivity. → More info

murdos commented 3 years ago

Not Stale

DamienCassou commented 3 years ago

I have started working on this:

  1. I opened a PR for retro-gtk which is a dependency;
  2. I started working on packaging Gnome Games in a dedicated branch.

Feel free to help by reviewing and contributing to the branch.

DamienCassou commented 3 years ago

/cc @NixOS/gnome My branch has a buildable Gnome Games package. Because Gnome Games still depend on Tracker 2 and Gnome ships with Tracker 3, I had to include a derivation for tracker 2. When launching gnome-games, I get an error:

(org.gnome.Games:224080): GLib-GIO-ERROR **: 20:59:12.294: Settings schema 'org.freedesktop.Tracker.FTS' is not installed
Trace/breakpoint trap (core dumped)

I'm not on NixOS and I don't have tracker running so I'm not sure what the next step is.

jtojnar commented 3 years ago

@DamienCassou You are missing wrapGAppsHook as per https://nixos.org/manual/nixpkgs/stable/#ssec-gnome-common-issues-missing-schema.

Also, it might be more convenient to use the patch from the PR, otherwise you will also need to install Tracker 2 as systemd service, which requires more plumbing outside of NixOS/home-manager.

DamienCassou commented 3 years ago

Thank you very much for your help @jtojnar: I've updated the branch and the application launches now. I will open a PR when https://github.com/NixOS/nixpkgs/pull/124168 is merged.

Krutonium commented 1 year ago

@DamienCassou Did you ever PR gnome.gnome-games?

DamienCassou commented 1 year ago

@Krutonium: I never did. I still have the patch but now Gnome Games has been renamed to Highscore and the dependencies completely changed (e.g., no more Grilo or Tracker dependencies).

Here is the patch in case you want to work on adapting it:

{ lib
, stdenv
, fetchurl
, fetchpatch
, meson
, ninja
, pkg-config
, vala
, cmake
, libarchive
, glib
, grilo
, libxml2
, gtk3
, libhandy
, libmanette
, retro-gtk
, librsvg
, libsoup
, sqlite
, desktop-file-utils
, appstream-glib
, python3
, tracker
, wrapGAppsHook
}:

stdenv.mkDerivation rec {
  pname = "gnome-games";
  version = "40.0";

  src = fetchurl {
    url = "mirror://gnome/sources/gnome-games/${lib.versions.major version}/${pname}-${version}.tar.xz";
    sha256 = "03yzd97kpkjdzfqp8qx3mqnf9347yk830njam2q78ai9i4zl3k9j";
  };

  patches = [
    # https://gitlab.gnome.org/GNOME/gnome-games/-/merge_requests/424
    (fetchpatch {
      name   = "gnome-games-port-to-tracker3.patch";
      url    = "https://gitlab.gnome.org/GNOME/gnome-games/-/commit/d38e93160a8e16776bb1fdc46f547365d3f2c9ee.patch";
      sha256 = "0k7g7p8spdnvzfg6p9rqbvj5df5yx7wgz0m8w963ls0bv00fp0fc";
    })
  ];

  nativeBuildInputs = [
    meson pkg-config ninja vala cmake glib libxml2 grilo gtk3 libhandy libmanette retro-gtk librsvg
    libsoup sqlite libarchive tracker desktop-file-utils appstream-glib python3 wrapGAppsHook
  ];

  preInstall = ''
    patchShebangs ../build-aux/post_install.py
  '';

  meta = with lib; {
    description = "Simple game launcher for GNOME";
    longDescription = ''
      Just as your music player does, Games shows you all of your
      installed games with their cover art, even Steam and retro
      games, and sorts them by developer or platform.

      Many legacy game platforms are supported and tightly integrated
      into Games' interface. Simply select your preferred video
      filter, grab your gamepad and enjoy your game.

      When you leave an integrated game, your progress is
      automatically saved so you can restart where you left off.
    '';
    homepage = "https://wiki.gnome.org/Apps/Games";
    changelog = "https://gitlab.gnome.org/GNOME/gnome-games/-/blob/master/NEWS";
    license = licenses.gpl3Plus;
    maintainers = [ maintainers.DamienCassou ];
    platforms = platforms.all;
  };
}