mirror of
https://codeberg.org/hako/Rosenthal.git
synced 2026-03-12 21:04:22 +00:00
rosenthal: alloy-bin: Switch to gnu-build-system for proper cross build support.
This commit is contained in:
parent
9f069f714d
commit
a42b6b4d24
@ -17,6 +17,7 @@
|
|||||||
;; Guix origin methods
|
;; Guix origin methods
|
||||||
#:use-module (guix download)
|
#:use-module (guix download)
|
||||||
;; Guix build systems
|
;; Guix build systems
|
||||||
|
#:use-module (guix build-system gnu)
|
||||||
#:use-module (guix build-system copy)
|
#:use-module (guix build-system copy)
|
||||||
;; Guix packages
|
;; Guix packages
|
||||||
#:use-module (gnu packages base)
|
#:use-module (gnu packages base)
|
||||||
@ -491,37 +492,47 @@ rather a set of labels for each log stream.")
|
|||||||
(name "alloy-bin")
|
(name "alloy-bin")
|
||||||
(version "")
|
(version "")
|
||||||
(source #f)
|
(source #f)
|
||||||
(build-system copy-build-system)
|
(build-system gnu-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
(list
|
(list
|
||||||
#:install-plan
|
|
||||||
(match (or (and=> (%current-target-system) platform-target->system)
|
|
||||||
(%current-system))
|
|
||||||
("aarch64-linux"
|
|
||||||
#~'(("alloy-linux-arm64" "bin/alloy")))
|
|
||||||
(_
|
|
||||||
#~'(("alloy-linux-amd64" "bin/alloy"))))
|
|
||||||
#:modules
|
#:modules
|
||||||
'((ice-9 match)
|
`((ice-9 match)
|
||||||
(guix build copy-build-system)
|
,@%default-gnu-modules)
|
||||||
(guix build utils))
|
|
||||||
#:phases
|
#:phases
|
||||||
#~(modify-phases %standard-phases
|
#~(modify-phases %standard-phases
|
||||||
(add-after 'install 'patch-elf
|
(delete 'bootstrap)
|
||||||
|
(delete 'configure)
|
||||||
|
(delete 'build)
|
||||||
|
(delete 'check)
|
||||||
|
(replace 'install
|
||||||
(lambda _
|
(lambda _
|
||||||
(let ((name "alloy")
|
(let ((src
|
||||||
|
(match #$(or (and=> (%current-target-system)
|
||||||
|
platform-target->system)
|
||||||
|
(%current-system))
|
||||||
|
("aarch64-linux"
|
||||||
|
"alloy-linux-arm64")
|
||||||
|
(_
|
||||||
|
"alloy-linux-amd64")))
|
||||||
|
(dst (in-vicinity #$output "bin/alloy")))
|
||||||
|
(mkdir-p (dirname dst))
|
||||||
|
(copy-file src dst))))
|
||||||
|
(add-after 'install 'patch-elf
|
||||||
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
|
(let ((ld.so (search-input-file inputs #$(glibc-dynamic-linker)))
|
||||||
(dest (in-vicinity #$output "bin"))
|
(dest (in-vicinity #$output "bin"))
|
||||||
(ld.so #$(file-append glibc (glibc-dynamic-linker))))
|
(name "alloy"))
|
||||||
(with-directory-excursion dest
|
(with-directory-excursion dest
|
||||||
(invoke "patchelf" "--set-interpreter" ld.so name)
|
(invoke "patchelf" "--set-interpreter" ld.so name)
|
||||||
(chmod name #o555)))))
|
(chmod name #o555)))))
|
||||||
(add-after 'patch-elf 'install-extras
|
(add-after 'patch-elf 'install-extras
|
||||||
(lambda* (#:key native-inputs inputs #:allow-other-keys)
|
(lambda* (#:key native-inputs inputs outputs #:allow-other-keys)
|
||||||
(let ((alloy
|
(let ((alloy
|
||||||
|
(search-input-file
|
||||||
(if #$(%current-target-system)
|
(if #$(%current-target-system)
|
||||||
(search-input-file (or native-inputs inputs)
|
native-inputs
|
||||||
"bin/alloy")
|
outputs)
|
||||||
(in-vicinity #$output "bin/alloy"))))
|
"bin/alloy")))
|
||||||
(for-each
|
(for-each
|
||||||
(match-lambda
|
(match-lambda
|
||||||
((shell . file)
|
((shell . file)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user