From 8da070e785a911806f19e75640b16b4352e5385a Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 21 Jun 2024 20:38:44 +0100 Subject: [PATCH] streamlining build --- MultiMC | 5 ----- default.nix | 21 ++++++++------------- 2 files changed, 8 insertions(+), 18 deletions(-) delete mode 100755 MultiMC diff --git a/MultiMC b/MultiMC deleted file mode 100755 index b8a06f3..0000000 --- a/MultiMC +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -DIR=$(dirname -- "$( readlink -f -- "$0"; )";) - -$DIR/../MultiMC $@ -d ~/.multimc diff --git a/default.nix b/default.nix index 45d6450..9fddf0d 100644 --- a/default.nix +++ b/default.nix @@ -1,27 +1,22 @@ { ... }: let pkgs = import {}; - inherit (pkgs) stdenv fetchurl autoPatchelfHook; + inherit (pkgs) stdenv autoPatchelfHook; in { MultiMC = stdenv.mkDerivation rec { pname = "MultiMC"; - version = ""; + version = "develop"; - src = fetchurl { - url = "https://files.multimc.org/downloads/mmc-develop-lin64.tar.gz"; - sha256 = "c70c9b8d152d33d2f64d91109939a2f21f9717cf0d16e316c796443273141e15"; - }; + src = builtins.fetchTarball "https://files.multimc.org/downloads/mmc-develop-lin64.tar.gz"; - buildInputs = with pkgs; [ libsForQt5.qt5.qtbase stdenv.cc.cc.lib ]; - nativeBuildInputs = with pkgs; [ autoPatchelfHook qt5.wrapQtAppsHook ] ; + nativeBuildInputs = with pkgs; [ autoPatchelfHook qt5.wrapQtAppsHook ]; installPhase = '' cp -r . $out - #install -vD MultiMC -t $out/MultiMC - #cp -r bin $out/MultiMC - install -v ${./MultiMC} $out/bin/MultiMC-run - #install -D ${./MultiMC} -t $out/bin/MultiMC-run - #install -D ${./MultiMC.desktop} -t $out/share/applications + echo "#!/bin/sh + $out/MultiMC -d ~/.multimc" > $out/bin/MultiMC-run + chmod 555 $out/bin/MultiMC-run + install -D ${./MultiMC.desktop} -t $out/share/applications ''; }; }