-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
gdlauncher-carbon: init at 2.0.20 #297096
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
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,135 @@ | ||
| { | ||
| lib, | ||
| stdenv, | ||
| appimageTools, | ||
| fetchurl, | ||
| graphicsmagick, | ||
| makeWrapper, | ||
| copyDesktopItems, | ||
| autoPatchelfHook, | ||
| xorg, | ||
| libpulseaudio, | ||
| libGL, | ||
| udev, | ||
| xdg-utils, | ||
| electron, | ||
| addDriverRunpath, | ||
| makeDesktopItem, | ||
|
|
||
| jdk8, | ||
| jdk17, | ||
| jdk21, | ||
| jdks ? [ | ||
| jdk8 | ||
| jdk17 | ||
| jdk21 | ||
| ], | ||
| }: | ||
|
|
||
| stdenv.mkDerivation (finalAttrs: { | ||
| pname = "gdlauncher-carbon"; | ||
| version = "2.0.20"; | ||
|
|
||
| src = appimageTools.extract { | ||
| inherit (finalAttrs) pname version; | ||
| src = fetchurl { | ||
| url = "https://cdn-raw.gdl.gg/launcher/GDLauncher__${finalAttrs.version}__linux__x64.AppImage"; | ||
| hash = "sha256-tI9RU8qO3MHbImOGw2Wl1dksNbhqrYFyGemqms8aAio="; | ||
| }; | ||
| }; | ||
|
|
||
| nativeBuildInputs = [ | ||
| graphicsmagick | ||
| makeWrapper | ||
| copyDesktopItems | ||
| autoPatchelfHook | ||
| ]; | ||
|
|
||
| buildInputs = [ | ||
| xorg.libxcb | ||
| stdenv.cc.cc.lib | ||
| ]; | ||
|
|
||
| strictDeps = true; | ||
|
|
||
| installPhase = '' | ||
| runHook preInstall | ||
|
|
||
| mkdir -p $out/share/gdlauncher-carbon/resources | ||
| cp -r $src/resources/{binaries,app.asar} $out/share/gdlauncher-carbon/resources/ | ||
|
|
||
| # The provided icon is a bit large for some systems, so make smaller ones | ||
| for size in 48 96 128 256 512; do | ||
| gm convert $src/@gddesktop.png -resize ''${size}x''${size} icon_$size.png | ||
| install -D icon_$size.png $out/share/icons/hicolor/''${size}x''${size}/apps/gdlauncher-carbon.png | ||
| done | ||
|
|
||
| runHook postInstall | ||
| ''; | ||
|
|
||
| postConfigure = | ||
| let | ||
| libPath = lib.makeLibraryPath [ | ||
| xorg.libX11 | ||
| xorg.libXext | ||
| xorg.libXcursor | ||
| xorg.libXrandr | ||
| xorg.libXxf86vm | ||
|
|
||
| # lwjgl | ||
| libpulseaudio | ||
| libGL | ||
| stdenv.cc.cc.lib | ||
|
|
||
| # oshi | ||
| udev | ||
| ]; | ||
| binPath = lib.makeBinPath [ | ||
| # Used for opening directories and URLs in the electron app | ||
| xdg-utils | ||
|
|
||
| # xorg.xrandr needed for LWJGL [2.9.2, 3) https://github.com/LWJGL/lwjgl/issues/128 | ||
| xorg.xrandr | ||
| ]; | ||
| in | ||
| '' | ||
| makeWrapper '${lib.getExe electron}' $out/bin/gdlauncher-carbon \ | ||
| --prefix GDL_JAVA_PATH : ${lib.makeSearchPath "" jdks} \ | ||
| --set LD_LIBRARY_PATH ${addDriverRunpath.driverLink}/lib:${libPath} \ | ||
| --suffix PATH : "${binPath}" \ | ||
| --set ELECTRON_FORCE_IS_PACKAGED 1 \ | ||
| --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}" \ | ||
| --add-flags $out/share/gdlauncher-carbon/resources/app.asar | ||
| ''; | ||
|
|
||
| desktopItems = [ | ||
| (makeDesktopItem { | ||
| # Note the desktop file name should be GDLauncher to match the window's | ||
| # client id for window icon purposes on wayland. | ||
| name = "GDLauncher"; | ||
| exec = "gdlauncher-carbon"; | ||
| icon = "gdlauncher-carbon"; | ||
| desktopName = "GDLauncher"; | ||
| comment = finalAttrs.meta.description; | ||
| categories = [ "Game" ]; | ||
| keywords = [ | ||
| "launcher" | ||
| "mod manager" | ||
| "minecraft" | ||
| ]; | ||
| mimeTypes = [ "x-scheme-handler/gdlauncher" ]; | ||
| }) | ||
| ]; | ||
|
|
||
| meta = { | ||
| description = "Simple, yet powerful Minecraft custom launcher with a strong focus on the user experience"; | ||
| homepage = "https://gdlauncher.com/"; | ||
| license = lib.licenses.bsl11; | ||
| maintainers = with lib.maintainers; [ | ||
| huantian | ||
| TsubakiDev | ||
| ]; | ||
| platforms = lib.platforms.linux; | ||
| sourceProvenance = [ lib.sourceTypes.binaryNativeCode ]; | ||
| }; | ||
| }) | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is done automatically by all relevant icon users?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps I can try again; last time I checked, it didn't seem to work on KDE Plasma.