diff options
author | Artyom V. Poptsov <poptsov.artyom@gmail.com> | 2023-06-18 10:07:32 +0300 |
---|---|---|
committer | Efraim Flashner <efraim@flashner.co.il> | 2023-09-07 18:59:58 +0300 |
commit | 7cd4103e81a924de6678760c101b77dd9d31c865 (patch) | |
tree | 74009a0d925448584e71c5d53d12e407490e473a /gnu/packages | |
parent | 81bbe95cd1864c58abde8896ed4eeb812e0c614d (diff) |
gnu: yggdrasil: Update to 0.4.7.
* gnu/packages/networking.scm (yggdrasil): Update to 0.4.7.
[arguments]: Use G-expressions. Set the package build name and version.
Use go-1.20.
[propagated-inputs]: Add go-golang-org-x-tools,
go-github-com-olekukonko-tablewriter and
go-github-com-mattn-go-colorable.
* gnu/packages/patches/yggdrasil-extra-config.patch: Don't use
deprecated "ioutil".
Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
Diffstat (limited to 'gnu/packages')
-rw-r--r-- | gnu/packages/networking.scm | 47 | ||||
-rw-r--r-- | gnu/packages/patches/yggdrasil-extra-config.patch | 2 |
2 files changed, 29 insertions, 20 deletions
diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm index 7259336b35..dd3c7485d0 100644 --- a/gnu/packages/networking.scm +++ b/gnu/packages/networking.scm @@ -4378,7 +4378,7 @@ network.") (define-public yggdrasil (package (name "yggdrasil") - (version "0.4.3") + (version "0.4.7") (source (origin (method git-fetch) @@ -4389,27 +4389,33 @@ network.") (recursive? #t))) (file-name (git-file-name name version)) (sha256 - (base32 "0jp6998a45xi8pbi8p84chvpm1mhhcvcxm1avi1c1gjjp4jqm3vl")) + (base32 "01mllfrsr55lnfivxwa57cfrjas6w4shsvx9k81pw8jixc124myk")) (patches (search-patches "yggdrasil-extra-config.patch")))) (build-system go-build-system) (arguments - '(#:import-path "github.com/yggdrasil-network/yggdrasil-go" - ;; TODO: figure out how tests are run - #:tests? #f - #:install-source? #f - #:phases - (modify-phases %standard-phases - (replace 'build - (lambda* (#:key import-path build-flags #:allow-other-keys) - (for-each - (lambda (directory) - ((assoc-ref %standard-phases 'build) - #:build-flags build-flags - #:import-path directory)) - (list "github.com/yggdrasil-network/yggdrasil-go/cmd/yggdrasil" - "github.com/yggdrasil-network/yggdrasil-go/cmd/yggdrasilctl" - "github.com/yggdrasil-network/yggdrasil-go/cmd/genkeys")) - #t))))) + (list #:import-path "github.com/yggdrasil-network/yggdrasil-go" + ;; TODO: figure out how tests are run + #:tests? #f + #:install-source? #f + #:go go-1.20 + #:phases + #~(modify-phases %standard-phases + (replace 'build + (lambda* (#:key import-path build-flags #:allow-other-keys) + (let* ((pkgsrc "github.com/yggdrasil-network/yggdrasil-go/src/version") + (ldflags (format #f + "-X ~a.buildName=yggdrasil -X ~a.buildVersion=~a" + pkgsrc + pkgsrc + #$version))) + (for-each + (lambda (directory) + ((assoc-ref %standard-phases 'build) + #:build-flags `("-ldflags" ,ldflags) + #:import-path directory)) + (list "github.com/yggdrasil-network/yggdrasil-go/cmd/yggdrasil" + "github.com/yggdrasil-network/yggdrasil-go/cmd/yggdrasilctl" + "github.com/yggdrasil-network/yggdrasil-go/cmd/genkeys")))))))) ;; https://github.com/kardianos/minwinsvc is windows only (propagated-inputs (list ;;("go-golang-zx2c4-com-wireguard-windows" @@ -4419,11 +4425,14 @@ network.") go-golang-org-x-sys go-golang-org-x-net go-golang-org-x-crypto + go-golang-org-x-tools go-netns go-netlink + go-github-com-olekukonko-tablewriter go-github-com-mitchellh-mapstructure go-github-com-mattn-go-runewidth go-github-com-mattn-go-isatty + go-github-com-mattn-go-colorable go-github-com-kardianos-minwinsvc go-github-com-hjson-hjson-go go-github-com-hashicorp-go-syslog diff --git a/gnu/packages/patches/yggdrasil-extra-config.patch b/gnu/packages/patches/yggdrasil-extra-config.patch index bd4bea7b9f..7934e2b50f 100644 --- a/gnu/packages/patches/yggdrasil-extra-config.patch +++ b/gnu/packages/patches/yggdrasil-extra-config.patch @@ -33,7 +33,7 @@ index 58b8230..b9df98a 100644 panic(err) } + if extraconffile != "" { -+ extraconf, err = ioutil.ReadFile(extraconffile); ++ extraconf, err = os.ReadFile(extraconffile); + } + if err != nil { + panic(err) |