guix-epistemia

Personal Guix channel
Log | Files | Refs

minecraft.scm (3957B)


      1 (define-module (epistemia packages minecraft)
      2   #:use-module (guix build-system cmake)
      3   #:use-module (gnu packages audio)
      4   #:use-module (gnu packages bash)
      5   #:use-module (gnu packages compression)
      6   #:use-module (gnu packages jemalloc)
      7   #:use-module (gnu packages linux)
      8   #:use-module (gnu packages qt)
      9   #:use-module (gnu packages xorg)
     10   #:use-module (gnu packages gl)
     11   #:use-module (gnu packages java)
     12   #:use-module (gnu packages kde-frameworks)
     13   #:use-module (guix packages)
     14   #:use-module (guix gexp)
     15   #:use-module (guix git-download)
     16   #:use-module ((guix licenses) :prefix license:)
     17   #:use-module ((nonguix licenses) :prefix non-license:))
     18 
     19 (define-public prismlauncher
     20   (package
     21     (name "prismlauncher")
     22     (version "9.4")
     23     (source (origin
     24               (method git-fetch)
     25               (uri (git-reference
     26                      (url "https://github.com/PrismLauncher/PrismLauncher")
     27                      (recursive? #t)
     28                      (commit version)))
     29               (file-name (git-file-name name version))
     30               (sha256
     31                (base32
     32 		"1xxgyx0z5r3hk3yk4gglbfwvq2qk1j9a0dkrv55j4vrlkni79nrm"))))
     33     (build-system cmake-build-system)
     34     (arguments
     35      `(#:phases
     36        (modify-phases %standard-phases
     37 	 (add-after 'install 'patch-paths
     38 	   (lambda* (#:key inputs outputs #:allow-other-keys)
     39 	     (let* ((out            (assoc-ref outputs "out"))
     40 		    (bin            (string-append out "/bin/prismlauncher"))
     41 		    (xrandr         (assoc-ref inputs "xrandr"))
     42 		    (qtwayland      (assoc-ref inputs "qtwayland"))
     43 		    (qtsvg          (assoc-ref inputs "qtsvg"))
     44 		    (jdk17          (assoc-ref inputs "jdk17"))
     45 		    (jdk25          (assoc-ref inputs "jdk25")))
     46 	       (wrap-program bin
     47 		 `("JAVA_HOME" = (,jdk25))
     48 		 `("PATH" ":" prefix (,(string-append xrandr "/bin")
     49 				      ,(string-append jdk17 "/bin")
     50 				      ,(string-append jdk25 "/bin")))
     51 		 `("QT_PLUGIN_PATH" ":" prefix ,(map (lambda (package)
     52 						       (string-append package "/lib/qt6/plugins"))
     53 						     (list qtwayland qtsvg)))
     54 		 `("LD_LIBRARY_PATH" ":" prefix
     55 		   (,@(map (lambda (dep)
     56 			     (string-append (assoc-ref inputs dep)
     57 					    "/lib"))
     58 			   '("libx11" "libxext" "libxcursor"
     59 			     "libxrandr" "libxxf86vm" "mesa"
     60 			     "glfw" "openal" "jemalloc" "alsa-lib")))))
     61 	       #t))))))
     62     (native-inputs (list extra-cmake-modules))
     63     (inputs
     64      `(("bash" ,bash-minimal)
     65        ("zlib" ,zlib)
     66        ("qtbase" ,qtbase)
     67        ("qt5compat" ,qt5compat)
     68        ("qtnetworkauth" ,qtnetworkauth)
     69        ("qtwayland" ,qtwayland)
     70        ("qtsvg" ,qtsvg)
     71        ("xrandr" ,xrandr)
     72        ("libx11" ,libx11)
     73        ("libxext" ,libxext)
     74        ("libxcursor" ,libxcursor)
     75        ("libxrandr" ,libxrandr)
     76        ("libxxf86vm" ,libxxf86vm)
     77        ("mesa" ,mesa)
     78        ("glfw" ,glfw)
     79        ("openal" ,openal)
     80        ("alsa-lib" ,alsa-lib)
     81        ("jemalloc" ,jemalloc)
     82        ("jdk17" ,openjdk17 "jdk")
     83        ("jdk25" ,openjdk25 "jdk")))
     84     (home-page "https://prismlauncher.org/")
     85     (synopsis "Free, open source launcher for Minecraft")
     86     (description
     87      "Allows you to have multiple, separate instances of Minecraft (each with
     88 their own mods, texture packs, saves, etc), and helps you manage them and
     89 their associated options with a simple interface.")
     90     (license (list license:gpl3          ; PolyMC, launcher
     91 		   license:expat         ; MinGW runtime, lionshead, tomlc99
     92 		   license:lgpl3         ; Qt 5/6
     93 		   license:lgpl3+        ; libnbt++
     94 		   license:lgpl2.1+      ; rainbow (KGuiAddons)
     95 		   license:isc           ; Hoedown
     96 		   license:silofl1.1     ; Material Design Icons
     97 		   license:lgpl2.1       ; Quazip
     98 		   license:public-domain ; xz-minidec, murmur2, xz-embedded
     99 		   license:bsd-3         ; ColumnResizer, O2 (Katabasis fork),
    100 					; gamemode, localpeer
    101 		   license:asl2.0        ; classparser, systeminfo
    102 		   ;; Batch icon set:
    103 		   (non-license:nonfree "file://COPYING.md")))))