use newer tag for prism-launcher
This commit is contained in:
parent
e0ce786646
commit
278f87f4c7
4 changed files with 256 additions and 1 deletions
|
|
@ -5,7 +5,7 @@
|
||||||
vesktop
|
vesktop
|
||||||
gh
|
gh
|
||||||
adwsteamgtk
|
adwsteamgtk
|
||||||
prismlauncher
|
prismlauncher-master
|
||||||
tmux
|
tmux
|
||||||
fastfetch
|
fastfetch
|
||||||
btop
|
btop
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,14 @@ final: prev: {
|
||||||
inherit helium-widevine;
|
inherit helium-widevine;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
prismlauncher-unwrapped-master = prev.callPackage (builtins.path {
|
||||||
|
path = ./prismlauncher-unwrapped-master/package.nix;
|
||||||
|
}) { };
|
||||||
|
|
||||||
|
prismlauncher-master = prev.callPackage (builtins.path {
|
||||||
|
path = ./prismlauncher-master/package.nix;
|
||||||
|
}) { };
|
||||||
|
|
||||||
strawberry-master = prev.callPackage (builtins.path {
|
strawberry-master = prev.callPackage (builtins.path {
|
||||||
path = ./strawberry/package.nix;
|
path = ./strawberry/package.nix;
|
||||||
}) { };
|
}) { };
|
||||||
|
|
|
||||||
133
packages/prismlauncher-master/package.nix
Normal file
133
packages/prismlauncher-master/package.nix
Normal file
|
|
@ -0,0 +1,133 @@
|
||||||
|
{
|
||||||
|
addDriverRunpath,
|
||||||
|
alsa-lib,
|
||||||
|
flite,
|
||||||
|
gamemode,
|
||||||
|
glfw3-minecraft,
|
||||||
|
jdk17,
|
||||||
|
jdk21,
|
||||||
|
jdk8,
|
||||||
|
kdePackages,
|
||||||
|
lib,
|
||||||
|
libGL,
|
||||||
|
libX11,
|
||||||
|
libXcursor,
|
||||||
|
libXext,
|
||||||
|
libXrandr,
|
||||||
|
libXxf86vm,
|
||||||
|
libjack2,
|
||||||
|
libpulseaudio,
|
||||||
|
libusb1,
|
||||||
|
mesa-demos,
|
||||||
|
openal,
|
||||||
|
pciutils,
|
||||||
|
pipewire,
|
||||||
|
prismlauncher-unwrapped-master,
|
||||||
|
stdenv,
|
||||||
|
symlinkJoin,
|
||||||
|
udev,
|
||||||
|
vulkan-loader,
|
||||||
|
xrandr,
|
||||||
|
|
||||||
|
additionalLibs ? [ ],
|
||||||
|
additionalPrograms ? [ ],
|
||||||
|
controllerSupport ? stdenv.hostPlatform.isLinux,
|
||||||
|
gamemodeSupport ? stdenv.hostPlatform.isLinux,
|
||||||
|
jdks ? [
|
||||||
|
jdk21
|
||||||
|
jdk17
|
||||||
|
jdk8
|
||||||
|
],
|
||||||
|
msaClientID ? null,
|
||||||
|
textToSpeechSupport ? stdenv.hostPlatform.isLinux,
|
||||||
|
}:
|
||||||
|
|
||||||
|
assert lib.assertMsg (
|
||||||
|
controllerSupport -> stdenv.hostPlatform.isLinux
|
||||||
|
) "controllerSupport only has an effect on Linux.";
|
||||||
|
|
||||||
|
assert lib.assertMsg (
|
||||||
|
textToSpeechSupport -> stdenv.hostPlatform.isLinux
|
||||||
|
) "textToSpeechSupport only has an effect on Linux.";
|
||||||
|
|
||||||
|
let
|
||||||
|
prismlauncher' = prismlauncher-unwrapped-master.override { inherit msaClientID gamemodeSupport; };
|
||||||
|
in
|
||||||
|
|
||||||
|
symlinkJoin {
|
||||||
|
name = "prismlauncher-${prismlauncher'.version}";
|
||||||
|
|
||||||
|
paths = [ prismlauncher' ];
|
||||||
|
|
||||||
|
nativeBuildInputs = [ kdePackages.wrapQtAppsHook ];
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
kdePackages.qtbase
|
||||||
|
kdePackages.qtsvg
|
||||||
|
]
|
||||||
|
++ lib.optional (
|
||||||
|
lib.versionAtLeast kdePackages.qtbase.version "6" && stdenv.hostPlatform.isLinux
|
||||||
|
) kdePackages.qtwayland;
|
||||||
|
|
||||||
|
postBuild = ''
|
||||||
|
wrapQtAppsHook
|
||||||
|
'';
|
||||||
|
|
||||||
|
qtWrapperArgs =
|
||||||
|
let
|
||||||
|
runtimeLibs = [
|
||||||
|
(lib.getLib stdenv.cc.cc)
|
||||||
|
## native versions
|
||||||
|
glfw3-minecraft
|
||||||
|
openal
|
||||||
|
|
||||||
|
## openal
|
||||||
|
alsa-lib
|
||||||
|
libjack2
|
||||||
|
libpulseaudio
|
||||||
|
pipewire
|
||||||
|
|
||||||
|
## glfw
|
||||||
|
libGL
|
||||||
|
libX11
|
||||||
|
libXcursor
|
||||||
|
libXext
|
||||||
|
libXrandr
|
||||||
|
libXxf86vm
|
||||||
|
|
||||||
|
udev # oshi
|
||||||
|
|
||||||
|
vulkan-loader # VulkanMod's lwjgl
|
||||||
|
]
|
||||||
|
++ lib.optional textToSpeechSupport flite
|
||||||
|
++ lib.optional gamemodeSupport gamemode.lib
|
||||||
|
++ lib.optional controllerSupport libusb1
|
||||||
|
++ additionalLibs;
|
||||||
|
|
||||||
|
runtimePrograms = [
|
||||||
|
mesa-demos
|
||||||
|
pciutils # need lspci
|
||||||
|
xrandr # needed for LWJGL [2.9.2, 3) https://github.com/LWJGL/lwjgl/issues/128
|
||||||
|
]
|
||||||
|
++ additionalPrograms;
|
||||||
|
|
||||||
|
in
|
||||||
|
[ "--prefix PRISMLAUNCHER_JAVA_PATHS : ${lib.makeSearchPath "bin/java" jdks}" ]
|
||||||
|
++ lib.optionals stdenv.hostPlatform.isLinux [
|
||||||
|
"--set LD_LIBRARY_PATH ${addDriverRunpath.driverLink}/lib:${lib.makeLibraryPath runtimeLibs}"
|
||||||
|
"--prefix PATH : ${lib.makeBinPath runtimePrograms}"
|
||||||
|
];
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
inherit (prismlauncher'.meta)
|
||||||
|
description
|
||||||
|
longDescription
|
||||||
|
homepage
|
||||||
|
changelog
|
||||||
|
license
|
||||||
|
maintainers
|
||||||
|
mainProgram
|
||||||
|
platforms
|
||||||
|
;
|
||||||
|
};
|
||||||
|
}
|
||||||
114
packages/prismlauncher-unwrapped-master/package.nix
Normal file
114
packages/prismlauncher-unwrapped-master/package.nix
Normal file
|
|
@ -0,0 +1,114 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
stdenv,
|
||||||
|
fetchFromGitHub,
|
||||||
|
cmake,
|
||||||
|
cmark,
|
||||||
|
extra-cmake-modules,
|
||||||
|
gamemode,
|
||||||
|
ghc_filesystem,
|
||||||
|
jdk17,
|
||||||
|
kdePackages,
|
||||||
|
ninja,
|
||||||
|
nix-update-script,
|
||||||
|
stripJavaArchivesHook,
|
||||||
|
tomlplusplus,
|
||||||
|
zlib,
|
||||||
|
qrencode,
|
||||||
|
msaClientID ? null,
|
||||||
|
gamemodeSupport ? stdenv.hostPlatform.isLinux,
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
libnbtplusplus = fetchFromGitHub {
|
||||||
|
owner = "PrismLauncher";
|
||||||
|
repo = "libnbtplusplus";
|
||||||
|
rev = "23b955121b8217c1c348a9ed2483167a6f3ff4ad";
|
||||||
|
hash = "sha256-yy0q+bky80LtK1GWzz7qpM+aAGrOqLuewbid8WT1ilk=";
|
||||||
|
};
|
||||||
|
in
|
||||||
|
assert lib.assertMsg (
|
||||||
|
gamemodeSupport -> stdenv.hostPlatform.isLinux
|
||||||
|
) "gamemodeSupport is only available on Linux.";
|
||||||
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
|
pname = "prismlauncher-unwrapped-master";
|
||||||
|
version = "git-master";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "PrismLauncher";
|
||||||
|
repo = "PrismLauncher";
|
||||||
|
rev = "8abf5ed7b1f31a89fad1b8d7fb1703639ca08426";
|
||||||
|
hash = "sha256-URkD8zzvQ0g//9SQSP+gm9D8ypiiRpUGY2nMdJjjEr8=";
|
||||||
|
};
|
||||||
|
|
||||||
|
postUnpack = ''
|
||||||
|
rm -rf source/libraries/libnbtplusplus
|
||||||
|
ln -s ${libnbtplusplus} source/libraries/libnbtplusplus
|
||||||
|
'';
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
cmake
|
||||||
|
ninja
|
||||||
|
extra-cmake-modules
|
||||||
|
jdk17
|
||||||
|
stripJavaArchivesHook
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
cmark
|
||||||
|
ghc_filesystem
|
||||||
|
kdePackages.qtbase
|
||||||
|
kdePackages.qtnetworkauth
|
||||||
|
kdePackages.quazip
|
||||||
|
tomlplusplus
|
||||||
|
zlib
|
||||||
|
qrencode
|
||||||
|
]
|
||||||
|
++ lib.optional gamemodeSupport gamemode;
|
||||||
|
|
||||||
|
# hardeningEnable = lib.optionals stdenv.hostPlatform.isLinux [ "pie" ];
|
||||||
|
|
||||||
|
cmakeFlags = [
|
||||||
|
# downstream branding
|
||||||
|
(lib.cmakeFeature "Launcher_BUILD_PLATFORM" "nixpkgs")
|
||||||
|
]
|
||||||
|
++ lib.optionals (msaClientID != null) [
|
||||||
|
(lib.cmakeFeature "Launcher_MSA_CLIENT_ID" (toString msaClientID))
|
||||||
|
]
|
||||||
|
++ lib.optionals (lib.versionOlder kdePackages.qtbase.version "6") [
|
||||||
|
(lib.cmakeFeature "Launcher_QT_VERSION_MAJOR" "5")
|
||||||
|
]
|
||||||
|
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||||
|
# we wrap our binary manually
|
||||||
|
(lib.cmakeFeature "INSTALL_BUNDLE" "nodeps")
|
||||||
|
# disable built-in updater
|
||||||
|
(lib.cmakeFeature "MACOSX_SPARKLE_UPDATE_FEED_URL" "''")
|
||||||
|
(lib.cmakeFeature "CMAKE_INSTALL_PREFIX" "${placeholder "out"}/Applications/")
|
||||||
|
];
|
||||||
|
|
||||||
|
doCheck = true;
|
||||||
|
|
||||||
|
dontWrapQtApps = true;
|
||||||
|
|
||||||
|
passthru = {
|
||||||
|
updateScript = nix-update-script { };
|
||||||
|
};
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "Free, open source launcher for Minecraft";
|
||||||
|
longDescription = ''
|
||||||
|
Allows you to have multiple, separate instances of Minecraft (each with
|
||||||
|
their own mods, texture packs, saves, etc) and helps you manage them and
|
||||||
|
their associated options with a simple interface.
|
||||||
|
'';
|
||||||
|
homepage = "https://prismlauncher.org/";
|
||||||
|
changelog = "https://github.com/PrismLauncher/PrismLauncher/releases/tag/${finalAttrs.version}";
|
||||||
|
license = lib.licenses.gpl3Only;
|
||||||
|
maintainers = with lib.maintainers; [
|
||||||
|
minion3665
|
||||||
|
Scrumplex
|
||||||
|
getchoo
|
||||||
|
];
|
||||||
|
mainProgram = "prismlauncher";
|
||||||
|
platforms = lib.platforms.linux ++ lib.platforms.darwin;
|
||||||
|
};
|
||||||
|
})
|
||||||
Loading…
Add table
Add a link
Reference in a new issue