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

gb-studio: init at 3.1.0 #268959

Closed
wants to merge 2 commits into from
Closed

gb-studio: init at 3.1.0 #268959

wants to merge 2 commits into from

Conversation

musjj
Copy link
Contributor

@musjj musjj commented Nov 21, 2023

  • maintainers: add musjj
  • gb-studio: init at 3.1.0

Description of changes

GB Studio: A quick and easy to use drag and drop retro game creator for your favourite handheld video game system.

Just a simple wrapper around the pre-built AppImage executable for now. I really wanted to build the package from source, but I gave up after spending two whole days fighting with Yarn, Electron and RPATH.

closes: #185564

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/)
  • 23.11 Release Notes (or backporting 23.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.

Priorities

Add a 👍 reaction to pull requests you find important.

@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 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 10.rebuild-linux: 1 labels Nov 21, 2023
@pbsds
Copy link
Member

pbsds commented Jun 5, 2024

gb-studio> building '/nix/store/kll1z65rxgr5pvrr5qr85krxd3hcygph-gb-studio-3.1.0.drv'
gb-studio> mv: cannot stat '/nix/store/ssbxl2490km2plqbdr5wrvlnzzw8sxjx-gb-studio-3.1.0/bin/gb-studio-3.1.0': No such file or directory

@ASHGOLDOFFICIAL
Copy link
Contributor

ASHGOLDOFFICIAL commented Jun 16, 2024

I don't know how to install desktop file and icons. To do so, I need to override some phase but every phase is needed and is hard to recreate (I wish I could use something like prevAttrs but it seems that I cannot pass a function to mkYarnPackage). Anyway, it builds (sometimes). But I don't know how to npm start after that. So I'll leave my attempt for someone else.

My progress:

{ lib
, mkYarnPackage
, fetchFromGitHub
, makeDesktopItem
, imagemagick
, nodejs
, yarn
}:

mkYarnPackage rec {
  pname = "gb-studio";
  version = "3.2.1";

  src = fetchFromGitHub {
    owner = "chrismaltby";
    repo = "gb-studio";
    rev = "refs/tags/v${version}";
    hash = "sha256-hF8aDTg7v9p0d9AUE2NNhQACgggMEbi5afzK1GqUHx0=";
  };

  strictDeps = true;

  # doDist = false;

  nativeBuildInputs = [
    imagemagick
    nodejs
    yarn
  ];

  # installPhase = let
  #   desktopItem = makeDesktopItem {
  #     name = pname;
  #     desktopName = "GB Studio";
  #     comment = "Visual retro game maker";
  #     genericName = "GB Studio";
  #     exec = "${meta.mainProgram} %U";
  #     icon = pname;
  #     type = "Application";
  #     startupNotify = true;
  #     categories = [ "Development" "Building" "IDE" ];
  #   };
  # in ''
  #   runHook preInstall
  #
  #   pushd ./deps/gb-studio
  #   for size in 64 128 256 512 1024; do
  #     mkdir -p $out/share/icons/hicolor/"$size"x"$size"/
  #     convert -resize "$size"x"$size" ./src/assets/app/icon/app_icon.png \
  #        $out/share/icons/hicolor/"$size"x"$size"/${pname}.png
  #   done
  #   popd
  #
  #   install -Dm 644 ${desktopItem}/share/applications/*.desktop \
  #     -t $out/share/applications
  #
  #   runHook postInstall
  # '';

  meta = {
    description = "A quick and easy to use drag and drop retro game creator for your favourite handheld video game system";
    homepage = "https://www.gbstudio.dev/";
    downloadPage = "https://chrismaltby.itch.io/gb-studio";
    changelog = "https://github.com/chrismaltby/gb-studio/releases/tag/v${version}";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ ashgoldofficial musjj ];
    mainProgram = pname;
    platforms = lib.platforms.linux;
  };
}

@pbsds
Copy link
Member

pbsds commented Jun 23, 2024

Try the copyDesktopItems hook

};
# bash
in ''
mv "$out/bin/${pname}-${version}" "$out/bin/${pname}"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
mv "$out/bin/${pname}-${version}" "$out/bin/${pname}"


src = fetchurl {
url =
"https://github.com/chrismaltby/${pname}/releases/download/v${version}/${pname}-linux.AppImage";
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"https://github.com/chrismaltby/${pname}/releases/download/v${version}/${pname}-linux.AppImage";
"https://github.com/chrismaltby/gb-studio/releases/download/v${version}/gb-studio-linux.AppImage";

"A quick and easy to use drag and drop retro game creator for your favourite handheld video game system";
homepage = "https://www.gbstudio.dev/";
changelog =
"https://github.com/chrismaltby/${pname}/releases/tag/v${version}";
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"https://github.com/chrismaltby/${pname}/releases/tag/v${version}";
"https://github.com/chrismaltby/gb-studio/releases/tag/v${version}";


meta = with lib; {
description =
"A quick and easy to use drag and drop retro game creator for your favourite handheld video game system";
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"A quick and easy to use drag and drop retro game creator for your favourite handheld video game system";
"Quick and easy to use drag and drop retro game creator for your favourite handheld video game system";

cp ${desktopItem}/share/applications/*.desktop $out/share/applications
'';

meta = with lib; {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
meta = with lib; {
meta = {

tracking issue: #292468

Comment on lines +43 to +46
license = licenses.mit;
platforms = [ "x86_64-linux" ];
sourceProvenance = with sourceTypes; [ binaryBytecode ];
maintainers = with maintainers; [ musjj ];
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
license = licenses.mit;
platforms = [ "x86_64-linux" ];
sourceProvenance = with sourceTypes; [ binaryBytecode ];
maintainers = with maintainers; [ musjj ];
license = lib.licenses.mit;
platforms = [ "x86_64-linux" ];
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
maintainers = with lib.maintainers; [ musjj ];

@@ -3846,6 +3846,8 @@ with pkgs;

gams = callPackage ../tools/misc/gams (config.gams or {});

gb-studio = callPackage ../development/tools/gb-studio { };
Copy link
Contributor

Choose a reason for hiding this comment

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

please move this to pkgs/by-name and remove this line

pkgs/development/tools/gb-studio/default.nix Show resolved Hide resolved
@wegank wegank added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jul 4, 2024
@SuperSandro2000
Copy link
Member

Closing because of unresponsive author

@pbsds
Copy link
Member

pbsds commented Jul 28, 2024

since when did we start closing stale PRs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 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 10.rebuild-linux: 1 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.

GB Studio
6 participants