[PATCH] gnu: greetd: Fix cross-compilation.

  • Done
  • quality assurance status badge
Details
2 participants
  • Efraim Flashner
  • dan
Owner
unassigned
Submitted by
dan
Severity
normal

Debbugs page

D
(address . guix-patches@gnu.org)
aee5d201e4102ed7927e76b8eb5a19fbec4ec93a.1710787147.git.i@dan.games
* gnu/packages/admin.scm (greetd): Fix cross-compilation.
[inputs][native-inputs]: Move linux-pam from native-inputs to inputs.
[arguments]<#:phases>: Set release directory based on target.

Change-Id: I822f8f215677bc951b21e46dddf44954a43df58f
---
gnu/packages/admin.scm | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)

Toggle diff (54 lines)
diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 2b94b1e17a..a4cd17ea33 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -64,6 +64,7 @@
;;; Copyright © 2023 Jaeme Sifat <jaeme@runbox.com>
;;; Copyright © 2023 Nicolas Graves <ngraves@ngraves.fr>
;;; Copyright © 2023 Tomás Ortín Fernández <tomasortin@mailbox.org>
+;;; Copyright © 2024 dan <i@dan.games>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -99,6 +100,7 @@ (define-module (gnu packages admin)
#:use-module (guix gexp)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
+ #:use-module (guix platform)
#:use-module (guix utils)
#:use-module (gnu packages)
#:use-module (gnu packages acl)
@@ -5462,7 +5464,16 @@ (define-public greetd
(man1 (string-append man "/man1"))
(man5 (string-append man "/man5"))
(man7 (string-append man "/man7"))
- (release "target/release")
+ (release ,(if (or (%current-target-system)
+ (%current-system))
+ (string-append
+ "target/"
+ (platform-rust-target
+ (lookup-platform-by-target-or-system
+ (or (%current-target-system)
+ (%current-system))))
+ "/release")
+ "target/release"))
(greetd-bin (string-append release "/greetd"))
(agreety-bin (string-append release "/agreety")))
(install-file greetd-bin sbin)
@@ -5472,8 +5483,10 @@ (define-public greetd
(install-file "greetd.5" man5)
(install-file "greetd-ipc.7" man7)
(install-file "agreety.1" man1))))))))
+ (inputs
+ (list linux-pam))
(native-inputs
- (list linux-pam scdoc))
+ (list scdoc))
(synopsis "Minimal and flexible login manager daemon")
(description
"greetd is a minimal and flexible login manager daemon

base-commit: c8556379c3f2d3d095a178858915720f2eebc012
--
2.41.0
E
E
Efraim Flashner wrote on 2 Apr 11:16 -0700
(name . dan)(address . i@dan.games)(address . 69876-done@debbugs.gnu.org)
ZgxLhiLu1QCP36zN@3900XT
I had to make a small tweak to make it just for %current-target-system,
but otherwise pushed the patch. Thanks!

starting phase `install'
error: in phase 'install': uncaught exception:
system-error "copy-file" "~A" ("No such file or directory") (2)
phase `install' failed after 0.0 seconds
Backtrace:
9 (primitive-load "/gnu/store/y7qa7srz6bmiad70wryfn2w6m4r…")
In guix/build/gnu-build-system.scm:
908:2 8 (gnu-build #:source _ #:outputs _ #:inputs _ #:phases . #)
In ice-9/boot-9.scm:
1752:10 7 (with-exception-handler _ _ #:unwind? _ # _)
In srfi/srfi-1.scm:
634:9 6 (for-each #<procedure 7ffff69781a0 at guix/build/gnu-b…> …)
In ice-9/boot-9.scm:
1752:10 5 (with-exception-handler _ _ #:unwind? _ # _)
In guix/build/gnu-build-system.scm:
929:23 4 (_)
In ice-9/eval.scm:
619:8 3 (_ #(#(#(#(#(#(#(#(#(#(#(…) …) …) …) …) …) …) …) …) …) …))
In unknown file:
2 (copy-file "target/x86_64-unknown-linux-gnu/release/gr…" …)
In ice-9/boot-9.scm:
1685:16 1 (raise-exception _ #:continuable? _)
1685:16 0 (raise-exception _ #:continuable? _)

ice-9/boot-9.scm:1685:16: In procedure raise-exception:
In procedure copy-file: No such file or directory


On Tue, Mar 19, 2024 at 02:39:07AM +0800, dan wrote:
Toggle quote (37 lines)
> * gnu/packages/admin.scm (greetd): Fix cross-compilation.
> [inputs][native-inputs]: Move linux-pam from native-inputs to inputs.
> [arguments]<#:phases>: Set release directory based on target.
>
> Change-Id: I822f8f215677bc951b21e46dddf44954a43df58f
> ---
> gnu/packages/admin.scm | 17 +++++++++++++++--
> 1 file changed, 15 insertions(+), 2 deletions(-)
>
> diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
> index 2b94b1e17a..a4cd17ea33 100644
> --- a/gnu/packages/admin.scm
> +++ b/gnu/packages/admin.scm
> @@ -64,6 +64,7 @@
> ;;; Copyright © 2023 Jaeme Sifat <jaeme@runbox.com>
> ;;; Copyright © 2023 Nicolas Graves <ngraves@ngraves.fr>
> ;;; Copyright © 2023 Tomás Ortín Fernández <tomasortin@mailbox.org>
> +;;; Copyright © 2024 dan <i@dan.games>
> ;;;
> ;;; This file is part of GNU Guix.
> ;;;
> @@ -99,6 +100,7 @@ (define-module (gnu packages admin)
> #:use-module (guix gexp)
> #:use-module ((guix licenses) #:prefix license:)
> #:use-module (guix packages)
> + #:use-module (guix platform)
> #:use-module (guix utils)
> #:use-module (gnu packages)
> #:use-module (gnu packages acl)
> @@ -5462,7 +5464,16 @@ (define-public greetd
> (man1 (string-append man "/man1"))
> (man5 (string-append man "/man5"))
> (man7 (string-append man "/man7"))
> - (release "target/release")
> + (release ,(if (or (%current-target-system)
> + (%current-system))

This should just be (%current-target-system)

Toggle quote (5 lines)
> + (string-append
> + "target/"
> + (platform-rust-target
> + (lookup-platform-by-target-or-system

This can be lookup-platform-by-target

Toggle quote (3 lines)
> + (or (%current-target-system)
> + (%current-system))))

This should just be (%current-target-system)

Toggle quote (26 lines)
> + "/release")
> + "target/release"))
> (greetd-bin (string-append release "/greetd"))
> (agreety-bin (string-append release "/agreety")))
> (install-file greetd-bin sbin)
> @@ -5472,8 +5483,10 @@ (define-public greetd
> (install-file "greetd.5" man5)
> (install-file "greetd-ipc.7" man7)
> (install-file "agreety.1" man1))))))))
> + (inputs
> + (list linux-pam))
> (native-inputs
> - (list linux-pam scdoc))
> + (list scdoc))
> (synopsis "Minimal and flexible login manager daemon")
> (description
> "greetd is a minimal and flexible login manager daemon
>
> base-commit: c8556379c3f2d3d095a178858915720f2eebc012
> --
> 2.41.0
>
>
>
>

--
Efraim Flashner <efraim@flashner.co.il> רנשלפ םירפא
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmYMS4UACgkQQarn3Mo9
g1FpGw//YpEvWv35YQjNTQFBiJIFz3boglbnBt5rzuk6AoEWTJquGB9xQQi1o+fc
j7ClbMu8w9TZltfT/4LJiTsFrpfeyS08dYUosofdVFLsG6EKAxmoY1zX/6qhJU+d
Ams0c0EBZ+sUAkC1nsFBxNoL1/ZWyD5XiC7SLG93h/+//nz/AGJ+UGycvQsWMz6X
zRS+FqKCkwvEWPsy9wrwvQai653YT5ORu874rwTYSd10U5WDe6vS1WnIikAgMrer
0RRBWsjBhoNscoTYIo2wrGO7AmB12ceO5teqo6Uf7K85JyDNmhm8BByEKn2m211k
SBuq83IzVPDIamUsN1PEOGTlLJBXJs/230uLGUL5Jc3VlCcMX/wWH3H5Sd85NKL6
4ddgk2WM3bnCfTYpza8IM3cYEv/VlP4lrp6/uySsUu1DHLaf9bcSK/K8g3SvPLyr
Qvz/tAFXhAhLlhbaJUX4GyJGRs8o7TuQqUkuZ8D9UxdlpvUHSD9Rx/IwbmiiAtMX
CBAMhN+EGfmxkqlsXaS5VgFqZbAC4Y5d8r1TGI68PJOtgJ2YEXF3QOMBTr87BwI/
uhqtsJtzG0vbqcP6z3tmsArFJSQhb3UlOqVKIfT1arj1KUKCV/VhF7SKEbDUZHKN
tEmRzh4n8P4+YPnQf57LIIF9T+AZ9n3AukTVuQy7OIuC6NerJ5k=
=N+p3
-----END PGP SIGNATURE-----


Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 69876@patchwise.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 69876
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch