dev.fron.io rc / 77ded3d
packages: add papermc@1.16.5r771 Tony Olagbaiye a month ago
5 changed file(s) with 103 addition(s) and 40 deletion(s). Raw diff Collapse all Expand all
3434 #:use-module (flat packages emacs)
3535 #:use-module (rde packages)
3636 #:use-module (rc packages discord)
37 #:use-module (rc packages pipewire-next)
37 #:use-module (rc packages pipewire)
3838 #:export (env))
3939
4040 (define dvtm-custom
0 (define-module (rc packages papermc)
1 #:use-module (rc packages)
2 #:use-module (guix gexp)
3 #:use-module (guix packages)
4 #:use-module (guix download)
5 #:use-module ((guix licenses) #:prefix license:)
6 #:use-module (guix build-system trivial)
7 #:use-module (gnu packages)
8 #:use-module (gnu packages bash)
9 #:use-module (gnu packages java)
10 #:export (papermc))
11
12 (define papermc
13 (let ((mc-version "1.16.5")
14 (build-num "771"))
15 (package
16 (name "papermc")
17 (version (string-append mc-version "r" build-num))
18 (source (origin
19 (method url-fetch)
20 (uri (string-append "https://papermc.io/api/v1/paper/"
21 mc-version
22 "/"
23 build-num
24 "/download"))
25 (sha256
26 (base32
27 "1lmlfhigbzbkgzfq6knglka0ccf4i32ch25gkny0c5fllmsnm08l"))))
28 (build-system trivial-build-system)
29 (inputs `(("openjdk" ,openjdk16)
30 ("bash" ,bash)))
31 (arguments
32 `(#:modules ((guix build utils))
33 #:builder (begin
34 (use-modules (guix build utils)
35 (srfi srfi-26))
36 (let* ((source (assoc-ref %build-inputs "source"))
37 (patchelf (assoc-ref %build-inputs "patchelf"))
38 (openjdk (assoc-ref %build-inputs "openjdk"))
39 (bash (assoc-ref %build-inputs "bash"))
40 (output (assoc-ref %outputs "out")))
41 (mkdir-p (string-append output "/share/papermc"))
42 (copy-file source (string-append output "/share/papermc/papermc.jar"))
43 (mkdir-p (string-append output "/bin"))
44 ;; TODO: replace this with lisp (use install-jars, etc)
45 (let ((port (open-file (string-append output "/bin/minecraft-server") "a")))
46 (display (string-append "#!" (string-append bash "/bin/sh") "\n") port)
47 (display (string-append "exec -a minecraft-server "
48 (string-append openjdk "/bin/java ")
49 "-jar "
50 (string-append output "/share/papermc/papermc.jar ")
51 "nogui "
52 "\n") port)
53 ;; TODO: use some syntax sugar like "with-output-to-port"?
54 (close port))
55 (chmod (string-append output "/bin/minecraft-server") #o555)
56 #t))))
57 (home-page "https://papermc.io")
58 (synopsis "High-performance Minecraft Server")
59 (description "High-performance Minecraft Server")
60 (license license:gpl3))))
61
62 papermc
+0
-38
rc/packages/pipewire-next.scm less more
0 (define-module (rc packages pipewire-next)
1 #:use-module (guix git-download)
2 #:use-module (guix utils)
3 #:use-module (guix packages)
4 #:use-module (gnu packages linux)
5 #:use-module (gnu packages pulseaudio)
6 #:export (pipewire-next))
7
8 (define pipewire-next
9 (package
10 (inherit pipewire-0.3)
11 (version "0.3.29")
12 (source (origin
13 (method git-fetch)
14 (uri (git-reference
15 (url (git-reference-url (origin-uri (package-source pipewire-0.3))))
16 (commit version)))
17 (file-name (git-file-name (package-name pipewire-0.3) version))
18 (sha256
19 (base32
20 "16jjxcnahxqfcawz77ywx837ybhwzcivn7hgqb9cmlp1y2syy8gk"))))
21 (arguments
22 (map (lambda (a)
23 (if (list? a)
24 (map (lambda (f)
25 (if (string? f)
26 (string-replace-substring f
27 "systemd=false"
28 "systemd=disabled")
29 f))
30 a)
31 a))
32 (package-arguments pipewire-0.3)))))
33
34 (define-public pulseaudio->pipewire
35 (package-input-rewriting
36 `((,pulseaudio . ,pipewire-next))
37 #:deep? #t))
0 (define-module (rc packages pipewire)
1 #:use-module (guix git-download)
2 #:use-module (guix utils)
3 #:use-module (guix packages)
4 #:use-module (gnu packages linux)
5 #:use-module (gnu packages pulseaudio)
6 #:export (pipewire-next))
7
8 (define pipewire-next
9 (package
10 (inherit pipewire-0.3)
11 (version "0.3.29")
12 (source (origin
13 (method git-fetch)
14 (uri (git-reference
15 (url (git-reference-url (origin-uri (package-source pipewire-0.3))))
16 (commit version)))
17 (file-name (git-file-name (package-name pipewire-0.3) version))
18 (sha256
19 (base32
20 "16jjxcnahxqfcawz77ywx837ybhwzcivn7hgqb9cmlp1y2syy8gk"))))
21 (arguments
22 (map (lambda (a)
23 (if (list? a)
24 (map (lambda (f)
25 (if (string? f)
26 (string-replace-substring f
27 "systemd=false"
28 "systemd=disabled")
29 f))
30 a)
31 a))
32 (package-arguments pipewire-0.3)))))
33
34 (define-public pulseaudio->pipewire
35 (package-input-rewriting
36 `((,pulseaudio . ,pipewire-next))
37 #:deep? #t))
4747 #:use-module (nongnu packages linux)
4848 #:use-module (rc packages biboumi)
4949 #:use-module (rc packages nix)
50 #:use-module (rc packages pipewire-next)
50 #:use-module (rc packages pipewire)
5151 #:use-module (rc packages xmpppy)
5252 #:export (os))
5353