rosenthal: alloy-bin: Use ‘binary-package’.

This commit is contained in:
Hilton Chain 2026-02-13 15:23:42 +08:00
parent 2db419232a
commit 9f069f714d
No known key found for this signature in database
GPG Key ID: ACC66D09CA528292

View File

@ -11,6 +11,7 @@
#:use-module (guix gexp)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix platform)
#:use-module (guix utils)
#:use-module (rosenthal utils packages)
;; Guix origin methods
@ -483,24 +484,20 @@ rather a set of labels for each log stream.")
"1pxnjzygm2mylipf6cjkqxm4k3i9vnm7v80avxbhv8400p3aszqk"))))))
(define-public alloy-bin
(binary-package
`(("x86_64-linux" . ,%alloy-source-x86_64-linux)
("aarch64-linux" . ,%alloy-source-aarch64-linux))
(package
(name "alloy-bin")
(version (package-version %alloy-source-x86_64-linux))
(version "")
(source #f)
(build-system copy-build-system)
(arguments
(let ((binary-source
(match (or (%current-target-system)
(%current-system))
((? target-aarch64?)
(package-source %alloy-source-aarch64-linux))
(_
(package-source %alloy-source-x86_64-linux)))))
(list
#:install-plan
(match (or (%current-target-system)
(match (or (and=> (%current-target-system) platform-target->system)
(%current-system))
((? target-aarch64?)
("aarch64-linux"
#~'(("alloy-linux-arm64" "bin/alloy")))
(_
#~'(("alloy-linux-amd64" "bin/alloy"))))
@ -510,10 +507,6 @@ rather a set of labels for each log stream.")
(guix build utils))
#:phases
#~(modify-phases %standard-phases
(replace 'unpack
(lambda _
((assoc-ref %standard-phases 'unpack)
#:source #+binary-source)))
(add-after 'install 'patch-elf
(lambda _
(let ((name "alloy")
@ -538,7 +531,7 @@ rather a set of labels for each log stream.")
(invoke alloy "completion" shell)))))
'(("bash" . "share/bash-completion/completions/alloy")
("fish" . "share/fish/vendor_completions.d/alloy.fish")
("zsh" . "share/zsh/site-functions/_alloy"))))))))))
("zsh" . "share/zsh/site-functions/_alloy")))))))))
(native-inputs
(append (if (%current-target-system)
(list this-package)
@ -552,7 +545,6 @@ rather a set of labels for each log stream.")
"Grafana Alloy is an open source OpenTelemetry Collector distribution with
built-in Prometheus pipelines and support for metrics, logs, traces, and
profiles.")
(license license:agpl3)
(properties '((disable-updater? . #t)))))
(license license:agpl3))))
(define-deprecated-package alloy-bin-aarch64-linux alloy-bin)