update multimc
This commit is contained in:
parent
1013c7c032
commit
b1b162a829
12
flake.nix
12
flake.nix
@ -45,10 +45,14 @@
|
||||
url = gitlab:rycee/nur-expressions;
|
||||
flake = false;
|
||||
};
|
||||
# multimc-cracked = {
|
||||
# url = github:AfoninZ/MultiMC5-Cracked;
|
||||
# flake = false;
|
||||
# };
|
||||
multimc-cracked = {
|
||||
url = "https://github.com/AfoninZ/MultiMC5-Cracked.git";
|
||||
ref = "develop";
|
||||
rev = "9069e9c9d0b7951c310fdcc8bdc70ebc422a7634";
|
||||
flake = false;
|
||||
submodules = true;
|
||||
type = "git";
|
||||
};
|
||||
qbittorrent-ee = {
|
||||
url = github:c0re100/qBittorrent-Enhanced-Edition;
|
||||
flake = false;
|
||||
|
@ -31,16 +31,7 @@ in
|
||||
vscode = master.vscode;
|
||||
vscode-fhs = master.vscode-fhs;
|
||||
vivaldi = master.vivaldi;
|
||||
multimc = super.multimc.overrideAttrs (stable: rec {
|
||||
version = "unstable-cracked";
|
||||
src = super.fetchFromGitHub {
|
||||
owner = "AfoninZ";
|
||||
repo = "MultiMC5-Cracked";
|
||||
rev = "6d6218a21ba54e77c4fc76b3ae8cddf3334f1a5d";
|
||||
sha256 = "0k59pnqdlzqp75c1lbpqy2i09mmy5qisikalm427i16b07ga9xcl";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
});
|
||||
multimc = pkgs.qt5.callPackage ./packages/multimc.nix { multimc-repo = inputs.multimc-cracked; };
|
||||
steam = super.steam.override {
|
||||
extraLibraries = pkgs: with pkgs; [
|
||||
pipewire
|
||||
|
48
modules/packages/multimc.nix
Normal file
48
modules/packages/multimc.nix
Normal file
@ -0,0 +1,48 @@
|
||||
{ multimc-repo, lib, pkgs, mkDerivation }:
|
||||
|
||||
let
|
||||
libpath = with pkgs; lib.makeLibraryPath [ xorg.libX11 xorg.libXext xorg.libXcursor xorg.libXrandr xorg.libXxf86vm libpulseaudio libGL ];
|
||||
in mkDerivation rec {
|
||||
pname = "multimc";
|
||||
version = "unstable";
|
||||
src = multimc-repo;
|
||||
nativeBuildInputs = with pkgs; [ cmake file makeWrapper ];
|
||||
buildInputs = with pkgs; [ libsForQt5.qt5.qtbase jdk8 jdk zlib ];
|
||||
|
||||
# patches = [ ./0001-pick-latest-java-first.patch ];
|
||||
|
||||
postPatch = ''
|
||||
# hardcode jdk paths
|
||||
substituteInPlace api/logic/java/JavaUtils.cpp \
|
||||
--replace 'scanJavaDir("/usr/lib/jvm")' 'javas.append("${pkgs.jdk}/lib/openjdk/bin/java")' \
|
||||
--replace 'scanJavaDir("/usr/lib32/jvm")' 'javas.append("${pkgs.jdk8}/lib/openjdk/bin/java")'
|
||||
'';
|
||||
|
||||
cmakeFlags = [ "-DMultiMC_LAYOUT=lin-system" ];
|
||||
|
||||
postInstall = ''
|
||||
ls -lah ./
|
||||
ls -lah ../
|
||||
install -Dm644 ../application/resources/multimc/scalable/multimc.svg $out/share/pixmaps/multimc.svg
|
||||
install -Dm755 ../application/package/linux/multimc.desktop $out/share/applications/multimc.desktop
|
||||
|
||||
# xorg.xrandr needed for LWJGL [2.9.2, 3) https://github.com/LWJGL/lwjgl/issues/128
|
||||
wrapProgram $out/bin/multimc \
|
||||
--set GAME_LIBRARY_PATH /run/opengl-driver/lib:${libpath} \
|
||||
--prefix PATH : ${lib.makeBinPath [ pkgs.xorg.xrandr ]}
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://multimc.org/";
|
||||
description = "A 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.
|
||||
'';
|
||||
platforms = platforms.linux;
|
||||
license = licenses.asl20;
|
||||
# upstream don't want us to re-distribute this application:
|
||||
# https://github.com/NixOS/nixpkgs/issues/131983
|
||||
hydraPlatforms = [];
|
||||
maintainers = with maintainers; [ cleverca22 starcraft66 ];
|
||||
};
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user