diff options
| author | seth <[email protected]> | 2023-08-08 17:44:25 -0400 |
|---|---|---|
| committer | seth <[email protected]> | 2023-08-09 07:50:01 -0400 |
| commit | 357b926304cfc6ef0906e4e3687dd91673ce9519 (patch) | |
| tree | 0c396662b6896d962ccde5be0bacd18b893f0f0d /pkgs/theseus/wrapper.nix | |
| parent | ab4a5cb0c6c713d5e3a98f3e21eb8a2bb759653d (diff) | |
pkgs/theseus: split wrapper & add desktop icon
Diffstat (limited to 'pkgs/theseus/wrapper.nix')
| -rw-r--r-- | pkgs/theseus/wrapper.nix | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/pkgs/theseus/wrapper.nix b/pkgs/theseus/wrapper.nix new file mode 100644 index 0000000..c907451 --- /dev/null +++ b/pkgs/theseus/wrapper.nix @@ -0,0 +1,73 @@ +{ + lib, + stdenv, + symlinkJoin, + theseus-unwrapped, + wrapGAppsHook, + dbus, + flite, + freetype, + glib-networking, + glfw, + gtk3, + jdk8, + jdk17, + jdks ? [jdk8 jdk17], + libappindicator-gtk3, + libGL, + libpulseaudio, + librsvg, + libsoup, + openal, + webkitgtk, + xorg, + ... +}: let + theseusFinal = theseus-unwrapped; +in + symlinkJoin { + name = "theseus-${theseusFinal.version}"; + + paths = [theseusFinal]; + + 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 (theseusFinal) meta; + } |
