about summary refs log tree commit diff
path: root/packages/ultimmc.nix
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--packages/ultimmc.nix35
1 files changed, 22 insertions, 13 deletions
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[@]}"
+  '';
 }

Consider giving Nix/NixOS a try! <3