summaryrefslogtreecommitdiffstats
path: root/pollymc.scm
blob: a314fb583d472ba57cdd7d6afd71dabb35fc21d5 (plain) (blame)
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
(define-module (pollymc)
  #:use-module (guix build-system cmake)
  #:use-module (gnu packages bash)
  #:use-module (gnu packages compression)
  #:use-module (gnu packages pulseaudio)
  #:use-module (gnu packages qt)
  #:use-module (gnu packages xorg)
  #:use-module (gnu packages gl)
  #:use-module (gnu packages java)
  #:use-module (gnu packages kde-frameworks)
  #:use-module (guix packages)
  #:use-module (guix gexp)
  #:use-module (guix git-download)
  #:use-module ((guix licenses) :prefix license:)
  #:use-module ((nonguix licenses) :prefix non-license:))

(define-public pollymc
  (package
    (name "pollymc")
    (version "7.1")
    (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url "https://github.com/fn2006/PollyMC")
                    (recursive? #t)
                    (commit version)))
              (file-name (git-file-name name version))
              (sha256
               (base32
                "15qxc6g81n1why2pvn4ilhr19kk6znc6m67q1v85mgai2y4hlr9q"))))
    (build-system cmake-build-system)
    (arguments
     `(#:configure-flags (list "-DLauncher_QT_VERSION_MAJOR=5")
       #:phases
       (modify-phases %standard-phases
         (add-after 'install 'patch-paths
           (lambda* (#:key inputs outputs #:allow-other-keys)
             (let* ((out            (assoc-ref outputs "out"))
                    (bin            (string-append out "/bin/pollymc"))
                    (xrandr         (assoc-ref inputs "xrandr"))
                    (qtwayland      (assoc-ref inputs "qtwayland")))
               (wrap-program bin
                 `("PATH" ":" prefix (,(string-append xrandr "/bin")))
                 `("QT_PLUGIN_PATH" ":" prefix (,(string-append
                                                  qtwayland "/lib/qt5/plugins")))
                 `("LD_LIBRARY_PATH" ":" prefix
                   (,@(map (lambda (dep)
                             (string-append (assoc-ref inputs dep)
                                            "/lib"))
                           '("libx11" "libxext" "libxcursor"
                             "libxrandr" "libxxf86vm" "pulseaudio" "mesa")))))
               #t))))))
    (native-inputs (list extra-cmake-modules))
    (inputs (list bash-minimal ; for wrap-program
                  zlib
                  qtbase-5
                  qtwayland
                  xrandr
                  libx11
                  libxext
                  libxcursor
                  libxrandr
                  libxxf86vm
                  pulseaudio
                  mesa))
    (propagated-inputs (list `(,openjdk17 "jdk")))
    (home-page "https://pollymc.org/")
    (synopsis "Free, open source launcher for Minecraft")
    (description
     "Allows you to have multiple, separate instances of Minecraft (each with
their own mods, texture packs, saves, etc), and helps you manage them and
their associated options with a simple interface.

PollyMC is a fork of Prism Launcher that adds support for Ely.by accounts and allows you to play offline mode without an account

PollyMC is not endorsed by or affiliated with the Prism Launcher project. If you have any problems open an issue here, do not bug the Prism Launcher maintainers.
")
    (license (list license:gpl3          ; PolyMC, launcher
                   license:expat         ; MinGW runtime, lionshead, tomlc99
                   license:lgpl3         ; Qt 5/6
                   license:lgpl3+        ; libnbt++
                   license:lgpl2.1+      ; rainbow (KGuiAddons)
                   license:isc           ; Hoedown
                   license:silofl1.1     ; Material Design Icons
                   license:lgpl2.1       ; Quazip
                   license:public-domain ; xz-minidec, murmur2, xz-embedded
                   license:bsd-3         ; ColumnResizer, O2 (Katabasis fork),
                                         ; gamemode, localpeer
                   license:asl2.0        ; classparser, systeminfo
                   ;; Batch icon set:
                   (non-license:nonfree "file://COPYING.md")))))