GNU bug report logs - #64348
[PATCH] gnu: Add durden.

Previous Next

Package: guix-patches;

Reported by: Ahmad Draidi <a.r.draidi <at> redscript.org>

Date: Thu, 29 Jun 2023 10:23:02 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 64348 in the body.
You can then email your comments to 64348 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#64348; Package guix-patches. (Thu, 29 Jun 2023 10:23:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ahmad Draidi <a.r.draidi <at> redscript.org>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Thu, 29 Jun 2023 10:23:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ahmad Draidi <a.r.draidi <at> redscript.org>
To: guix-patches <at> gnu.org
Cc: Ahmad Draidi <a.r.draidi <at> redscript.org>
Subject: [PATCH] gnu: Add durden.
Date: Thu, 29 Jun 2023 14:21:44 +0400
* gnu/packages/arcan.scm (durden): New variable.
---
 gnu/packages/arcan.scm | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/gnu/packages/arcan.scm b/gnu/packages/arcan.scm
index 7483777ff0..cf85fc95ef 100644
--- a/gnu/packages/arcan.scm
+++ b/gnu/packages/arcan.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2019 L  p R n  d n <guix <at> lprndn.info>
 ;;; Copyright © 2021 Guillaume Le Vaillant <glv <at> posteo.net>
+;;; Copyright © 2023 Ahmad Draidi <a.r.draidi <at> redscript.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -19,7 +20,9 @@
 
 (define-module (gnu packages arcan)
   #:use-module (guix build-system cmake)
+  #:use-module (guix build-system copy)
   #:use-module (guix build-system gnu)
+  #:use-module (guix gexp)
   #:use-module (guix git-download)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
@@ -272,3 +275,37 @@ (define-public arcan-wayland
 with an Arcan connection point.  It allows Wayland compatible clients
 to connect and render using Arcan.")
     (license license:bsd-3)))
+
+(define-public durden
+  (package
+    (name "durden")
+    (version "0.6.1")
+    (source (origin
+              (method git-fetch)
+              (file-name (git-file-name name version))
+              (uri (git-reference
+                    (url "https://github.com/letoram/durden")
+                    (commit version)))
+              (sha256
+               (base32
+                "03ry8ypsvpjydb9s4c28y3iffz9375pfgwq9q9y68hmj4d89bjvz"))))
+    (build-system copy-build-system)
+    (arguments
+     (list #:install-plan #~'(("durden/" "share/arcan/appl/durden/")
+                              ("distr/durden" "bin/durden"))
+           #:phases #~(modify-phases %standard-phases
+                        (add-after 'unpack 'patch-paths
+                          (lambda* (#:key outputs #:allow-other-keys)
+                            (substitute* "distr/durden"
+                              (("/usr/share/\\$applname")
+                               (string-append (assoc-ref outputs "out")
+                                              "/share/arcan/appl"))))))))
+    (home-page "https://durden.arcan-fe.com/")
+    (synopsis "Desktop Environment for Arcan")
+    (description
+     "Durden is a desktop environment for the Arcan Display Server.
+It serves both as a reference showcase on how to take advantage of some of the
+features in Arcan, and as an entry to the advanced-user side of the desktop
+environment spectrum.")
+    (license (list license:bsd-3 license:expat license:cc-by3.0
+                   license:cc-by4.0 license:asl2.0))))

base-commit: ac86174e22fcd762893bd4515786b1376af9397b
-- 
2.40.1





Information forwarded to guix-patches <at> gnu.org:
bug#64348; Package guix-patches. (Sat, 09 Dec 2023 17:05:01 GMT) Full text and rfc822 format available.

Message #8 received at 64348 <at> debbugs.gnu.org (full text, mbox):

From: Ahmad Draidi <a.r.draidi <at> redscript.org>
To: 64348 <at> debbugs.gnu.org
Cc: Ahmad Draidi <a.r.draidi <at> redscript.org>
Subject: [PATCH v2] gnu: Add durden.
Date: Sat,  9 Dec 2023 21:01:36 +0400
* gnu/packages/arcan.scm (durden): New variable.

Change-Id: I489409e161d20d1170923664aee01c4229f7a6f5
---
v2 changes: Rebase to fix conflicts

 gnu/packages/arcan.scm | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/gnu/packages/arcan.scm b/gnu/packages/arcan.scm
index 4ca76edbec..3f8fc7c219 100644
--- a/gnu/packages/arcan.scm
+++ b/gnu/packages/arcan.scm
@@ -20,6 +20,7 @@
 
 (define-module (gnu packages arcan)
   #:use-module (guix build-system cmake)
+  #:use-module (guix build-system copy)
   #:use-module (guix build-system meson)
   #:use-module (guix build-system gnu)
   #:use-module (guix gexp)
@@ -183,6 +184,41 @@ (define-public arcan-sdl
               "-DSTATIC_FREETYPE=off" "-DSHMIF_TUI_ACCEL=on")))))
     (synopsis "Combined display server, multimedia framework and game engine (SDL)")))
 
+(define-public durden
+  (package
+    (name "durden")
+    (version "0.6.1")
+    (source
+     (origin
+       (method git-fetch)
+       (file-name (git-file-name name version))
+       (uri (git-reference
+             (url "https://github.com/letoram/durden")
+             (commit version)))
+       (sha256
+        (base32 "03ry8ypsvpjydb9s4c28y3iffz9375pfgwq9q9y68hmj4d89bjvz"))))
+    (build-system copy-build-system)
+    (arguments
+     (list
+      #:install-plan #~'(("durden/" "share/arcan/appl/durden/")
+                         ("distr/durden" "bin/durden"))
+      #:phases #~(modify-phases %standard-phases
+                   (add-after 'unpack 'patch-paths
+                     (lambda* (#:key outputs #:allow-other-keys)
+                       (substitute* "distr/durden"
+                         (("/usr/share/\\$applname")
+                          (string-append (assoc-ref outputs "out")
+                                         "/share/arcan/appl"))))))))
+    (home-page "https://durden.arcan-fe.com/")
+    (synopsis "Desktop Environment for Arcan")
+    (description
+     "Durden is a desktop environment for the Arcan Display Server.
+It serves both as a reference showcase on how to take advantage of some of the
+features in Arcan, and as an entry to the advanced-user side of the desktop
+environment spectrum.")
+    (license (list license:bsd-3 license:expat license:cc-by3.0
+                   license:cc-by4.0 license:asl2.0))))
+
 (define-public xarcan
   (package
     (name "xarcan")

base-commit: 61f2d84e75c340c2ba528d392f522c51b8843f34
-- 
2.41.0





Information forwarded to , guix-patches <at> gnu.org:
bug#64348; Package guix-patches. (Mon, 01 Jan 2024 06:40:02 GMT) Full text and rfc822 format available.

Message #11 received at 64348 <at> debbugs.gnu.org (full text, mbox):

From: Ahmad Draidi <a.r.draidi <at> redscript.org>
To: 64348 <at> debbugs.gnu.org
Cc: Ahmad Draidi <a.r.draidi <at> redscript.org>
Subject: [PATCH v3] gnu: Add durden.
Date: Mon,  1 Jan 2024 10:36:34 +0400
* gnu/packages/arcan.scm (durden): New variable.

Change-Id: I3ea34563c74c227eed40f4ad50d23713c45ce70b
---
v2 changes: Rebase to fix conflicts
v3 changes: Update to commit matching Arcan 0.6.3 (68016)

 gnu/packages/arcan.scm | 40 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/gnu/packages/arcan.scm b/gnu/packages/arcan.scm
index 4ca76edbec..9a575e98d4 100644
--- a/gnu/packages/arcan.scm
+++ b/gnu/packages/arcan.scm
@@ -20,6 +20,7 @@
 
 (define-module (gnu packages arcan)
   #:use-module (guix build-system cmake)
+  #:use-module (guix build-system copy)
   #:use-module (guix build-system meson)
   #:use-module (guix build-system gnu)
   #:use-module (guix gexp)
@@ -183,6 +184,45 @@ (define-public arcan-sdl
               "-DSTATIC_FREETYPE=off" "-DSHMIF_TUI_ACCEL=on")))))
     (synopsis "Combined display server, multimedia framework and game engine (SDL)")))
 
+(define-public durden
+  ;; Match Arcan 0.6.3
+  (let ((commit "a8938b9c835f55bedc2c42aec4ddc5c9739eb949")
+        (revision "1"))
+    (package
+      (name "durden")
+      (version (git-version "0.6.1" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (file-name (git-file-name name version))
+         (uri (git-reference
+               (url "https://github.com/letoram/durden")
+               (commit commit)))
+         (sha256
+          (base32 "1ybi6x2kwn597kjqycrqmlvp6z79yv2jfwzgx937wcckm55xlpvk"))))
+      (build-system copy-build-system)
+      (arguments
+       (list
+        #:install-plan #~'(("durden/" "share/arcan/appl/durden/")
+                           ("util/" "share/arcan/appl/durden/util/")
+                           ("distr/durden" "bin/durden"))
+        #:phases #~(modify-phases %standard-phases
+                     (add-after 'unpack 'patch-paths
+                       (lambda* (#:key outputs #:allow-other-keys)
+                         (substitute* "distr/durden"
+                           (("/usr/share/\\$applname")
+                            (string-append (assoc-ref outputs "out")
+                                           "/share/arcan/appl"))))))))
+      (home-page "https://durden.arcan-fe.com/")
+      (synopsis "Desktop Environment for Arcan")
+      (description
+       "Durden is a desktop environment for the Arcan Display Server.
+It serves both as a reference showcase on how to take advantage of some of the
+features in Arcan, and as an entry to the advanced-user side of the desktop
+environment spectrum.")
+      (license (list license:bsd-3 license:expat license:cc-by3.0
+                     license:cc-by4.0 license:asl2.0)))))
+
 (define-public xarcan
   (package
     (name "xarcan")

base-commit: 86b5fa100992527c434616482ba9cfd92b636d12
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#64348; Package guix-patches. (Sat, 30 Mar 2024 08:14:01 GMT) Full text and rfc822 format available.

Message #14 received at 64348 <at> debbugs.gnu.org (full text, mbox):

From: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
To: Ahmad Draidi <a.r.draidi <at> redscript.org>, 64348 <at> debbugs.gnu.org
Subject: Re: [PATCH v3] gnu: Add durden.
Date: Sat, 30 Mar 2024 09:12:42 +0100
Am Montag, dem 01.01.2024 um 10:36 +0400 schrieb Ahmad Draidi:
> * gnu/packages/arcan.scm (durden): New variable.
> 
> Change-Id: I3ea34563c74c227eed40f4ad50d23713c45ce70b
> ---
> v2 changes: Rebase to fix conflicts
> v3 changes: Update to commit matching Arcan 0.6.3 (68016)
> 
>  gnu/packages/arcan.scm | 40 ++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 40 insertions(+)
> 
> diff --git a/gnu/packages/arcan.scm b/gnu/packages/arcan.scm
> index 4ca76edbec..9a575e98d4 100644
> --- a/gnu/packages/arcan.scm
> +++ b/gnu/packages/arcan.scm
> @@ -20,6 +20,7 @@
>  
>  (define-module (gnu packages arcan)
>    #:use-module (guix build-system cmake)
> +  #:use-module (guix build-system copy)
>    #:use-module (guix build-system meson)
>    #:use-module (guix build-system gnu)
>    #:use-module (guix gexp)
> @@ -183,6 +184,45 @@ (define-public arcan-sdl
>                "-DSTATIC_FREETYPE=off" "-DSHMIF_TUI_ACCEL=on")))))
>      (synopsis "Combined display server, multimedia framework and
> game engine (SDL)")))
>  
> +(define-public durden
> +  ;; Match Arcan 0.6.3
> +  (let ((commit "a8938b9c835f55bedc2c42aec4ddc5c9739eb949")
> +        (revision "1"))
> +    (package
> +      (name "durden")
> +      (version (git-version "0.6.1" revision commit))
> +      (source
> +       (origin
> +         (method git-fetch)
> +         (file-name (git-file-name name version))
> +         (uri (git-reference
> +               (url "https://github.com/letoram/durden")
> +               (commit commit)))
> +         (sha256
> +          (base32
> "1ybi6x2kwn597kjqycrqmlvp6z79yv2jfwzgx937wcckm55xlpvk"))))
> +      (build-system copy-build-system)
> +      (arguments
> +       (list
> +        #:install-plan #~'(("durden/" "share/arcan/appl/durden/")
> +                           ("util/" "share/arcan/appl/durden/util/")
> +                           ("distr/durden" "bin/durden"))
> +        #:phases #~(modify-phases %standard-phases
> +                     (add-after 'unpack 'patch-paths
> +                       (lambda* (#:key outputs #:allow-other-keys)
> +                         (substitute* "distr/durden"
> +                           (("/usr/share/\\$applname")
> +                            (string-append (assoc-ref outputs "out")
> +                                          
> "/share/arcan/appl"))))))))
> +      (home-page "https://durden.arcan-fe.com/")
I think there might be some commands like arcan and date (from
coreutils) which you might have to hard-code to comply with Guix
packaging practices.  If you want to allow the user environment to
shadow them, you could make use of the following shell snippet:

  if [ -n "$(command -v THE_COMMAND 2>/dev/null)" ]; then
    THE_COMMAND="THE_COMMAND"
  else
    THE_COMMAND="@THE_COMMAND_STORE_PATH@"
  fi

and then refer to THE_COMMAND via "${THE_COMMAND}" elsewhere.

Cheers

Information forwarded to guix-patches <at> gnu.org:
bug#64348; Package guix-patches. (Tue, 09 Apr 2024 11:26:02 GMT) Full text and rfc822 format available.

Message #17 received at 64348 <at> debbugs.gnu.org (full text, mbox):

From: Ahmad Draidi <a.r.draidi <at> redscript.org>
To: 64348 <at> debbugs.gnu.org
Cc: Ahmad Draidi <a.r.draidi <at> redscript.org>, liliana.prikler <at> gmail.com
Subject: [PATCH v4] gnu: Add durden.
Date: Tue,  9 Apr 2024 15:20:00 +0400
* gnu/packages/arcan.scm (durden): New variable.

Change-Id: I3ea34563c74c227eed40f4ad50d23713c45ce70b
---
Hello Liliana,

Thanks for the review.

I believe I got all of them. Coreutils are a sneaky bunch :)

Thanks!

v2 changes: Rebase to fix conflicts
v3 changes: Update to commit matching Arcan 0.6.3 (68016)
v4 changes: Hard-code coreutils and arcan paths in "durden" shell script

 gnu/packages/arcan.scm | 72 +++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 71 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/arcan.scm b/gnu/packages/arcan.scm
index c4dfa8da3e..9d68005175 100644
--- a/gnu/packages/arcan.scm
+++ b/gnu/packages/arcan.scm
@@ -1,7 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2019 L  p R n  d n <guix <at> lprndn.info>
 ;;; Copyright © 2021 Guillaume Le Vaillant <glv <at> posteo.net>
-;;; Copyright © 2023 Ahmad Draidi <a.r.draidi <at> redscript.org>
+;;; Copyright © 2023, 2024 Ahmad Draidi <a.r.draidi <at> redscript.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -20,6 +20,7 @@
 
 (define-module (gnu packages arcan)
   #:use-module (guix build-system cmake)
+  #:use-module (guix build-system copy)
   #:use-module (guix build-system meson)
   #:use-module (guix build-system gnu)
   #:use-module (guix gexp)
@@ -29,6 +30,7 @@ (define-module (gnu packages arcan)
   #:use-module (guix utils)
   #:use-module (gnu packages audio)
   #:use-module (gnu packages autotools)
+  #:use-module (gnu packages base)
   #:use-module (gnu packages bash)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages databases)
@@ -183,6 +185,74 @@ (define-public arcan-sdl
               "-DSTATIC_FREETYPE=off" "-DSHMIF_TUI_ACCEL=on")))))
     (synopsis "Combined display server, multimedia framework and game engine (SDL)")))
 
+(define-public durden
+  ;; Match Arcan 0.6.3
+  (let ((commit "a8938b9c835f55bedc2c42aec4ddc5c9739eb949")
+        (revision "1"))
+    (package
+      (name "durden")
+      (version (git-version "0.6.1" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (file-name (git-file-name name version))
+         (uri (git-reference
+               (url "https://github.com/letoram/durden")
+               (commit commit)))
+         (sha256
+          (base32 "1ybi6x2kwn597kjqycrqmlvp6z79yv2jfwzgx937wcckm55xlpvk"))))
+      (build-system copy-build-system)
+      (arguments
+       (list
+        #:install-plan #~'(("durden/" "share/arcan/appl/durden/")
+                           ("util/" "share/arcan/appl/durden/util/")
+                           ("distr/durden" "bin/durden"))
+        #:phases #~(modify-phases %standard-phases
+                     (add-after 'unpack 'patch-paths
+                       (lambda* (#:key inputs outputs #:allow-other-keys)
+                         (substitute* "distr/durden"
+                           (("/usr/share/\\$applname")
+                            (string-append (assoc-ref outputs "out")
+                                           "/share/arcan/appl"))
+                           (("([\\([:blank:]]+)arcan " _ separator)
+                            (string-append separator
+                                           (assoc-ref inputs "arcan")
+                                           "/bin/arcan "))
+                           (("([\\([:blank:]]+)basename " _ separator)
+                            (string-append separator
+                                           (assoc-ref inputs "coreutils")
+                                           "/bin/basename "))
+                           (("([\\([:blank:]]+)date " _ separator)
+                            (string-append separator
+                                           (assoc-ref inputs "coreutils")
+                                           "/bin/date "))
+                           (("([\\([:blank:]]+)ln " _ separator)
+                            (string-append separator
+                                           (assoc-ref inputs "coreutils")
+                                           "/bin/ln "))
+                           (("([\\([:blank:]]+)mkdir " _ separator)
+                            (string-append separator
+                                           (assoc-ref inputs "coreutils")
+                                           "/bin/mkdir "))
+                           (("([\\([:blank:]]+)true; " _ separator)
+                            (string-append separator
+                                           (assoc-ref inputs "coreutils")
+                                           "/bin/true; "))
+                           (("([\\([:blank:]]+)\\[ " _ separator)
+                            (string-append separator
+                                           (assoc-ref inputs "coreutils")
+                                           "/bin/[ "))))))))
+      (inputs (list arcan coreutils))
+      (home-page "https://durden.arcan-fe.com/")
+      (synopsis "Desktop Environment for Arcan")
+      (description
+       "Durden is a desktop environment for the Arcan Display Server.
+It serves both as a reference showcase on how to take advantage of some of the
+features in Arcan, and as an entry to the advanced-user side of the desktop
+environment spectrum.")
+      (license (list license:bsd-3 license:expat license:cc-by3.0
+                     license:cc-by4.0 license:asl2.0)))))
+
 (define-public xarcan
   (package
     (name "xarcan")

base-commit: 51de844a0ff6ea224367a384092896bce6848b9f
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#64348; Package guix-patches. (Tue, 09 Apr 2024 12:00:02 GMT) Full text and rfc822 format available.

Message #20 received at 64348 <at> debbugs.gnu.org (full text, mbox):

From: Ahmad Draidi <a.r.draidi <at> redscript.org>
To: Ahmad Draidi <a.r.draidi <at> redscript.org>, 64348 <at> debbugs.gnu.org
Cc: liliana.prikler <at> gmail.com
Subject: Re: [PATCH v4] gnu: Add durden.
Date: Tue, 09 Apr 2024 15:59:25 +0400
[Message part 1 (text/plain, inline)]
Hello again,

Sorry. I made a mistake, I believe.

Arcan requires setuid to run without nesting. I only tested with nesting before sending v4.

I'll pick up arcan from the user's profile. I think that's the best course of action.

Sorry for the noise.

On 9 April 2024 15:20:00 GTS, Ahmad Draidi <a.r.draidi <at> redscript.org> wrote:
>* gnu/packages/arcan.scm (durden): New variable.
>
>Change-Id: I3ea34563c74c227eed40f4ad50d23713c45ce70b
>---
>Hello Liliana,
>
>Thanks for the review.
>
>I believe I got all of them. Coreutils are a sneaky bunch :)
>
>Thanks!
>
>v2 changes: Rebase to fix conflicts
>v3 changes: Update to commit matching Arcan 0.6.3 (68016)
>v4 changes: Hard-code coreutils and arcan paths in "durden" shell script
>
> gnu/packages/arcan.scm | 72 +++++++++++++++++++++++++++++++++++++++++-
> 1 file changed, 71 insertions(+), 1 deletion(-)
>
>diff --git a/gnu/packages/arcan.scm b/gnu/packages/arcan.scm
>index c4dfa8da3e..9d68005175 100644
>--- a/gnu/packages/arcan.scm
>+++ b/gnu/packages/arcan.scm
>@@ -1,7 +1,7 @@
> ;;; GNU Guix --- Functional package management for GNU
> ;;; Copyright © 2019 L  p R n  d n <guix <at> lprndn.info>
> ;;; Copyright © 2021 Guillaume Le Vaillant <glv <at> posteo.net>
>-;;; Copyright © 2023 Ahmad Draidi <a.r.draidi <at> redscript.org>
>+;;; Copyright © 2023, 2024 Ahmad Draidi <a.r.draidi <at> redscript.org>
> ;;;
> ;;; This file is part of GNU Guix.
> ;;;
>@@ -20,6 +20,7 @@
> 
> (define-module (gnu packages arcan)
>   #:use-module (guix build-system cmake)
>+  #:use-module (guix build-system copy)
>   #:use-module (guix build-system meson)
>   #:use-module (guix build-system gnu)
>   #:use-module (guix gexp)
>@@ -29,6 +30,7 @@ (define-module (gnu packages arcan)
>   #:use-module (guix utils)
>   #:use-module (gnu packages audio)
>   #:use-module (gnu packages autotools)
>+  #:use-module (gnu packages base)
>   #:use-module (gnu packages bash)
>   #:use-module (gnu packages compression)
>   #:use-module (gnu packages databases)
>@@ -183,6 +185,74 @@ (define-public arcan-sdl
>               "-DSTATIC_FREETYPE=off" "-DSHMIF_TUI_ACCEL=on")))))
>     (synopsis "Combined display server, multimedia framework and game engine (SDL)")))
> 
>+(define-public durden
>+  ;; Match Arcan 0.6.3
>+  (let ((commit "a8938b9c835f55bedc2c42aec4ddc5c9739eb949")
>+        (revision "1"))
>+    (package
>+      (name "durden")
>+      (version (git-version "0.6.1" revision commit))
>+      (source
>+       (origin
>+         (method git-fetch)
>+         (file-name (git-file-name name version))
>+         (uri (git-reference
>+               (url "https://github.com/letoram/durden")
>+               (commit commit)))
>+         (sha256
>+          (base32 "1ybi6x2kwn597kjqycrqmlvp6z79yv2jfwzgx937wcckm55xlpvk"))))
>+      (build-system copy-build-system)
>+      (arguments
>+       (list
>+        #:install-plan #~'(("durden/" "share/arcan/appl/durden/")
>+                           ("util/" "share/arcan/appl/durden/util/")
>+                           ("distr/durden" "bin/durden"))
>+        #:phases #~(modify-phases %standard-phases
>+                     (add-after 'unpack 'patch-paths
>+                       (lambda* (#:key inputs outputs #:allow-other-keys)
>+                         (substitute* "distr/durden"
>+                           (("/usr/share/\\$applname")
>+                            (string-append (assoc-ref outputs "out")
>+                                           "/share/arcan/appl"))
>+                           (("([\\([:blank:]]+)arcan " _ separator)
>+                            (string-append separator
>+                                           (assoc-ref inputs "arcan")
>+                                           "/bin/arcan "))
>+                           (("([\\([:blank:]]+)basename " _ separator)
>+                            (string-append separator
>+                                           (assoc-ref inputs "coreutils")
>+                                           "/bin/basename "))
>+                           (("([\\([:blank:]]+)date " _ separator)
>+                            (string-append separator
>+                                           (assoc-ref inputs "coreutils")
>+                                           "/bin/date "))
>+                           (("([\\([:blank:]]+)ln " _ separator)
>+                            (string-append separator
>+                                           (assoc-ref inputs "coreutils")
>+                                           "/bin/ln "))
>+                           (("([\\([:blank:]]+)mkdir " _ separator)
>+                            (string-append separator
>+                                           (assoc-ref inputs "coreutils")
>+                                           "/bin/mkdir "))
>+                           (("([\\([:blank:]]+)true; " _ separator)
>+                            (string-append separator
>+                                           (assoc-ref inputs "coreutils")
>+                                           "/bin/true; "))
>+                           (("([\\([:blank:]]+)\\[ " _ separator)
>+                            (string-append separator
>+                                           (assoc-ref inputs "coreutils")
>+                                           "/bin/[ "))))))))
>+      (inputs (list arcan coreutils))
>+      (home-page "https://durden.arcan-fe.com/")
>+      (synopsis "Desktop Environment for Arcan")
>+      (description
>+       "Durden is a desktop environment for the Arcan Display Server.
>+It serves both as a reference showcase on how to take advantage of some of the
>+features in Arcan, and as an entry to the advanced-user side of the desktop
>+environment spectrum.")
>+      (license (list license:bsd-3 license:expat license:cc-by3.0
>+                     license:cc-by4.0 license:asl2.0)))))
>+
> (define-public xarcan
>   (package
>     (name "xarcan")
>
>base-commit: 51de844a0ff6ea224367a384092896bce6848b9f
>-- 
>2.41.0
>
[Message part 2 (text/html, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#64348; Package guix-patches. (Tue, 09 Apr 2024 17:02:03 GMT) Full text and rfc822 format available.

Message #23 received at 64348 <at> debbugs.gnu.org (full text, mbox):

From: Ahmad Draidi <a.r.draidi <at> redscript.org>
To: 64348 <at> debbugs.gnu.org
Cc: Ahmad Draidi <a.r.draidi <at> redscript.org>, liliana.prikler <at> gmail.com
Subject: [PATCH v5] gnu: Add durden.
Date: Tue,  9 Apr 2024 20:56:50 +0400
* gnu/packages/arcan.scm (durden): New variable.
* gnu/packages/patches/durden-shadow-arcan.patch: New file.
* gnu/local.mk: Register it.

Change-Id: I3ea34563c74c227eed40f4ad50d23713c45ce70b
---
Greetings,

I tested this patch version using nested arcan (under wayland) and natively.
Hopefully this is the last version.

Thanks!

v2 changes: Rebase to fix conflicts
v3 changes: Update to commit matching Arcan 0.6.3 (68016)
v4 changes: Hard-code coreutils and arcan paths in "durden" shell script
v5 changes: Use set-uid arcan if available, otherwise use hard-coded from store

 gnu/local.mk                                  |  1 +
 gnu/packages/arcan.scm                        | 73 ++++++++++++++++++-
 .../patches/durden-shadow-arcan.patch         | 42 +++++++++++
 3 files changed, 115 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/durden-shadow-arcan.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 255bb870e9..81ea687b61 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1120,6 +1120,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/dune-common-skip-failing-tests.patch	\
   %D%/packages/patches/dune-grid-add-missing-include-cassert.patch	\
   %D%/packages/patches/dune-istl-fix-solver-playground.patch	\
+  %D%/packages/patches/durden-shadow-arcan.patch		\
   %D%/packages/patches/dvd+rw-tools-add-include.patch 		\
   %D%/packages/patches/dynaconf-unvendor-deps.patch		\
   %D%/packages/patches/dyninst-fix-glibc-compatibility.patch	\
diff --git a/gnu/packages/arcan.scm b/gnu/packages/arcan.scm
index c4dfa8da3e..f86e8206e5 100644
--- a/gnu/packages/arcan.scm
+++ b/gnu/packages/arcan.scm
@@ -1,7 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2019 L  p R n  d n <guix <at> lprndn.info>
 ;;; Copyright © 2021 Guillaume Le Vaillant <glv <at> posteo.net>
-;;; Copyright © 2023 Ahmad Draidi <a.r.draidi <at> redscript.org>
+;;; Copyright © 2023, 2024 Ahmad Draidi <a.r.draidi <at> redscript.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -20,6 +20,7 @@
 
 (define-module (gnu packages arcan)
   #:use-module (guix build-system cmake)
+  #:use-module (guix build-system copy)
   #:use-module (guix build-system meson)
   #:use-module (guix build-system gnu)
   #:use-module (guix gexp)
@@ -27,8 +28,10 @@ (define-module (gnu packages arcan)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix utils)
+  #:use-module (gnu packages)
   #:use-module (gnu packages audio)
   #:use-module (gnu packages autotools)
+  #:use-module (gnu packages base)
   #:use-module (gnu packages bash)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages databases)
@@ -183,6 +186,74 @@ (define-public arcan-sdl
               "-DSTATIC_FREETYPE=off" "-DSHMIF_TUI_ACCEL=on")))))
     (synopsis "Combined display server, multimedia framework and game engine (SDL)")))
 
+(define-public durden
+  ;; Match Arcan 0.6.3
+  (let ((commit "a8938b9c835f55bedc2c42aec4ddc5c9739eb949")
+        (revision "1"))
+    (package
+      (name "durden")
+      (version (git-version "0.6.1" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (file-name (git-file-name name version))
+         (uri (git-reference
+               (url "https://github.com/letoram/durden")
+               (commit commit)))
+         (sha256
+          (base32 "1ybi6x2kwn597kjqycrqmlvp6z79yv2jfwzgx937wcckm55xlpvk"))
+         (patches (search-patches "durden-shadow-arcan.patch"))))
+      (build-system copy-build-system)
+      (arguments
+       (list
+        #:install-plan #~'(("durden/" "share/arcan/appl/durden/")
+                           ("util/" "share/arcan/appl/durden/util/")
+                           ("distr/durden" "bin/durden"))
+        #:phases #~(modify-phases %standard-phases
+                     (add-after 'unpack 'patch-paths
+                       (lambda* (#:key inputs outputs #:allow-other-keys)
+                         (substitute* "distr/durden"
+                           (("/usr/share/\\$applname")
+                            (string-append (assoc-ref outputs "out")
+                                           "/share/arcan/appl"))
+                           (("@ARCAN_STORE_PATH@")
+                            (string-append (assoc-ref inputs "arcan")
+                                           "/bin/arcan"))
+                           (("([\\([:blank:]]+)basename " _ separator)
+                            (string-append separator
+                                           (assoc-ref inputs "coreutils")
+                                           "/bin/basename "))
+                           (("([\\([:blank:]]+)date " _ separator)
+                            (string-append separator
+                                           (assoc-ref inputs "coreutils")
+                                           "/bin/date "))
+                           (("([\\([:blank:]]+)ln " _ separator)
+                            (string-append separator
+                                           (assoc-ref inputs "coreutils")
+                                           "/bin/ln "))
+                           (("([\\([:blank:]]+)mkdir " _ separator)
+                            (string-append separator
+                                           (assoc-ref inputs "coreutils")
+                                           "/bin/mkdir "))
+                           (("([\\([:blank:]]+)true; " _ separator)
+                            (string-append separator
+                                           (assoc-ref inputs "coreutils")
+                                           "/bin/true; "))
+                           (("([\\([:blank:]]+)\\[ " _ separator)
+                            (string-append separator
+                                           (assoc-ref inputs "coreutils")
+                                           "/bin/[ "))))))))
+      (inputs (list arcan coreutils))
+      (home-page "https://durden.arcan-fe.com/")
+      (synopsis "Desktop Environment for Arcan")
+      (description
+       "Durden is a desktop environment for the Arcan Display Server.
+It serves both as a reference showcase on how to take advantage of some of the
+features in Arcan, and as an entry to the advanced-user side of the desktop
+environment spectrum.")
+      (license (list license:bsd-3 license:expat license:cc-by3.0
+                     license:cc-by4.0 license:asl2.0)))))
+
 (define-public xarcan
   (package
     (name "xarcan")
diff --git a/gnu/packages/patches/durden-shadow-arcan.patch b/gnu/packages/patches/durden-shadow-arcan.patch
new file mode 100644
index 0000000000..b666a6d7e3
--- /dev/null
+++ b/gnu/packages/patches/durden-shadow-arcan.patch
@@ -0,0 +1,42 @@
+From 157524b7cb76c5044a27f4a9e373ee04a9da3c71 Mon Sep 17 00:00:00 2001
+From: Ahmad Draidi <a.r.draidi <at> redscript.org>
+Date: Tue, 9 Apr 2024 18:26:52 +0400
+Subject: [PATCH] Use arcan from setuid-programs if available
+
+---
+ distr/durden | 10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/distr/durden b/distr/durden
+index ab431ce..8672556 100755
+--- a/distr/durden
++++ b/distr/durden
+@@ -1,5 +1,11 @@
+ #!/bin/sh
+ 
++if [ -n "$(command -v /run/setuid-programs/arcan 2>/dev/null)" ]; then
++	ARCAN_CMD="/run/setuid-programs/arcan"
++else
++	ARCAN_CMD="@ARCAN_STORE_PATH@"
++fi
++
+ arcan_base=${HOME}/.arcan
+ applname="$(basename $0)"
+ distargs=""
+@@ -98,11 +104,11 @@ while true; do
+ 	starttime=$(date +%s)
+ 
+ 	if [ -d "${arcan_logpath}" ]; then
+-		if arcan ${distargs} -b "$applname" "$applname" "$@" >"${arcan_logpath}/${applname}_${starttime}.log" 2>&1; then
++		if "${ARCAN_CMD}" ${distargs} -b "$applname" "$applname" "$@" >"${arcan_logpath}/${applname}_${starttime}.log" 2>&1; then
+ 			exit
+ 		fi
+ 	else
+-		if arcan ${distargs} -b "$applname" "$applname" "$@"; then
++		if "${ARCAN_CMD}" ${distargs} -b "$applname" "$applname" "$@"; then
+ 			exit
+ 		fi
+ 	fi
+-- 
+2.41.0
+

base-commit: 6d0502f9c3608ffd6b3b3c9b603cb5d4ad14d8c9
-- 
2.41.0





Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Thu, 11 Apr 2024 10:41:02 GMT) Full text and rfc822 format available.

Notification sent to Ahmad Draidi <a.r.draidi <at> redscript.org>:
bug acknowledged by developer. (Thu, 11 Apr 2024 10:41:02 GMT) Full text and rfc822 format available.

Message #28 received at 64348-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Ahmad Draidi <a.r.draidi <at> redscript.org>
Cc: 64348-done <at> debbugs.gnu.org, liliana.prikler <at> gmail.com
Subject: Re: [bug#64348] [PATCH v5] gnu: Add durden.
Date: Thu, 11 Apr 2024 12:40:19 +0200
Hello,

Ahmad Draidi <a.r.draidi <at> redscript.org> skribis:

> * gnu/packages/arcan.scm (durden): New variable.
> * gnu/packages/patches/durden-shadow-arcan.patch: New file.
> * gnu/local.mk: Register it.
>
> Change-Id: I3ea34563c74c227eed40f4ad50d23713c45ce70b

Applied, thanks!

Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 09 May 2024 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 7 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.