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