mirror of
https://codeberg.org/hako/Rosenthal.git
synced 2026-11-29 22:58:06 +00:00
Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
93f50036db | ||
|
|
ab3698c4ad | ||
|
|
91f2eac90a |
No files matched your search
@@ -148,8 +148,8 @@ some keybindings are slightly simplified.")
|
|||||||
(properties '((disable-updater? . #t)))))
|
(properties '((disable-updater? . #t)))))
|
||||||
|
|
||||||
(define-public emacs-majutsu/dolly
|
(define-public emacs-majutsu/dolly
|
||||||
(let ((commit "9c2fdb31b0b16eb211afc3e3e342fa125d3aa0a6")
|
(let ((commit "56b6e263cd4ecaf8e44e955647bffafe56f54f34")
|
||||||
(revision "4"))
|
(revision "5"))
|
||||||
(package
|
(package
|
||||||
(inherit emacs-majutsu)
|
(inherit emacs-majutsu)
|
||||||
(name "emacs-majutsu-dolly")
|
(name "emacs-majutsu-dolly")
|
||||||
@@ -162,7 +162,7 @@ some keybindings are slightly simplified.")
|
|||||||
(file-name (git-file-name name version))
|
(file-name (git-file-name name version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"0a8kdziz6lq6jqw4a4qbiq7alxll273j5piqf09jcw1irc5gg2xm"))))
|
"0ljq6psp8rar0sksfnjydji2sm3vvhpvpi4yay14wa6ldaclihx4"))))
|
||||||
(arguments
|
(arguments
|
||||||
(substitute-keyword-arguments arguments
|
(substitute-keyword-arguments arguments
|
||||||
((#:tests? _ #t) #f)))
|
((#:tests? _ #t) #f)))
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ bypass network restrictions." )
|
|||||||
(define-public sing-box
|
(define-public sing-box
|
||||||
(package
|
(package
|
||||||
(name "sing-box")
|
(name "sing-box")
|
||||||
(version "1.13.19")
|
(version "1.14.0")
|
||||||
(source (origin
|
(source (origin
|
||||||
(method git-fetch)
|
(method git-fetch)
|
||||||
(uri (git-reference
|
(uri (git-reference
|
||||||
@@ -128,12 +128,12 @@ bypass network restrictions." )
|
|||||||
(file-name (git-file-name name version))
|
(file-name (git-file-name name version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"0w5rciygbxgz3qzk4gjzig4ki8vw6saqlpahqjjnrhg2dryphyc1"))))
|
"1yavxj1raksii1sy5j1fp4v54glrbpz9la19l5cpzqw7rn05pzyn"))))
|
||||||
(build-system go-vendored-build-system)
|
(build-system go-vendored-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
(list
|
(list
|
||||||
#:go go-1.26
|
#:go go-1.26
|
||||||
#:vendor-hash (base32 "16k9ah43wa5i2c0fd5wsd7xcx1fvakbzgdyi8h1brwfcxc66mlcw")
|
#:vendor-hash (base32 "16h4lmpi636dnz760qyihnqxgv3hn4vb9p22j5wjhfx7955gfph6")
|
||||||
#:install-source? #f
|
#:install-source? #f
|
||||||
#:import-path "./cmd/sing-box"
|
#:import-path "./cmd/sing-box"
|
||||||
#:build-flags
|
#:build-flags
|
||||||
|
|||||||
@@ -7,7 +7,9 @@
|
|||||||
#:use-module (srfi srfi-1)
|
#:use-module (srfi srfi-1)
|
||||||
#:use-module (srfi srfi-26)
|
#:use-module (srfi srfi-26)
|
||||||
;; Utilities
|
;; Utilities
|
||||||
|
#:use-module (guix diagnostics)
|
||||||
#:use-module (guix gexp)
|
#:use-module (guix gexp)
|
||||||
|
#:use-module (guix i18n)
|
||||||
#:use-module (guix records)
|
#:use-module (guix records)
|
||||||
#:use-module (rosenthal utils predicates)
|
#:use-module (rosenthal utils predicates)
|
||||||
;; Guix System
|
;; Guix System
|
||||||
@@ -91,12 +93,18 @@
|
|||||||
;;; sing-box
|
;;; sing-box
|
||||||
;;;
|
;;;
|
||||||
|
|
||||||
|
(define-maybe file-object)
|
||||||
|
(define-maybe string)
|
||||||
|
|
||||||
(define-configuration/no-serialization sing-box-configuration
|
(define-configuration/no-serialization sing-box-configuration
|
||||||
(sing-box
|
(sing-box
|
||||||
(file-like sing-box)
|
(file-like sing-box)
|
||||||
"")
|
"")
|
||||||
(config-file
|
(config-file
|
||||||
file-object
|
maybe-file-object
|
||||||
|
"")
|
||||||
|
(config-directory
|
||||||
|
maybe-string
|
||||||
"")
|
"")
|
||||||
(data-directory
|
(data-directory
|
||||||
(string "/var/lib/sing-box")
|
(string "/var/lib/sing-box")
|
||||||
@@ -136,21 +144,33 @@
|
|||||||
|
|
||||||
(define sing-box-shepherd-service
|
(define sing-box-shepherd-service
|
||||||
(match-record-lambda <sing-box-configuration>
|
(match-record-lambda <sing-box-configuration>
|
||||||
(sing-box data-directory config-file
|
(sing-box data-directory config-file config-directory
|
||||||
shepherd-provision shepherd-requirement log-file auto-start?)
|
shepherd-provision shepherd-requirement log-file auto-start?)
|
||||||
(list (shepherd-service
|
(let ((config-file-set? (maybe-value-set? config-file))
|
||||||
(provision shepherd-provision)
|
(config-dir-set? (maybe-value-set? config-directory)))
|
||||||
(requirement `(user-processes ,@shepherd-requirement))
|
(when (eqv? config-file-set? config-dir-set?)
|
||||||
(start
|
(leave (G_ "'~a': exactly one of '~a' or '~a' must be set~%")
|
||||||
#~(make-forkexec-constructor
|
"sing-box-configuration"
|
||||||
(list #$(file-append sing-box "/bin/sing-box")
|
"config-file"
|
||||||
"--config" #$config-file
|
"config-directory"))
|
||||||
"--directory" #$data-directory
|
(list (shepherd-service
|
||||||
"--disable-color"
|
(provision shepherd-provision)
|
||||||
"run")
|
(requirement `(user-processes ,@shepherd-requirement))
|
||||||
#:log-file #$log-file))
|
(start
|
||||||
(stop #~(make-kill-destructor))
|
#~(make-forkexec-constructor
|
||||||
(auto-start? auto-start?)))))
|
(list #$(file-append sing-box "/bin/sing-box")
|
||||||
|
#$@(if config-file-set?
|
||||||
|
(list "--config" config-file)
|
||||||
|
'())
|
||||||
|
#$@(if config-dir-set?
|
||||||
|
(list "--config-directory" config-directory)
|
||||||
|
'())
|
||||||
|
"--directory" #$data-directory
|
||||||
|
"--disable-color"
|
||||||
|
"run")
|
||||||
|
#:log-file #$log-file))
|
||||||
|
(stop #~(make-kill-destructor))
|
||||||
|
(auto-start? auto-start?))))))
|
||||||
|
|
||||||
(define sing-box-service-type
|
(define sing-box-service-type
|
||||||
(service-type
|
(service-type
|
||||||
|
|||||||
Reference in new issue
Block a user