all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#69876] [PATCH] gnu: greetd: Fix cross-compilation.
@ 2024-03-18 18:39 dan
  2024-04-02 18:16 ` bug#69876: " Efraim Flashner
  0 siblings, 1 reply; 2+ messages in thread
From: dan @ 2024-03-18 18:39 UTC (permalink / raw)
  To: 69876

* 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))
+                                  (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





^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#69876: [PATCH] gnu: greetd: Fix cross-compilation.
  2024-03-18 18:39 [bug#69876] [PATCH] gnu: greetd: Fix cross-compilation dan
@ 2024-04-02 18:16 ` Efraim Flashner
  0 siblings, 0 replies; 2+ messages in thread
From: Efraim Flashner @ 2024-04-02 18:16 UTC (permalink / raw)
  To: dan; +Cc: 69876-done

[-- Attachment #1: Type: text/plain, Size: 4509 bytes --]

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:
> * 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)

> +                                  (string-append
> +                                   "target/"
> +                                   (platform-rust-target
> +                                    (lookup-platform-by-target-or-system

This can be lookup-platform-by-target

> +                                     (or (%current-target-system)
> +                                         (%current-system))))

This should just be (%current-target-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
> 
> 
> 
> 

-- 
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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-04-02 18:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-18 18:39 [bug#69876] [PATCH] gnu: greetd: Fix cross-compilation dan
2024-04-02 18:16 ` bug#69876: " Efraim Flashner

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.