summaryrefslogtreecommitdiff
path: root/pkgs/modrinth-app/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/modrinth-app/default.nix')
-rw-r--r--pkgs/modrinth-app/default.nix54
1 files changed, 39 insertions, 15 deletions
diff --git a/pkgs/modrinth-app/default.nix b/pkgs/modrinth-app/default.nix
index 3ea1d6e..1d18654 100644
--- a/pkgs/modrinth-app/default.nix
+++ b/pkgs/modrinth-app/default.nix
@@ -1,32 +1,56 @@
-{ stdenv, lib, appimage-run, fetchurl, writeShellScriptBin, libthai }:
-
-stdenv.mkDerivation rec {
+{
+ autoPatchelfHook,
+ dpkg,
+ fetchurl,
+ glib,
+ gtk3,
+ lib,
+ libsoup,
+ libthai,
+ openssl_1_1,
+ stdenv,
+ webkitgtk,
+}: stdenv.mkDerivation rec {
pname = "modrinth-app";
version = "0.6.0";
+ srcs = [];
+ src = fetchurl {
+ url = "https://launcher-files.modrinth.com/versions/${version}/linux/${pname}_${version}_amd64.deb";
+ sha256 = "sha256-usaXxLp8IendOaiGFAXdEDnjW3lyyp0SSCGR1IG82m8=";
+ };
+
buildInputs = [
+ autoPatchelfHook
+ dpkg
+ glib
+ gtk3
+ libsoup
libthai
+ openssl_1_1
+ webkitgtk
];
unpackPhase = "true";
- srcs = [];
+ installPhase = ''
+ runHook preInstall
+
+ mkdir -p $out
+ dpkg -x $src $out
+
+ mv $out/usr/* $out
+ rm -rf $out/usr
+
+ chmod +x $out/bin/${pname}
- 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
+ runHook postInstall
'';
meta = with lib; {
description = "Modrinth minecraft launcher";
homepage = "https://modrinth.com/app";
- #license = licenses.gpl3Only;
- #maintainers = with maintainers; [ elnudev ];
+ license = licenses.gpl3Only;
+ maintainers = with maintainers; [ jptrzy ];
platforms = [ "x86_64-linux" ];
sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
};
Software created with 💖