From 96ca9558928f4ffc9a99a94059fcd93d0a9de761 Mon Sep 17 00:00:00 2001 From: Azat Bahawi Date: Sun, 11 Sep 2022 19:28:11 +0300 Subject: 2022-09-11 --- packages/ultimmc.nix | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) (limited to 'packages/ultimmc.nix') diff --git a/packages/ultimmc.nix b/packages/ultimmc.nix index dcb646a..86377b4 100644 --- a/packages/ultimmc.nix +++ b/packages/ultimmc.nix @@ -3,6 +3,7 @@ fetchFromGitHub, jdk, makeDesktopItem, + ninja, qtbase, stdenv, wrapQtAppsHook, @@ -10,19 +11,27 @@ }: stdenv.mkDerivation rec { pname = "UltimMC"; - version = "unstable-2022-07-20"; + version = "git"; src = fetchFromGitHub { owner = "UltimMC"; repo = "Launcher"; - rev = "a522ec3ad4602de1f457a25bce98ef912a29d7d6"; - hash = "sha256-+UgBblyEx0cKH8UMBOPtjhQLv2YUKj91UokQWKCEPbY="; + rev = "6bfa07e728865d8d31a43ef5231b2461d55fc4b3"; fetchSubmodules = true; + hash = "sha256-gMEjy1jM/T7Un4FDNbAd9AAdVUOHRfL+arhahHPCBFo="; }; - nativeBuildInputs = [cmake jdk wrapQtAppsHook]; + nativeBuildInputs = [ + cmake + jdk + ninja + wrapQtAppsHook + ]; - buildInputs = [qtbase zlib]; + buildInputs = [ + qtbase + zlib + ]; postPatch = '' substituteInPlace CMakeLists.txt \ @@ -33,11 +42,9 @@ stdenv.mkDerivation rec { --replace '"jars"' '"../share/${pname}/jar"'; ''; - cmakeFlags = ["-DCMAKE_BUILD_TYPE=Release"]; - desktopItem = makeDesktopItem { name = pname; - exec = pname; + exec = "DevLauncher"; icon = pname; desktopName = pname; genericName = "Custom Minecraft launcher"; @@ -47,11 +54,7 @@ stdenv.mkDerivation rec { dontWrapQtApps = true; postInstall = '' - rm $out/${pname} - - wrapProgram $out/bin/${pname} \ - --add-flags "--dir \''${XDG_DATA_HOME:-~/.local/share}/${pname}" \ - "''${qtWrapperArgs[@]}" + rm $out/DevLauncher install -Dm644 \ ${desktopItem}/share/applications/${pname}.desktop \ @@ -60,4 +63,10 @@ stdenv.mkDerivation rec { $src/notsecrets/logo.svg \ $out/share/icons/hicolor/scalable/apps/${pname}.svg ''; + + postFixup = '' + wrapProgram $out/bin/DevLauncher \ + --add-flags "--dir \''${XDG_DATA_HOME:-~/.local/share}/${pname}" \ + "''${qtWrapperArgs[@]}" + ''; } -- cgit 1.4.1