all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#53020] [PATCH] gnu: racket: Backport fix for .desktop files.
@ 2022-01-05  6:06 Philip McGrath
  2022-01-05  8:59 ` zimoun
  0 siblings, 1 reply; 6+ messages in thread
From: Philip McGrath @ 2022-01-05  6:06 UTC (permalink / raw)
  To: 53020; +Cc: Philip McGrath, Philip McGrath

This commit backports a repair by Matthew Flatt for Racket's
creation and installation of '.desktop' files in tethered Racket
installations. Guix's 'racket' package is structured as a tethered
installation, so the Guix package now installs 'drracket.desktop'
and 'slideshow.desktop' properly, for example. For further upstream
discussion, see: <https://github.com/racket/racket/issues/4079>.

* gnu/packages/patches/racket-minimal-backport-4079-fix.patch: New
patch.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/racket.scm (racket-minimal)[source]: Use it.
(extend-layer): Set config-tethered-apps-dir.
---

Guix is a significant use-case for this functionality in Racket, so it would
be great to have more Guix users confirm that these repairs fully solve the
problem before the upcoming Racket 8.4 release.

 gnu/local.mk                                  |   1 +
 .../racket-minimal-backport-4079-fix.patch    | 318 ++++++++++++++++++
 gnu/packages/racket.scm                       |  15 +-
 3 files changed, 330 insertions(+), 4 deletions(-)
 create mode 100644 gnu/packages/patches/racket-minimal-backport-4079-fix.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index c8ec622aa1..008583d0f5 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1748,6 +1748,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/ripperx-missing-file.patch		\
   %D%/packages/patches/rpcbind-CVE-2017-8779.patch		\
   %D%/packages/patches/rtags-separate-rct.patch			\
+  %D%/packages/patches/racket-minimal-backport-4079-fix.patch	\
   %D%/packages/patches/racket-minimal-sh-via-rktio.patch	\
   %D%/packages/patches/remake-impure-dirs.patch			\
   %D%/packages/patches/restic-0.9.6-fix-tests-for-go1.15.patch	\
diff --git a/gnu/packages/patches/racket-minimal-backport-4079-fix.patch b/gnu/packages/patches/racket-minimal-backport-4079-fix.patch
new file mode 100644
index 0000000000..8af48476e0
--- /dev/null
+++ b/gnu/packages/patches/racket-minimal-backport-4079-fix.patch
@@ -0,0 +1,318 @@
+From 05263c7b306e156f256942bd5a099d17846b5d30 Mon Sep 17 00:00:00 2001
+From: Matthew Flatt <mflatt@racket-lang.org>
+Date: Mon, 3 Jan 2022 13:53:30 -0700
+Subject: [PATCH 1/2] config: add '{config,addon}-tethered-apps-dir
+
+Support ".desktop" files in a tethered layer.
+
+Addresses #4079
+
+(cherry picked from commit 11ccee31d6c0903720250655fda3f7ed879769e8)
+---
+ .../scribblings/raco/launcher.scrbl           | 13 ++++--
+ pkgs/racket-doc/scribblings/raco/setup.scrbl  | 43 ++++++++++++-------
+ racket/collects/launcher/launcher.rkt         | 39 ++++++++++-------
+ racket/collects/setup/dirs.rkt                | 13 +++++-
+ racket/collects/setup/private/dirs.rkt        |  2 +
+ 5 files changed, 75 insertions(+), 35 deletions(-)
+
+diff --git a/pkgs/racket-doc/scribblings/raco/launcher.scrbl b/pkgs/racket-doc/scribblings/raco/launcher.scrbl
+index daece40c57..9a94a624b5 100644
+--- a/pkgs/racket-doc/scribblings/raco/launcher.scrbl
++++ b/pkgs/racket-doc/scribblings/raco/launcher.scrbl
+@@ -415,14 +415,21 @@ Backward-compatible aliases for
+ @history[#:changed "6.5.0.2" @elem{Added the @racket[#:tethered?] argument.}]}
+ 
+ 
+-@defproc[(installed-executable-path->desktop-path [exec-path path-string?] [user? any/c])
+-         (and/c path? complete-path?)]{
++@defproc[(installed-executable-path->desktop-path [exec-path path-string?] [user? any/c] [tethered? any/c])
++         (or/c (and/c path? complete-path?) #f)]{
+ 
+ Returns a path for a @filepath{.desktop} file to describe the
+ installed executable at @racket[exec-path]. Only the filename part of
+ @racket[exec-path] is used. The @racket[user?] argument should be true
+ if @racket[exec-path] is installed in a user-specific location (in
+-which case the result path will also be user-specific).}
++which case the result path will also be user-specific). The
++@racket[tethered?] argument should be true for a @tech{tethered}
++install. The result can be @racket[#f] only when @racket[tethered?] is
++true and @racket[find-addon-tethered-apps-dir] (when @racket[user?] is
++true) or @racket[find-config-tethered-apps-dir] (when @racket[user?] is
++@racket[#f]) returns @racket[#f].
++
++@history[#:changed "8.3.0.11" @elem{Added the @racket[tethered?] argument.}]}
+ 
+ 
+ @defproc[(installed-desktop-path->icon-path [desktop-path path-string?]
+diff --git a/pkgs/racket-doc/scribblings/raco/setup.scrbl b/pkgs/racket-doc/scribblings/raco/setup.scrbl
+index f1d2b99c52..f7d1051419 100644
+--- a/pkgs/racket-doc/scribblings/raco/setup.scrbl
++++ b/pkgs/racket-doc/scribblings/raco/setup.scrbl
+@@ -1775,9 +1775,11 @@ current-system paths while @racket[get-cross-lib-search-dirs] and
+ @deftogether[(
+ @defproc[(find-addon-tethered-console-bin-dir) (or/c #f path?)]
+ @defproc[(find-addon-tethered-gui-bin-dir) (or/c #f path?)]
++@defproc[(find-addon-tethered-apps-dir) (or/c #f path?)]
+ )]{
+   Returns a path to a user-specific directory to hold an extra copy of
+-  each installed executable, where the extra copy is created by
++  each installed executable and @filepath{.desktop}
++  file (for Unix), where the extra copy is created by
+   @exec{raco setup} and tethered to a particular result for
+   @racket[(find-system-path 'addon-dir)] and
+   @racket[(find-config-dir)].
+@@ -1785,33 +1787,39 @@ current-system paths while @racket[get-cross-lib-search-dirs] and
+   Unlike other directories, which are configured via
+   @filepath{config.rktd} in the @racket[(find-config-dir)] directory
+   (see @secref["config-file"]), these paths are configured via
+-  @racket['addon-tethered-console-bin-dir] and
+-  @racket['addon-tethered-gui-bin-dir] entries in
++  @racket['addon-tethered-console-bin-dir],
++  @racket['addon-tethered-gui-bin-dir], and
++  @racket['addon-tethered-apps-dir] entries in
+   @filepath{config.rktd} in @racket[(build-path (find-system-path
+   'addon-dir) "etc")]. If no configuration is present, the result from
+   the corresponding function,
+-  @racket[find-addon-tethered-console-bin-dir] or
+-  @racket[find-addon-tethered-gui-bin-dir], is @racket[#f] instead of
++  @racket[find-addon-tethered-console-bin-dir],
++  @racket[find-addon-tethered-gui-bin-dir], or
++  @racket[find-addon-tethered-apps-dir], is @racket[#f] instead of
+   a path.
+ 
+   See @secref["tethered-install"] for more information.
+ 
+-  @history[#:added "6.5.0.2"]}
++  @history[#:added "6.5.0.2"
++           #:changed "8.3.0.11" @elem{Added @racket[find-addon-tethered-apps-dir].}]]}
+ 
+ 
+ @deftogether[(
+ @defproc[(find-config-tethered-console-bin-dir) (or/c #f path?)]
+ @defproc[(find-config-tethered-gui-bin-dir) (or/c #f path?)]
++@defproc[(find-config-tethered-apps-dir) (or/c #f path?)]
+ )]{
+-  Similar to @racket[find-addon-tethered-console-bin-dir] and
+-  @racket[find-addon-tethered-gui-bin-dir], but configured via
++  Similar to @racket[find-addon-tethered-console-bin-dir],
++  @racket[find-addon-tethered-gui-bin-dir], and
++  @racket[find-addon-tethered-apps-dir], but configured via
+   @filepath{config.rktd} in the @racket[(find-config-dir)] directory
+   (see @secref["config-file"]) and triggers executables that are
+   tethered only to a particular value of @racket[(find-config-dir)].
+ 
+   See @secref["tethered-install"] for more information.
+ 
+-  @history[#:added "6.5.0.2"]}
++  @history[#:added "6.5.0.2"
++           #:changed "8.3.0.11" @elem{Added @racket[find-addon-tethered-apps-dir].}]}
+  
+ @; ------------------------------------------------------------------------
+ 
+@@ -2578,9 +2586,11 @@ layer:
+        directory @nonterm{addon-dir} and a
+        @filepath{@nonterm{addon-dir}/etc/config.rktd} file that maps
+        @racket['addon-tethered-console-bin-dir] to
+-       @nonterm{tethered-bin-dir} and
++       @nonterm{tethered-bin-dir},
+        @racket['addon-tethered-gui-bin-dir] to
+-       @nonterm{tethered-gui-bin-dir}. Initialize the tethered layer
++       @nonterm{tethered-gui-bin-dir}, and (optionally)
++       @racket['addon-tethered-apps-dir] to
++       @nonterm{tethered-apps-dir}. Initialize the tethered layer
+        with
+ 
+        @commandline{racket -A @nonterm{addon-dir} -l- raco setup --avoid-main}}
+@@ -2588,10 +2598,12 @@ layer:
+  @item{An @defterm{installation} layer with tethering is like a one
+        without tethering (see @secref["layered-install"]), but where
+        the layer's @filepath{@nonterm{layer-dir}/etc/config.rktd} file
+-       that maps @racket['config-tethered-console-bin-dir] to
+-       @nonterm{tethered-bin-dir} and
++       maps @racket['config-tethered-console-bin-dir] to
++       @nonterm{tethered-bin-dir},
+        @racket['config-tethered-gui-bin-dir] to
+-       @nonterm{tethered-gui-bin-dir}. The @racket['bin-dir] and
++       @nonterm{tethered-gui-bin-dir}, and (optionally)
++       @racket['config-tethered-apps-dir] to
++       @nonterm{tethered-apps-dir}. The @racket['bin-dir] and
+        @racket['gui-bin-dir] configurations can point to the same
+        directories, but executables are not specifically created there by
+        @exec{raco setup}. Initialize the tethered layer with
+@@ -2602,7 +2614,8 @@ layer:
+ 
+ In either case, initialization creates tethered executables in the
+ directories @nonterm{tethered-bin-dir} and
+-@nonterm{tethered-gui-bin-dir}. Thereafter, tethered executables like
++@nonterm{tethered-gui-bin-dir}, writing @filepath{.desktop} files
++(for Unix) in @nonterm{tethered-apps-dir} (if specified). Thereafter, tethered executables like
+ @exec{@nonterm{tethered-bin-dir}/racket} and
+ @exec{@nonterm{tethered-bin-dir}/raco} can be used to work with the
+ tethered layer.
+diff --git a/racket/collects/launcher/launcher.rkt b/racket/collects/launcher/launcher.rkt
+index e48cd623cc..ca8d64745d 100644
+--- a/racket/collects/launcher/launcher.rkt
++++ b/racket/collects/launcher/launcher.rkt
+@@ -530,18 +530,23 @@
+                             (file-name-from-path dest))
+                            (cdr m)))))))
+ 
+-(define (installed-executable-path->desktop-path dest user?)
++(define (installed-executable-path->desktop-path dest user? tethered?)
+   (unless (path-string? dest)
+     (raise-argument-error 'installed-executable-path->desktop-path
+                           "path-string?"
+                           dest))
+-  (define dir (if user?
+-                  (find-user-apps-dir)
+-                  (or (find-apps-dir)
+-                      (error 'installed-executable-path->desktop-path
+-                             "no installation directory is available"))))
+-  (path-replace-extension (build-path dir (file-name-from-path dest))
+-                          #".desktop"))
++  (define dir (if tethered?
++                  (if user?
++                      (find-addon-tethered-apps-dir)
++                      (find-config-tethered-apps-dir))
++                  (if user?
++                      (find-user-apps-dir)
++                      (or (find-apps-dir)
++                          (error 'installed-executable-path->desktop-path
++                                 "no installation directory is available")))))
++  (and dir
++       (path-replace-extension (build-path dir (file-name-from-path dest))
++                               #".desktop")))
+ 
+ (define (installed-desktop-path->icon-path dest user? extension)
+   ;; We put icons files in "share" so that `setup/unixstyle-install'
+@@ -566,13 +571,16 @@
+ (define (check-desktop aux dest)
+   (when (eq? 'unix (cross-system-type))
+     (let ([im (assoc 'install-mode aux)])
+-      (when (and im (member (cdr im) '(main user)))
+-        (define user? (eq? (cdr im) 'user))
+-        ;; create Unix ".desktop" files, if any
+-        (let ([m (assoc 'desktop aux)])
+-          (when (and m (cdr m))
+-            (define file (installed-executable-path->desktop-path dest
+-                                                                  user?))
++      (define addon? (and im (eq? (cdr im) 'addon-tethered)))
++      (define config? (and im (eq? (cdr im) 'config-tethered)))
++      (define user? (or addon? (and im (eq? (cdr im) 'user))))
++      ;; create Unix ".desktop" files, if any
++      (let ([m (assoc 'desktop aux)])
++        (when (and m (cdr m))
++          (define file (installed-executable-path->desktop-path dest
++                                                                user?
++                                                                (or addon? config?)))
++          (when file
+             (make-directory* (path-only file))
+             (define (adjust-path p)
+               ;; A ".desktop" file is supposed to have absolute paths
+@@ -582,6 +590,7 @@
+               ;; and be patched up by `setup/unixstyle-install'.
+               (let ([p (simple-form-path (path->complete-path p))])
+                 (if (or user?
++                        config?
+                         (get-absolute-installation?))
+                     p
+                     (find-relative-path (simple-form-path (path-only file)) p))))
+diff --git a/racket/collects/setup/dirs.rkt b/racket/collects/setup/dirs.rkt
+index 3721a8fabe..0a6469f1e7 100644
+--- a/racket/collects/setup/dirs.rkt
++++ b/racket/collects/setup/dirs.rkt
+@@ -14,6 +14,7 @@
+                      config:gui-bin-search-dirs
+                      config:config-tethered-console-bin-dir
+                      config:config-tethered-gui-bin-dir
++                     config:config-tethered-apps-dir
+                      config:lib-search-dirs
+                      config:share-search-dirs
+                      config:man-search-dirs
+@@ -45,7 +46,8 @@
+     [(unix) "bin"]))
+ 
+ (provide find-config-tethered-console-bin-dir
+-         find-config-tethered-gui-bin-dir)
++         find-config-tethered-gui-bin-dir
++         find-config-tethered-apps-dir)
+ 
+ (define (find-config-tethered-console-bin-dir)
+   (force config:config-tethered-console-bin-dir))
+@@ -53,8 +55,12 @@
+ (define (find-config-tethered-gui-bin-dir)
+   (force config:config-tethered-gui-bin-dir))
+ 
++(define (find-config-tethered-apps-dir)
++  (force config:config-tethered-apps-dir))
++
+ (provide find-addon-tethered-console-bin-dir
+-         find-addon-tethered-gui-bin-dir)
++         find-addon-tethered-gui-bin-dir
++         find-addon-tethered-apps-dir)
+ 
+ (define addon-bin-table
+   (delay/sync
+@@ -87,6 +93,9 @@
+ (define (find-addon-tethered-gui-bin-dir)
+   (find-addon-bin-dir 'addon-tethered-gui-bin-dir))
+ 
++(define (find-addon-tethered-apps-dir)
++  (find-addon-bin-dir 'addon-tethered-apps-dir))
++
+ ;; ----------------------------------------
+ ;; Extra search paths
+ 
+diff --git a/racket/collects/setup/private/dirs.rkt b/racket/collects/setup/private/dirs.rkt
+index 745e9c0f59..fa1477d627 100644
+--- a/racket/collects/setup/private/dirs.rkt
++++ b/racket/collects/setup/private/dirs.rkt
+@@ -73,6 +73,7 @@
+ (define config:gui-bin-search-dirs (delay/sync (or (force config:gui-bin-search-dirs/raw) (force config:bin-search-dirs))))
+ (define-config config:config-tethered-console-bin-dir 'config-tethered-console-bin-dir to-path)
+ (define-config config:config-tethered-gui-bin-dir 'config-tethered-gui-bin-dir to-path)
++(define-config config:config-tethered-apps-dir 'config-tethered-apps-dir to-path)
+ (define-config config:man-dir 'man-dir to-path)
+ (define-config config:man-search-dirs 'man-search-dirs to-path)
+ (define-config config:links-file 'links-file to-path)
+@@ -289,6 +290,7 @@
+          config:gui-bin-dir
+          config:config-tethered-console-bin-dir
+          config:config-tethered-gui-bin-dir
++         config:config-tethered-apps-dir
+          config:bin-search-dirs
+          config:gui-bin-search-dirs)
+ 
+-- 
+2.32.0
+
+
+From 61d31acc4f5a12b648dd1d4bba4811ccd95d7568 Mon Sep 17 00:00:00 2001
+From: Matthew Flatt <mflatt@racket-lang.org>
+Date: Tue, 4 Jan 2022 10:52:42 -0700
+Subject: [PATCH 2/2] launcher: fix new argument that is meant to be optional
+
+Repairs a problem with 11ccee31d6.
+
+(cherry picked from commit ece8b17fd6ea05268a647ff8810d0acee1f3b5e3)
+---
+ racket/collects/launcher/launcher.rkt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/racket/collects/launcher/launcher.rkt b/racket/collects/launcher/launcher.rkt
+index ca8d64745d..e2b03c6b0b 100644
+--- a/racket/collects/launcher/launcher.rkt
++++ b/racket/collects/launcher/launcher.rkt
+@@ -530,7 +530,7 @@
+                             (file-name-from-path dest))
+                            (cdr m)))))))
+ 
+-(define (installed-executable-path->desktop-path dest user? tethered?)
++(define (installed-executable-path->desktop-path dest user? [tethered? #f])
+   (unless (path-string? dest)
+     (raise-argument-error 'installed-executable-path->desktop-path
+                           "path-string?"
+-- 
+2.32.0
+
diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm
index d0a5ca494b..1d834e5a39 100644
--- a/gnu/packages/racket.scm
+++ b/gnu/packages/racket.scm
@@ -139,7 +139,13 @@ (define-public racket-minimal
        (sha256
         "1i1jnv1wb0kanfg47hniafx2vhwjc33qqx66lq7wkf5hbmgsyws3")
        (file-name (git-file-name name version))
-       (patches (search-patches "racket-minimal-sh-via-rktio.patch"))
+       (patches (search-patches "racket-minimal-sh-via-rktio.patch"
+                                ;; The following patch backports a repair
+                                ;; for generating .desktop files, motivated in
+                                ;; part by Guix: it should no longer be needed
+                                ;; by Racket 8.4. See upstream discussion at:
+                                ;; https://github.com/racket/racket/issues/4079
+                                "racket-minimal-backport-4079-fix.patch"))
        (modules '((guix build utils)))
        (snippet
         (with-imported-modules '((guix build utils))
@@ -589,9 +595,10 @@ (define rx:racket
                                  (build-path-string parent-layer pth))
                        (filter values (hash-ref config search-key null)))))]
              [config
-              (hash-set config
-                        'apps-dir
-                        (build-path-string prefix "share/applications"))]
+              (let ([apps-dir (build-path-string prefix "share/applications")])
+                (hash-set* config
+                           'apps-dir apps-dir
+                           'config-tethered-apps-dir apps-dir))]
              [config
               ;; place new foreign lib-search-dirs before old
               ;; foreign dirs, but after Racket layers
-- 
2.32.0





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

* [bug#53020] [PATCH] gnu: racket: Backport fix for .desktop files.
  2022-01-05  6:06 [bug#53020] [PATCH] gnu: racket: Backport fix for .desktop files Philip McGrath
@ 2022-01-05  8:59 ` zimoun
  2022-01-05 11:26   ` Malte Gerdes
  2022-01-05 16:38   ` Philip McGrath
  0 siblings, 2 replies; 6+ messages in thread
From: zimoun @ 2022-01-05  8:59 UTC (permalink / raw)
  To: Philip McGrath, 53020; +Cc: Philip McGrath

Hi Philip,

On Wed, 05 Jan 2022 at 01:06, Philip McGrath <philip@philipmcgrath.com> wrote:

> This commit backports a repair by Matthew Flatt for Racket's
> creation and installation of '.desktop' files in tethered Racket
> installations. Guix's 'racket' package is structured as a tethered
> installation, so the Guix package now installs 'drracket.desktop'
> and 'slideshow.desktop' properly, for example. For further upstream
> discussion, see: <https://github.com/racket/racket/issues/4079>.

In this mentioned issue, it reads:

        I will send a patch to Guix in the hope of getting more people
        to try 11ccee3 and ece8b17 before the 8.4 release.

<https://github.com/racket/racket/issues/4079#issuecomment-1005397718>


> * gnu/packages/patches/racket-minimal-backport-4079-fix.patch: New
> patch.
> * gnu/local.mk (dist_patch_DATA): Add it.
> * gnu/packages/racket.scm (racket-minimal)[source]: Use it.
> (extend-layer): Set config-tethered-apps-dir.

So my naive question is: is it worth to include now and not just wait
for the next Racket 8.4 release? (One or two months if Racket keep the 4
releases per year schedule)

Other said, for testing new Racket features in the Guix ecosystem, it
appears to me easier to use transformation:

    guix build racket-minimal --with-commit=ece8b17

(or something along this line :-))

BTW, thanks for bridging the gap between Guix and Racket and it can be
cool if Guix can help Racket. :-)


Cheers,
simon




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

* [bug#53020] [PATCH] gnu: racket: Backport fix for .desktop files.
  2022-01-05  8:59 ` zimoun
@ 2022-01-05 11:26   ` Malte Gerdes
  2022-01-05 14:49     ` Philip McGrath
  2022-01-05 16:38   ` Philip McGrath
  1 sibling, 1 reply; 6+ messages in thread
From: Malte Gerdes @ 2022-01-05 11:26 UTC (permalink / raw)
  To: 53020; +Cc: Philip McGrath, zimoun

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

It builds with

```
guix build --with-git-url=racket=https://github.com/racket/racket
--with-branch=racket-minimal=master --with-git-url=racket-minimal=
https://github.com/racket/racket --with-branch=racket=master package
```
Where package is racket and racket-minimal respectively.


Neither `/gnu/store/11y27mj1z7mhljw2w3ni7lp2w0a1zhfr-racket-git.master` nor
/gnu/store/gfbyzj9b13kzi438cjfv43hij4zhh2sh-racket-minimal-git.master have
.desktop files in their directory hierarchy. (I might be doing it wrong
though)


mfg

On Wed, 5 Jan 2022, 10:01 zimoun, <zimon.toutoune@gmail.com> wrote:

> Hi Philip,
>
> On Wed, 05 Jan 2022 at 01:06, Philip McGrath <philip@philipmcgrath.com>
> wrote:
>
> > This commit backports a repair by Matthew Flatt for Racket's
> > creation and installation of '.desktop' files in tethered Racket
> > installations. Guix's 'racket' package is structured as a tethered
> > installation, so the Guix package now installs 'drracket.desktop'
> > and 'slideshow.desktop' properly, for example. For further upstream
> > discussion, see: <https://github.com/racket/racket/issues/4079>.
>
> In this mentioned issue, it reads:
>
>         I will send a patch to Guix in the hope of getting more people
>         to try 11ccee3 and ece8b17 before the 8.4 release.
>
> <https://github.com/racket/racket/issues/4079#issuecomment-1005397718>
>
>
> > * gnu/packages/patches/racket-minimal-backport-4079-fix.patch: New
> > patch.
> > * gnu/local.mk (dist_patch_DATA): Add it.
> > * gnu/packages/racket.scm (racket-minimal)[source]: Use it.
> > (extend-layer): Set config-tethered-apps-dir.
>
> So my naive question is: is it worth to include now and not just wait
> for the next Racket 8.4 release? (One or two months if Racket keep the 4
> releases per year schedule)
>
> Other said, for testing new Racket features in the Guix ecosystem, it
> appears to me easier to use transformation:
>
>     guix build racket-minimal --with-commit=ece8b17
>
> (or something along this line :-))
>
> BTW, thanks for bridging the gap between Guix and Racket and it can be
> cool if Guix can help Racket. :-)
>
>
> Cheers,
> simon
>
>
>
>

[-- Attachment #2: Type: text/html, Size: 3387 bytes --]

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

* [bug#53020] [PATCH] gnu: racket: Backport fix for .desktop files.
  2022-01-05 11:26   ` Malte Gerdes
@ 2022-01-05 14:49     ` Philip McGrath
  0 siblings, 0 replies; 6+ messages in thread
From: Philip McGrath @ 2022-01-05 14:49 UTC (permalink / raw)
  To: Malte Gerdes, 53020; +Cc: zimoun

Hi,

On 1/5/22 06:26, Malte Gerdes wrote:
> It builds with
> 
> ```
> guix build --with-git-url=racket=https://github.com/racket/racket 
> <https://github.com/racket/racket> --with-branch=racket-minimal=master 
> --with-git-url=racket-minimal=https://github.com/racket/racket 
> <https://github.com/racket/racket> --with-branch=racket=master package
> ```
> Where package is racket and racket-minimal respectively.
> 
> 
> Neither `/gnu/store/11y27mj1z7mhljw2w3ni7lp2w0a1zhfr-racket-git.master` 
> nor 
> /gnu/store/gfbyzj9b13kzi438cjfv43hij4zhh2sh-racket-minimal-git.master 
> have .desktop files in their directory hierarchy. (I might be doing it 
> wrong though)
> 

That transformation isn't quite enough: it misses the change to 
'extend-layer' in gnu/packages/racket.scm to set the new 
config-tethered-apps-dir key in the built etc/racket/config.rktd (for 
the 'racket' package). (Just in case this is confusing, the fix is to 
'racket-minimal' and 'extend-layer', but the .desktop files show up in 
the fixed version of 'racket'.)

I don't think there's a convenient way to express the change to 
'extend-layer' as a command-line option, which is one reason I sent this 
patch.

-Philip




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

* [bug#53020] [PATCH] gnu: racket: Backport fix for .desktop files.
  2022-01-05  8:59 ` zimoun
  2022-01-05 11:26   ` Malte Gerdes
@ 2022-01-05 16:38   ` Philip McGrath
  2022-02-13 22:07     ` bug#53020: " Philip McGrath
  1 sibling, 1 reply; 6+ messages in thread
From: Philip McGrath @ 2022-01-05 16:38 UTC (permalink / raw)
  To: zimoun, 53020, Malte Frank Gerdes

Hi,

On 1/5/22 03:59, zimoun wrote:
> So my naive question is: is it worth to include now and not just wait
> for the next Racket 8.4 release? (One or two months if Racket keep the 4
> releases per year schedule)
> 
> Other said, for testing new Racket features in the Guix ecosystem, it
> appears to me easier to use transformation:
> 
>      guix build racket-minimal --with-commit=ece8b17
> 
> (or something along this line :-))
> 
> BTW, thanks for bridging the gap between Guix and Racket and it can be
> cool if Guix can help Racket. :-)

Certainly it is debatable, and it would be useful even just to have more 
Guix people try out this patch, but, in my opinion, it is worth it to 
include this in Guix now and not just wait for the Racket 8.4 release 
(in about a month, if all goes according to schedule). (But perhaps 
that's not so surprising that I think so, since I sent this patch.)

I see basically two considerations that distinguish this case from 
recruiting Guix for Racket's pre-release testing, which I generally 
wouldn't suggest.

First, this fixes a very annoying regression in Guix's Racket packaging 
introduced (by me) in Guix commit 
65bad4d03684a32598e0c6fb3449e481e37acfde (the switch to make 'racket' a 
config-tethered installation layer on top of 'racket-minimal'), in 
which, though I didn't notice it at the time, the 'racket' package 
stopped building/installing "share/applications/drracket.desktop". 
Symptoms include DrRacket not showing up in desktop application menus, 
disruption to the handling of ".rkt" files, and various other 
annoyances. (Time will tell, but I suspect it may have been the culprit 
behind some Wayland troubles that non-Guix users haven't been able to 
reproduce.)

Second, the Racket patches are changes to the low-level support for 
"layered" and "tethered" installations. Guix's 'racket' package is a 
major high-level use of that low-level support, e.g. Matthew Flatt 
filled in some missing parts of that low-level support to make the 
above-referenced Guix commit possible. So, while this isn't quite a 
Guix-specific fix, it's fairly close. I'm convinced that this it is an 
improvement, and it seems like a complete solution, but there's still 
time to make any adjustments that might turn out to be needed before the 
8.4 release, when Racket's strong compatibility commitments kick in. In 
the best case, which I think is most likely, Guix users get a fix for an 
annoying packaging bug early; in the worst case, we get a partial fix 
now and a chance to identify anything that still needs to be fixed.

I explained in my reply to Malte why the command-line package 
transformation doesn't quite work: that's not inherently part of these 
considerations, but perhaps it does further suggest that this fix is 
unusually closely connected to the way Guix packages Racket.

-Philip




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

* bug#53020: [PATCH] gnu: racket: Backport fix for .desktop files.
  2022-01-05 16:38   ` Philip McGrath
@ 2022-02-13 22:07     ` Philip McGrath
  0 siblings, 0 replies; 6+ messages in thread
From: Philip McGrath @ 2022-02-13 22:07 UTC (permalink / raw)
  To: zimoun, Malte Frank Gerdes, 53020-close

Racket 8.4 is out now, so I'm closing this in favor of 
<https://issues.guix.gnu.org/53878>.

-Philip




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

end of thread, other threads:[~2022-02-13 22:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-05  6:06 [bug#53020] [PATCH] gnu: racket: Backport fix for .desktop files Philip McGrath
2022-01-05  8:59 ` zimoun
2022-01-05 11:26   ` Malte Gerdes
2022-01-05 14:49     ` Philip McGrath
2022-01-05 16:38   ` Philip McGrath
2022-02-13 22:07     ` bug#53020: " Philip McGrath

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.