Minecraft wayland patch try
This commit is contained in:
parent
97f110e511
commit
897e6c5c15
1 changed files with 30 additions and 1 deletions
|
@ -1,6 +1,30 @@
|
|||
{ config, inputs, pkgs, ... }:
|
||||
{ config, inputs, pkgs, lib, ... }:
|
||||
let
|
||||
username = config.modules.other.system.username;
|
||||
|
||||
# Fetch the GLFW with Wayland patches for Minecraft
|
||||
customGLFW = let
|
||||
mcWaylandPatchRepo = pkgs.fetchFromGitHub {
|
||||
owner = "Admicos";
|
||||
repo = "minecraft-wayland";
|
||||
rev = "370ce5b95e3ae9bc4618fb45113bc641fbb13867";
|
||||
sha256 = "sha256-RPRg6Gd7N8yyb305V607NTC1kUzvyKiWsh6QlfHW+JE=";
|
||||
};
|
||||
mcWaylandPatches = map (name: "${mcWaylandPatchRepo}/${name}")
|
||||
(lib.naturalSort (builtins.attrNames (lib.filterAttrs
|
||||
(name: type:
|
||||
type == "regular" && lib.hasSuffix ".patch" name)
|
||||
(builtins.readDir mcWaylandPatchRepo))));
|
||||
in pkgs.glfw.overrideAttrs (previousAttrs: {
|
||||
patches = previousAttrs.patches ++ mcWaylandPatches;
|
||||
buildInputs = previousAttrs.buildInputs ++ [ pkgs.wayland ];
|
||||
});
|
||||
|
||||
# Minecraft launcher with the custom GLFW
|
||||
minecraftPrismLauncher = pkgs.prismlauncher.override {
|
||||
glfw = customGLFW;
|
||||
};
|
||||
|
||||
in {
|
||||
home-manager.users.${username} = {
|
||||
home.packages = let
|
||||
|
@ -9,4 +33,9 @@ in {
|
|||
in with pkgs; [
|
||||
];
|
||||
};
|
||||
|
||||
# System-wide installation of Minecraft PrismLauncher
|
||||
environment.systemPackages = [
|
||||
minecraftPrismLauncher
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue