unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Chris Marusich <cmmarusich@gmail.com>
To: Mark H Weaver <mhw@netris.org>,
	Ricardo Wurmus <rekado@elephly.net>,
	Christopher Baines <mail@cbaines.net>,
	Leo Famulari <leo@famulari.name>
Cc: guix-devel@gnu.org
Subject: Re: core-updates: Emacs is only supported on x86_64-linux?
Date: Tue, 09 Mar 2021 00:20:15 -0800	[thread overview]
Message-ID: <87v9a04u2o.fsf@gmail.com> (raw)
In-Reply-To: <87zgzc50db.fsf_-_@gmail.com> (Chris Marusich's message of "Mon,  08 Mar 2021 22:04:16 -0800")


[-- Attachment #1.1: Type: text/plain, Size: 728 bytes --]

Chris Marusich <cmmarusich@gmail.com> writes:

> How about a patch like the following - would it be acceptable to you?

Actually, I've realized that that patch wasn't quite right.  I've
attached a corrected version to this email.

Although the %current-system parameter will look like "x86_64-linux"
because it's a Guix system name, the %current-target-system parameter
will look like "x86_64-linux-gnu" (or whatever the user happens to
supply, e.g. via the --target option of "guix build") because it's a GNU
triplet.  The attached patch accomplishes the same goal as before, but
it uses string-prefix? to check whether we're building for an x86_64
machine, rather than matching on an exact string.

-- 
Chris

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-gnu-Restore-emacs-supported-systems.patch --]
[-- Type: text/x-patch, Size: 3838 bytes --]

From 0eb5583f243a399293ae52a3e78ccf7d3a153a47 Mon Sep 17 00:00:00 2001
From: Chris Marusich <cmmarusich@gmail.com>
Date: Mon, 8 Mar 2021 23:13:39 -0800
Subject: [PATCH] gnu: Restore emacs' supported systems.

Recently, librsvg was updated to depend upon rust.  That change inadvertently
restricted the "supported" systems of emacs (among other package) to
x86_64-linux only, since that is the only system declared in the rust
package's list of supported systems.  This unintentionally made emacs
unavailable on all other systems.

This change fixes that by removing the rust dependency from some packages.
The packages remain unchanged from the perspective of an x86_64-linux system,
but from the perspective of other systems, the packages are now supported
again (albeit without certain optional SVG features).

* gnu/packages/gtk.scm (gtk+, gtk+-2)[propagated-inputs]: If compiling for
x86_64, use gdk-pixbuf+svg as the "gdk-pixbuf" input, as usual.  Otherwise,
use gdk-pixbuf, which avoids adding librsvg (thus rust) to the closure of
inputs.  Note that both gtk+ and gtk+-2 are in the transitive closure of
inputs of emacs, so these two changes are necessary.
* gnu/packages/emacs (emacs)[inputs]: If compiling for x86_64, add librsvg to
the inputs, as usual.  Otherwise, do not add it, which avoids adding rust to
the closure of inputs.
---
 gnu/packages/emacs.scm |  8 +++++++-
 gnu/packages/gtk.scm   | 14 ++++++++++++--
 2 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 98061c93ae0..fe5b3b25b3d 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -71,6 +71,7 @@
   #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg)
   #:use-module (guix utils)
+  #:use-module (ice-9 match)
   #:use-module (srfi srfi-1))
 
 (define-public emacs
@@ -236,7 +237,12 @@
        ("libpng" ,libpng)
        ("zlib" ,zlib)
 
-       ("librsvg" ,librsvg)
+       ;; librsvg is an optional dependency that pulls in rust.  Rust is not
+       ;; supported well on every architecture yet.
+       ,@(if (string-prefix? "x86_64" (or (%current-target-system)
+                                          (%current-system)))
+             `(("librsvg" ,librsvg))
+             '())
        ("libxpm" ,libxpm)
        ("libxml2" ,libxml2)
        ("libice" ,libice)
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index f458366fb6a..d396425d9a6 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -776,7 +776,12 @@ is part of the GNOME accessibility project.")
    (outputs '("out" "bin" "doc"))
    (propagated-inputs
     `(("atk" ,atk)
-      ("gdk-pixbuf" ,gdk-pixbuf+svg)
+      ;; SVG support is optional and requires librsvg, which pulls in rust.
+      ;; Rust is not supported well on every architecture yet.
+      ("gdk-pixbuf" ,(if (string-prefix? "x86_64" (or (%current-target-system)
+                                                      (%current-system)))
+                         gdk-pixbuf+svg
+                         gdk-pixbuf))
       ("pango" ,pango)))
    (inputs
     `(("cups" ,cups)
@@ -843,7 +848,12 @@ application suites.")
    (propagated-inputs
     `(("at-spi2-atk" ,at-spi2-atk)
       ("atk" ,atk)
-      ("gdk-pixbuf" ,gdk-pixbuf+svg)
+      ;; SVG support is optional and requires librsvg, which pulls in rust.
+      ;; Rust is not supported well on every architecture yet.
+      ("gdk-pixbuf" ,(if (string-prefix? "x86_64" (or (%current-target-system)
+                                                      (%current-system)))
+                         gdk-pixbuf+svg
+                         gdk-pixbuf))
       ("libepoxy" ,libepoxy)
       ("libxcursor" ,libxcursor)
       ("libxi" ,libxi)
-- 
2.26.2


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

  reply	other threads:[~2021-03-09  8:20 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-07  7:56 core-updates: Emacs is only supported on x86_64-linux? Chris Marusich
2021-03-07 10:46 ` Mark H Weaver
2021-03-07 23:40   ` Leo Famulari
2021-03-08  2:53   ` Chris Marusich
2021-03-08  5:29     ` Mark H Weaver
2021-03-08  7:14       ` Ricardo Wurmus
2021-03-10  0:09         ` Mark H Weaver
2021-03-08  7:19       ` Ricardo Wurmus
2021-03-09  6:04       ` Chris Marusich
2021-03-09  8:20         ` Chris Marusich [this message]
2021-03-10  0:05           ` Mark H Weaver
2021-03-08 22:33     ` Christopher Baines
2021-03-09 23:47       ` Mark H Weaver
2021-03-07 13:41 ` Christopher Baines

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=87v9a04u2o.fsf@gmail.com \
    --to=cmmarusich@gmail.com \
    --cc=guix-devel@gnu.org \
    --cc=leo@famulari.name \
    --cc=mail@cbaines.net \
    --cc=mhw@netris.org \
    --cc=rekado@elephly.net \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).