From 649c89e5862e1ed887f5fd863ef7bb32f97bbe74 Mon Sep 17 00:00:00 2001 From: Chris Marusich Date: Sun, 7 Mar 2021 17:42:37 -0800 Subject: [PATCH] gnu: emacs: Use librsvg and gtk+ on x86_64-linux only. * gnu/packages/emacs.scm (emacs)[inputs]: Only add librsvg when the %current-target-system or %current-system is "x86_64-linux". This avoids pulling rust into the transitive closure of inputs on systems where Rust support is currently lacking. --- gnu/packages/emacs.scm | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index 98061c93ae0..f0797ae2347 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 @@ -219,7 +220,6 @@ ;; TODO: Add the optional dependencies. ("libx11" ,libx11) - ("gtk+" ,gtk+) ("cairo" ,cairo) ("pango" ,pango) ("harfbuzz" ,harfbuzz) @@ -236,7 +236,6 @@ ("libpng" ,libpng) ("zlib" ,zlib) - ("librsvg" ,librsvg) ("libxpm" ,libxpm) ("libxml2" ,libxml2) ("libice" ,libice) @@ -246,7 +245,15 @@ ;; multilingualization support ("libotf" ,libotf) - ("m17n-lib" ,m17n-lib))) + ("m17n-lib" ,m17n-lib) + + ;; These are optional dependencies that pull in rust. Rust is not + ;; supported well on every architecture yet. + ,@(match (or (%current-target-system) + (%current-system)) + ("x86_64-linux" `(("gtk+" ,gtk+) + ("librsvg" ,librsvg))) + (_ '())))) (native-inputs `(("guix-emacs.el" ,(search-auxiliary-file "emacs/guix-emacs.el")) ("pkg-config" ,pkg-config) -- 2.26.2