minecraft.scm 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. (define-module (games minecraft)
  2. #:use-module (guix build-system cmake)
  3. #:use-module (gnu packages compression)
  4. #:use-module (gnu packages pulseaudio)
  5. #:use-module (gnu packages qt)
  6. #:use-module (gnu packages xorg)
  7. #:use-module (gnu packages gl)
  8. #:use-module (gnu packages java)
  9. #:use-module (guix packages)
  10. #:use-module (guix git-download))
  11. (define-public multimc
  12. (package
  13. (name "multimc")
  14. (version "0.6.7")
  15. (source (origin
  16. (method git-fetch)
  17. (uri (git-reference
  18. (url "https://github.com/MultiMC/MultiMC5.git")
  19. (recursive? #t)
  20. (commit version)))
  21. (file-name (git-file-name name version))
  22. (sha256
  23. (base32
  24. "1i160rmsdvrcnvlr6m2qjwkfx0lqnzrcifjkaklw96ina6z6cg2n"))))
  25. (build-system cmake-build-system)
  26. (arguments
  27. `(#:tests? #f
  28. #:configure-flags '("-DMultiMC_LAYOUT=lin-system")
  29. #:phases
  30. (modify-phases %standard-phases
  31. (add-after 'install 'patch-paths
  32. (lambda* (#:key inputs outputs #:allow-other-keys)
  33. (let* ((out (assoc-ref outputs "out"))
  34. (bin (string-append out "/bin"))
  35. (exe (string-append bin "/multimc"))
  36. (xrandr (assoc-ref inputs "xrandr"))
  37. (jdk (assoc-ref inputs "jdk")))
  38. (wrap-program exe
  39. `("PATH" ":" prefix (,(string-append xrandr "/bin")
  40. ,(string-append jdk "/bin")))
  41. `("GAME_LIBRARY_PATH" ":" prefix
  42. (,@(map (lambda (dep)
  43. (string-append (assoc-ref inputs dep)
  44. "/lib"))
  45. '("libx11" "libxext" "libxcursor"
  46. "libxrandr" "libxxf86vm" "pulseaudio" "mesa")))))
  47. #t))))))
  48. (inputs
  49. `(("jdk" ,icedtea "jdk")
  50. ("zlib" ,zlib)
  51. ("qtbase" ,qtbase)
  52. ("xrandr" ,xrandr)
  53. ("libx11" ,libx11)
  54. ("libxext" ,libxext)
  55. ("libxcursor" ,libxcursor)
  56. ("libxrandr" ,libxrandr)
  57. ("libxxf86vm" ,libxxf86vm)
  58. ("pulseaudio" ,pulseaudio)
  59. ("mesa" ,mesa)))
  60. (home-page "https://multimc.org/")
  61. (synopsis "Launcher for Minecraft")
  62. (description
  63. "Allows you to have multiple, separate instances of Minecraft and
  64. helps you manage them and their associated options with a simple
  65. interface.")
  66. ;; TODO: https://github.com/MultiMC/MultiMC5/blob/develop/COPYING.md
  67. (license #f)))