all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ahmad Draidi via Guix-patches via <guix-patches@gnu.org>
To: 64387@debbugs.gnu.org
Cc: Ahmad Draidi <a.r.draidi@redscript.org>,
	paren@disroot.org, guix@cbaines.net, ludo@gnu.org,
	othacehe@gnu.org, rg@raghavgururajan.name, rekado@elephly.net,
	zimon.toutoune@gmail.com, me@tobias.gr, jgart@dismail.de
Subject: [bug#64387] [PATCH v2 3/6] gnu: arcan: Fix paths handling.
Date: Thu, 10 Aug 2023 22:16:35 +0400	[thread overview]
Message-ID: <ae43b41bceaa57b5e613635329210f3ee08e2fcf.1691691398.git.a.r.draidi@redscript.org> (raw)
In-Reply-To: <cover.1691691397.git.a.r.draidi@redscript.org>

This patch removes the wrapper and the propagated environment variables
(through 'native-search-paths') and instead patches the paths inside the
source code. This fixes path handling, which seems to be broken now. It
also allows us to use 'setuid', which is required for some features, and
lets the app use its internal path handling criteria, which some dependent
apps expect.

* gnu/packages/arcan.scm (arcan): Fix paths handling.
[arguments]: Add 'patch-paths' phase. Remove 'wrap-program' phase.
[native-search-paths]: Remove.
---
 gnu/packages/arcan.scm | 27 +++++----------------------
 1 file changed, 5 insertions(+), 22 deletions(-)

diff --git a/gnu/packages/arcan.scm b/gnu/packages/arcan.scm
index cfd72f6e55..159c6d2190 100644
--- a/gnu/packages/arcan.scm
+++ b/gnu/packages/arcan.scm
@@ -79,6 +79,11 @@ (define-public arcan
                              "-DDISTR_TAG='Guix'")
          #:phases
          (modify-phases %standard-phases
+           (add-after 'unpack 'patch-paths
+             (lambda* (#:key outputs #:allow-other-keys)
+               (substitute* "src/platform/posix/paths.c"
+                 (("/usr/local")
+                  (assoc-ref outputs "out")))))
            ;; Normally, it tries to fetch patched openal with git
            ;; but copying files manually in the right place seems to work too.
            (add-after 'unpack 'prepare-static-openal
@@ -94,30 +99,8 @@ (define-public arcan
            (add-before 'configure 'chdir
              (lambda _
                (chdir "src")
-               #t))
-           (add-after 'install 'wrap-program
-             (lambda* (#:key outputs #:allow-other-keys)
-               (let ((out (assoc-ref outputs "out")))
-                 (wrap-program (string-append out "/bin/arcan")
-                   `("ARCAN_RESOURCEPATH" ":" suffix
-                     (,(string-append out "/share/arcan/resources")))
-                   `("ARCAN_STATEBASEPATH" ":" =
-                     ("$HOME/.arcan/resources/savestates"))
-                   `("ARCAN_STATEPATH" ":" =
-                     ("$HOME/.arcan/resources/savestates"))
-                   `("ARCAN_BINPATH" ":" =
-                     (,(string-append out "/bin/arcan_frameserver")))))
                #t)))
          #:tests? #f))
-      (native-search-paths
-       (list (search-path-specification
-              (variable "ARCAN_APPLBASEPATH")
-              (separator #f)
-              (files '("share/arcan/appl")))
-             (search-path-specification
-              (variable "ARCAN_SCRIPTPATH")
-              (separator #f)
-              (files '("share/arcan/scripts")))))
       (inputs
        `(("bash-minimal" ,bash-minimal)
          ("espeak" ,espeak)
-- 
2.41.0





  parent reply	other threads:[~2023-08-10 18:26 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-30 22:01 [bug#64387] [PATCH 0/6] Update and rework arcan Ahmad Draidi via Guix-patches via
2023-06-30 22:07 ` [bug#64387] [PATCH 1/6] gnu: arcan: Update to 0.6.2.1 Ahmad Draidi via Guix-patches via
2023-06-30 22:07 ` [bug#64387] [PATCH 2/6] gnu: arcan: Build all features Ahmad Draidi via Guix-patches via
2023-06-30 22:07 ` [bug#64387] [PATCH 3/6] gnu: arcan: Fix paths handling Ahmad Draidi via Guix-patches via
2023-06-30 22:07 ` [bug#64387] [PATCH 4/6] gnu: arcan: Use new style arguments Ahmad Draidi via Guix-patches via
2023-06-30 22:07 ` [bug#64387] [PATCH 5/6] gnu: arcan: Restyle format Ahmad Draidi via Guix-patches via
2023-06-30 22:07 ` [bug#64387] [PATCH 6/6] gnu: Remove arcan-wayland Ahmad Draidi via Guix-patches via
2023-08-10 18:16 ` [bug#64387] [PATCH v2 0/6] Update and rework arcan Ahmad Draidi via Guix-patches via
2023-08-10 18:16   ` [bug#64387] [PATCH v2 1/6] gnu: arcan: Update to 0.6.2.1 Ahmad Draidi via Guix-patches via
2023-08-10 18:16   ` [bug#64387] [PATCH v2 2/6] gnu: arcan: Build all features Ahmad Draidi via Guix-patches via
2023-08-10 18:16   ` Ahmad Draidi via Guix-patches via [this message]
2023-08-10 18:16   ` [bug#64387] [PATCH v2 4/6] gnu: arcan: Use new style arguments Ahmad Draidi via Guix-patches via
2023-08-10 18:16   ` [bug#64387] [PATCH v2 5/6] gnu: arcan: Restyle format Ahmad Draidi via Guix-patches via
2023-08-10 18:16   ` [bug#64387] [PATCH v2 6/6] gnu: arcan-wayland: Deprecate in favor of "arcan" Ahmad Draidi via Guix-patches via
2023-09-06  0:40     ` bug#64387: [PATCH 0/6] Update and rework arcan Maxim Cournoyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ae43b41bceaa57b5e613635329210f3ee08e2fcf.1691691398.git.a.r.draidi@redscript.org \
    --to=guix-patches@gnu.org \
    --cc=64387@debbugs.gnu.org \
    --cc=a.r.draidi@redscript.org \
    --cc=guix@cbaines.net \
    --cc=jgart@dismail.de \
    --cc=ludo@gnu.org \
    --cc=me@tobias.gr \
    --cc=othacehe@gnu.org \
    --cc=paren@disroot.org \
    --cc=rekado@elephly.net \
    --cc=rg@raghavgururajan.name \
    --cc=zimon.toutoune@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.