mirror of
https://codeberg.org/hako/Rosenthal.git
synced 2026-11-29 22:58:06 +00:00
rosenthal: Add mihomo.
* modules/rosenthal/packages/networking.scm (mihomo): New variable. * modules/rosenthal/packages/binaries.scm (mihomo-bin): Deprecated by it. (clash-bin): Delete variable.
This commit is contained in:
2 files changed
+71
-59
No files matched your search
@@ -66,6 +66,76 @@ this daemon, without requiring you to poke holes on your firewall --- your
|
||||
origin can remain as closed as possible.")
|
||||
(license license:asl2.0)))
|
||||
|
||||
(define-public mihomo
|
||||
(package
|
||||
(name "mihomo")
|
||||
(version "1.19.8")
|
||||
(source (origin
|
||||
(method git-fetch)
|
||||
(uri (git-reference
|
||||
(url "https://github.com/MetaCubeX/mihomo")
|
||||
(commit (string-append "v" version))))
|
||||
(file-name (git-file-name name version))
|
||||
(sha256
|
||||
(base32
|
||||
"0wnzaji5yzj8hvjifgnmhg371mm94bc89bb2m1dmsqsp30m3dj0b"))))
|
||||
(build-system go-build-system)
|
||||
(arguments
|
||||
(list
|
||||
#:tests? (not (%current-target-system)) ;TODO: Run test suite.
|
||||
#:go go-1.23
|
||||
#:install-source? #f
|
||||
#:import-path "."
|
||||
#:build-flags
|
||||
#~(list "-tags" "with_gvisor"
|
||||
(string-append
|
||||
"-ldflags="
|
||||
" -X github.com/metacubex/mihomo/constant.Version="
|
||||
#$(package-version this-package)))
|
||||
#:modules
|
||||
'((ice-9 match)
|
||||
((guix build gnu-build-system) #:prefix gnu:)
|
||||
(guix build go-build-system)
|
||||
(guix build utils))
|
||||
#:phases
|
||||
#~(modify-phases %standard-phases
|
||||
(replace 'unpack
|
||||
(lambda args
|
||||
(unsetenv "GO111MODULE")
|
||||
(apply (assoc-ref gnu:%standard-phases 'unpack) args)
|
||||
(copy-recursively
|
||||
#+(this-package-native-input "vendored-go-dependencies")
|
||||
"vendor")))
|
||||
(replace 'install-license-files
|
||||
(assoc-ref gnu:%standard-phases 'install-license-files))
|
||||
(delete 'check)
|
||||
(add-after 'install 'check
|
||||
(lambda* (#:key tests? #:allow-other-keys)
|
||||
(when tests?
|
||||
(let ((mihomo (in-vicinity #$output "bin/mihomo")))
|
||||
(invoke mihomo "--help")
|
||||
(invoke mihomo "-v"))))))))
|
||||
(native-inputs
|
||||
(append
|
||||
(list (origin
|
||||
(method (go-mod-vendor #:go go-1.23))
|
||||
(uri (package-source this-package))
|
||||
(file-name "vendored-go-dependencies")
|
||||
(sha256
|
||||
(base32
|
||||
"1275yq3n7dg7hbw7vj5i1dqi83qgin77iavqxbc2gw8dawbd9plg"))))
|
||||
(if (%current-target-system)
|
||||
(list this-package)
|
||||
'())))
|
||||
(home-page "https://wiki.metacubex.one/")
|
||||
(synopsis "Rule-based proxy")
|
||||
(description
|
||||
"Mihomo is an anti-censorship proxy application, originally known as
|
||||
\"Clash Meta\", designed to facilitate secure and flexible internet access.
|
||||
It supports various protocols, making it a versatile tool for users seeking to
|
||||
bypass network restrictions." )
|
||||
(license license:gpl3+)))
|
||||
|
||||
(define-public socks2http
|
||||
(package
|
||||
(name "socks2http")
|
||||
|
||||
Reference in new issue
Block a user