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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

emulationstation-de: 2.2.1 -> 3.0.2 #299298

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ivarmedi
Copy link
Contributor

@ivarmedi ivarmedi commented Mar 26, 2024

Description of changes

Update ES-DE from 2.2.1 to 3.0.2.

There has been some sort of rebranding, from the changelog:

Renamed the application from EmulationStation Desktop Edition to ES-DE

Hence the new name of the binary, etc. Not sure how to handle this, should it be a new package? Should the folder be renamed to reflect the new name? Keep it as is? 馃槙

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.

@TimoVerbrugghe
Copy link

@ivarmedi Trying to already use this before it gets pulled into nixpkgs but hit a snag while trying to build nixos config with the existing patch. Quite new to this so maybe I'm doing something wrong here.

  • Copied your new package.nix and the existing 001-add-nixpkgs-retroarch-cores.patch into a separate folder in my own git repository that contains my nix config.
  • Added following to my nix config:
environment.systemPackages = with pkgs; [
    # Current emulationstation-de is old (2.2.1), so temporarily building the package 3.0.1 myself using the commit https://github.com/NixOS/nixpkgs/pull/299298 until it's pulled
    (pkgs.callPackage ./emulationstation-de/package.nix {})
  ];

But getting the following error during my nix build:

error: builder for '/nix/store/xkm29xdb0nv0rb1fjqlh9zh85yxgxwgv-emulationstation-de-3.0.1.drv' failed with exit code 2;
       last 10 log lines:
       > Running phase: unpackPhase
       > unpacking source archive /nix/store/c030601kvip9wia6lwahlnv510gkparw-source
       > source root is source
       > Running phase: patchPhase
       > applying patch /nix/store/xg9kfg1lkc47fvq1h3m4jsvbdgzdzk2n-001-add-nixpkgs-retroarch-cores.patch
       > patching file resources/systems/unix/es_find_rules.xml
       > Hunk #1 succeeded at 21 with fuzz 1 (offset -24 lines).
       > patch unexpectedly ends in middle of line
       > patch: **** malformed patch at line 16:
       >
       For full logs, run 'nix log /nix/store/xkm29xdb0nv0rb1fjqlh9zh85yxgxwgv-emulationstation-de-3.0.1.drv'.
error: 1 dependencies of derivation '/nix/store/41q7wqy2zgpqqcwnl4fz2nkpa62n2xgc-system-path.drv' failed to build
error: 1 dependencies of derivation '/nix/store/phnp89syacxnkbdnwj072xn25mzf5skx-nixos-system-gamer-24.05.20240408.4cba8b5.drv' failed to build

Do you have the same?

@ivarmedi
Copy link
Contributor Author

ivarmedi commented Apr 12, 2024

Hey @TimoVerbrugghe! No, sorry. I can't reproduce. Can you double check your patch file, or perhaps pull it directly from Github if it was manually copy pasted:

curl -LO https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/by-name/em/emulationstation-de/001-add-nixpkgs-retroarch-cores.patch

For reference, I have the following which works:

{ pkgs, ... }:
let
  emulationstation-de-3 = pkgs.callPackage ../packages/emulationstation-de/package.nix { };
in
{
  users.users.emulator = {
    isNormalUser = true;
    packages = with pkgs; [
      emulationstation-de-3
      [...]
    ];
  };
}

with ../packages/emulationstation-de containing the two files from nixpkgs (with the modifications from this PR). Nothing has changed with regards to the patch, so I think it might be on your end. Hope that helps!

@TimoVerbrugghe
Copy link

Hey @TimoVerbrugghe! No, sorry. I can't reproduce. Can you double check your patch file, or perhaps pull it directly from Github if it was manually copy pasted:

curl -LO https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/by-name/em/emulationstation-de/001-add-nixpkgs-retroarch-cores.patch

For reference, I have the following which works:

{ pkgs, ... }:
let
  emulationstation-de-3 = pkgs.callPackage ../packages/emulationstation-de/package.nix { };
in
{
  users.users.emulator = {
    isNormalUser = true;
    packages = with pkgs; [
      emulationstation-de-3
      [...]
    ];
  };
}

with ../packages/emulationstation-de containing the two files from nixpkgs (with the modifications from this PR). Nothing has changed with regards to the patch, so I think it might be on your end. Hope that helps!

Yep, that worked, probably just a bad copy-paste from my side :), thanks for the check !

@ASHGOLDOFFICIAL
Copy link
Contributor

Can you somehow make a desktop file for it? Is it possible?

@ivarmedi
Copy link
Contributor Author

ivarmedi commented May 8, 2024

Can you somehow make a desktop file for it? Is it possible?

Hey! Yes, it seems like it comes bundled with a desktop file
https://gitlab.com/es-de/emulationstation-de/-/blob/master/es-app/assets/org.es_de.frontend.desktop

I'll see if I can get that incorporated / patched for Nix. Thanks for the suggestion!

@ivarmedi ivarmedi force-pushed the update-emulationstation-de branch from 7247299 to 7e72b9c Compare May 8, 2024 16:11
@ASHGOLDOFFICIAL
Copy link
Contributor

ASHGOLDOFFICIAL commented May 9, 2024

Thank you for adding a desktop file. But can you please add an icon as well? Here it is.
I think the needed lines are

mkdir -p $out/share/icons/hicolor/scalable/apps
cp ../es-app/assets/org.es_de.frontend.svg $out/share/icons/hicolor/scalable/apps

@ASHGOLDOFFICIAL
Copy link
Contributor

There's been a new version: 3.0.2. Maybe you can package it instead of 3.0.1, or does it require a separate pull request?

@ivarmedi ivarmedi force-pushed the update-emulationstation-de branch from 7e72b9c to 9d3d114 Compare May 13, 2024 18:16
@ivarmedi ivarmedi changed the title emulationstation-de: 2.2.1 -> 3.0.1 emulationstation-de: 2.2.1 -> 3.0.2 May 13, 2024
@ivarmedi ivarmedi force-pushed the update-emulationstation-de branch from 9d3d114 to 063943c Compare May 13, 2024 20:24
@ASHGOLDOFFICIAL
Copy link
Contributor

ASHGOLDOFFICIAL commented May 16, 2024

I recently learned about install command by looking into other packages. I think it provides a neat way to install desktop files and icons because in one (relatively short) line of code we can create directories, copy files and set permissions. So I tried to use it with this package and this is what I've come up with (though I think some other options can be added). Check if you like it.

# Desktop file
install -Dm 644 ../es-app/assets/org.es_de.frontend.desktop -t $out/share/applications/ 

# Icon
install -Dm 644 ../es-app/assets/org.es_de.frontend.svg -t $out/share/icons/hicolor/scalable/apps/

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

3 participants