-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #111 from unmojang/unmojang
Merge develop -> unmojang, link to wiki page with common authlib-injector servers
- Loading branch information
Showing
14 changed files
with
184 additions
and
83 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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 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 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 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 was deleted.
Oops, something went wrong.
This file contains 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 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 |
---|---|---|
@@ -1,30 +1,44 @@ | ||
{ | ||
inputs, | ||
self, | ||
version, | ||
... | ||
}: { | ||
perSystem = {pkgs, ...}: { | ||
packages = { | ||
inherit (pkgs) pollymc-qt5-unwrapped pollymc-qt5 pollymc-unwrapped pollymc; | ||
default = pkgs.pollymc; | ||
perSystem = { | ||
lib, | ||
pkgs, | ||
... | ||
}: { | ||
packages = let | ||
ourPackages = lib.fix (final: self.overlays.default ({inherit (pkgs) darwin;} // final) pkgs); | ||
in { | ||
inherit | ||
(ourPackages) | ||
pollymc-qt5-unwrapped | ||
pollymc-qt5 | ||
pollymc-unwrapped | ||
pollymc | ||
; | ||
default = ourPackages.pollymc; | ||
}; | ||
}; | ||
|
||
flake = { | ||
overlays.default = final: prev: let | ||
# Helper function to build prism against different versions of Qt. | ||
mkPrism = qt: | ||
qt.callPackage ./package.nix { | ||
inherit (inputs) libnbtplusplus; | ||
inherit (prev.darwin.apple_sdk.frameworks) Cocoa; | ||
inherit self version; | ||
}; | ||
version = builtins.substring 0 8 self.lastModifiedDate or "dirty"; | ||
|
||
# common args for prismlauncher evaluations | ||
unwrappedArgs = { | ||
inherit (inputs) libnbtplusplus; | ||
inherit (final.darwin.apple_sdk.frameworks) Cocoa; | ||
inherit self version; | ||
}; | ||
in { | ||
pollymc-qt5-unwrapped = mkPrism final.libsForQt5; | ||
pollymc-qt5 = prev.pollymc-qt5.override {pollymc-unwrapped = final.pollymc-qt5-unwrapped;}; | ||
pollymc-unwrapped = mkPrism final.qt6Packages; | ||
pollymc = prev.pollymc.override {inherit (final) pollymc-unwrapped;}; | ||
pollymc-qt5-unwrapped = prev.libsForQt5.callPackage ./pkg unwrappedArgs; | ||
pollymc-qt5 = prev.libsForQt5.callPackage ./pkg/wrapper.nix { | ||
pollymc-unwrapped = final.pollymc-qt5-unwrapped; | ||
}; | ||
pollymc-unwrapped = prev.qt6Packages.callPackage ./pkg unwrappedArgs; | ||
pollymc = prev.qt6Packages.callPackage ./pkg/wrapper.nix {inherit (final) pollymc-unwrapped;}; | ||
}; | ||
}; | ||
} |
File renamed without changes.
This file contains 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,91 @@ | ||
{ | ||
lib, | ||
stdenv, | ||
symlinkJoin, | ||
pollymc-unwrapped, | ||
wrapQtAppsHook, | ||
qtbase, # needed for wrapQtAppsHook | ||
qtsvg, | ||
qtwayland, | ||
xorg, | ||
libpulseaudio, | ||
libGL, | ||
glfw, | ||
openal, | ||
jdk8, | ||
jdk17, | ||
gamemode, | ||
flite, | ||
mesa-demos, | ||
udev, | ||
msaClientID ? null, | ||
gamemodeSupport ? stdenv.isLinux, | ||
textToSpeechSupport ? stdenv.isLinux, | ||
jdks ? [jdk17 jdk8], | ||
additionalLibs ? [], | ||
additionalPrograms ? [], | ||
}: let | ||
pollymcFinal = pollymc-unwrapped.override { | ||
inherit msaClientID gamemodeSupport; | ||
}; | ||
in | ||
symlinkJoin { | ||
name = "pollymc-${pollymcFinal.version}"; | ||
|
||
paths = [pollymcFinal]; | ||
|
||
nativeBuildInputs = [ | ||
wrapQtAppsHook | ||
]; | ||
|
||
buildInputs = | ||
[ | ||
qtbase | ||
qtsvg | ||
] | ||
++ lib.optional (lib.versionAtLeast qtbase.version "6" && stdenv.isLinux) qtwayland; | ||
|
||
postBuild = '' | ||
wrapQtAppsHook | ||
''; | ||
|
||
qtWrapperArgs = let | ||
runtimeLibs = | ||
(with xorg; [ | ||
libX11 | ||
libXext | ||
libXcursor | ||
libXrandr | ||
libXxf86vm | ||
]) | ||
++ [ | ||
# lwjgl | ||
libpulseaudio | ||
libGL | ||
glfw | ||
openal | ||
stdenv.cc.cc.lib | ||
|
||
# oshi | ||
udev | ||
] | ||
++ lib.optional gamemodeSupport gamemode.lib | ||
++ lib.optional textToSpeechSupport flite | ||
++ additionalLibs; | ||
|
||
runtimePrograms = | ||
[ | ||
xorg.xrandr | ||
mesa-demos # need glxinfo | ||
] | ||
++ additionalPrograms; | ||
in | ||
["--prefix POLLYMC_JAVA_PATHS : ${lib.makeSearchPath "bin/java" jdks}"] | ||
++ lib.optionals stdenv.isLinux [ | ||
"--set LD_LIBRARY_PATH /run/opengl-driver/lib:${lib.makeLibraryPath runtimeLibs}" | ||
# xorg.xrandr needed for LWJGL [2.9.2, 3) https://github.com/LWJGL/lwjgl/issues/128 | ||
"--prefix PATH : ${lib.makeBinPath runtimePrograms}" | ||
]; | ||
|
||
inherit (pollymcFinal) meta; | ||
} |