diff options
| author | seth <[email protected]> | 2023-08-08 18:20:22 -0400 |
|---|---|---|
| committer | seth <[email protected]> | 2023-08-09 07:50:01 -0400 |
| commit | 6cee1a15fe92512dcf269fb2357d1b275bbf020a (patch) | |
| tree | 3c46f6fa6904597b3dd6a9ae0ce73653b5b088fc /pkgs/modrinth-app/wrapper.nix | |
| parent | 357b926304cfc6ef0906e4e3687dd91673ce9519 (diff) | |
pkgs/modrinth-app: rename from theseus
Diffstat (limited to 'pkgs/modrinth-app/wrapper.nix')
| -rw-r--r-- | pkgs/modrinth-app/wrapper.nix | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/pkgs/modrinth-app/wrapper.nix b/pkgs/modrinth-app/wrapper.nix new file mode 100644 index 0000000..d120b2b --- /dev/null +++ b/pkgs/modrinth-app/wrapper.nix @@ -0,0 +1,73 @@ +{ + lib, + stdenv, + symlinkJoin, + modrinth-app-unwrapped, + wrapGAppsHook, + dbus, + flite, + freetype, + glib-networking, + glfw, + gtk3, + jdk8, + jdk17, + jdks ? [jdk8 jdk17], + libappindicator-gtk3, + libGL, + libpulseaudio, + librsvg, + libsoup, + openal, + webkitgtk, + xorg, + ... +}: let + final = modrinth-app-unwrapped; +in + symlinkJoin { + name = "modrinth-app-${final.version}"; + + paths = [final]; + + nativeBuildInputs = [ + wrapGAppsHook + ]; + + buildInputs = lib.optionals stdenv.isLinux [ + dbus + freetype + gtk3 + libappindicator-gtk3 + librsvg + libsoup + webkitgtk + ]; + + preFixup = let + libPath = lib.makeLibraryPath ([ + flite + glfw + libGL + libpulseaudio + openal + stdenv.cc.cc.lib + ] + ++ (with xorg; [ + libX11 + libXcursor + libXext + libXxf86vm + libXrandr + ])); + binPath = lib.makeBinPath (lib.optionals stdenv.isLinux [xorg.xrandr] ++ jdks); + in '' + gappsWrapperArgs+=( + ${lib.optionalString stdenv.isLinux "--set LD_LIBRARY_PATH /run/opengl-driver/lib:${libPath}"} + ${lib.optionalString stdenv.isLinux "--prefix GIO_MODULE_DIR : ${glib-networking}/lib/gio/modules/"} + --prefix PATH : ${binPath} + ) + ''; + + inherit (final) meta; + } |
