MultiMC-Nixos/default.nix

26 lines
774 B
Nix
Raw Permalink Normal View History

2024-06-21 18:31:23 +00:00
{ ... }:
let
pkgs = import <nixpkgs> {};
2024-06-21 20:07:45 +00:00
inherit (pkgs) stdenv fetchurl autoPatchelfHook;
2024-06-21 18:31:23 +00:00
in {
MultiMC = stdenv.mkDerivation rec {
pname = "MultiMC";
2024-06-21 19:38:44 +00:00
version = "develop";
2024-06-21 20:07:45 +00:00
src = fetchurl {
url = "https://files.multimc.org/downloads/mmc-develop-lin64.tar.gz";
sha256 = "c70c9b8d152d33d2f64d91109939a2f21f9717cf0d16e316c796443273141e15";
};
2024-06-21 18:31:23 +00:00
2024-06-21 19:38:44 +00:00
nativeBuildInputs = with pkgs; [ autoPatchelfHook qt5.wrapQtAppsHook ];
2024-06-21 18:31:23 +00:00
installPhase = ''
cp -r . $out
2024-06-21 19:38:44 +00:00
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
2024-06-21 18:31:23 +00:00
'';
};
}