summaryrefslogtreecommitdiff
path: root/pkgs/modrinth-app/default.nix
blob: 3ea1d6efbec4f008a2c0fd81e62fceec904384de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{  stdenv, lib, appimage-run, fetchurl, writeShellScriptBin, libthai }:

stdenv.mkDerivation rec {
  pname = "modrinth-app";
  version = "0.6.0";

  buildInputs = [
    libthai
  ];

  unpackPhase = "true";
  srcs = [];

  postInstall = let
    src = fetchurl {
      url = "https://launcher-files.modrinth.com/versions/${version}/linux/${pname}_${version}_amd64.AppImage";
      sha256 = "sha256-7BIoKqFXe9gqSfQXk8BUEQT5Fx7S8tXZ9cBl+WBjMGc=";
    };
  in ''
    mkdir -p $out/bin
    echo "${appimage-run}/bin/appimage-run ${src}" > $out/bin/modrinth-app
    chmod +x $out/bin/modrinth-app
  '';

  meta = with lib; {
    description = "Modrinth minecraft launcher";
    homepage = "https://modrinth.com/app";
    #license = licenses.gpl3Only;
    #maintainers = with maintainers; [ elnudev ];
    platforms = [ "x86_64-linux" ];
    sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
  };
}
Software created with 💖