From: Ekaitz Zarraga <ekaitz@elenq.tech>
To: 44170@debbugs.gnu.org
Subject: [bug#44170] [PATCH] gnu: Correct Inkscape extension dependencies
Date: Fri, 23 Oct 2020 10:32:35 +0000 [thread overview]
Message-ID: <vhaTS7H_ai2iWTP_d9fg9ZxRqg8MCGrEEnlou7YLr-e-Id0HlC7wGpDzyPjOTGTdmyG6VIRgT2SYNvJuEJ8bUp7du8S2SVAsN9vFlXfGpCo=@elenq.tech> (raw)
Hi,
This patch is the result of the guix-devel discussion about Inkscape's errors during import-export. Looks like the Inkscape package was not fully packaged because the extensions' dependencies were not included. This patch includes python-scour package, one missing dependency needed for optimized SVG exports and adds the needed dependencies to the inkscape package.
Thanks!
From 47b9eaec1715ad44e0156bf29362af47c103d02e Mon Sep 17 00:00:00 2001
From: Ekaitz Zarraga <ekaitz@elenq.tech>
Date: Wed, 21 Oct 2020 19:08:20 +0200
Subject: [PATCH] gnu: Correct Inkscape extension dependencies
* gnu/packages/inkscape.scm (inkscape@1.0.1): Add dependencies.
* gnu/packages/python-xyz.scm (python-scour): New variable.
---
gnu/packages/inkscape.scm | 28 ++++++++++++++++++++++++++--
gnu/packages/python-xyz.scm | 26 ++++++++++++++++++++++++++
2 files changed, 52 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/inkscape.scm b/gnu/packages/inkscape.scm
index 4ac3cf3966..85b4b5020f 100644
--- a/gnu/packages/inkscape.scm
+++ b/gnu/packages/inkscape.scm
@@ -6,6 +6,7 @@
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2020 Boris A. Dekshteyn <boris.dekshteyn@gmail.com>
+;;; Copyright © 2020 Ekaitz Zarraga <ekaitz@elenq.tech>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -44,6 +45,7 @@
#:use-module (gnu packages pdf)
#:use-module (gnu packages popt)
#:use-module (gnu packages python)
+ #:use-module (gnu packages python-xyz)
#:use-module (gnu packages xml)
#:use-module (gnu packages ghostscript)
#:use-module (gnu packages fontutils)
@@ -250,7 +252,25 @@ endif()~%~%"
(add-after 'install 'glib-or-gtk-compile-schemas
(assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-compile-schemas))
(add-after 'glib-or-gtk-compile-schemas 'glib-or-gtk-wrap
- (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap)))))
+ (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap))
+ (add-after 'install 'wrap-program
+ ;; Ensure correct Python at runtime.
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (python (assoc-ref inputs "python"))
+ (file (string-append out "/bin/inkscape"))
+ (path (string-append
+ out
+ "/lib/python"
+ ,(version-major+minor
+ (package-version python))
+ "/site-packages:"
+ (getenv "PYTHONPATH"))))
+ (wrap-program file
+ `("PYTHONPATH" ":" prefix (,path))
+ `("PATH" ":" prefix
+ (,(string-append python "/bin:")))))
+ #t)))))
(inputs
`(("aspell" ,aspell)
("autotrace" ,autotrace)
@@ -283,7 +303,11 @@ endif()~%~%"
("googletest" ,googletest)
("perl" ,perl)
("pkg-config" ,pkg-config)
- ("python" ,python-wrapper)))
+ ("python" ,python-wrapper)
+ ("python-scour" ,python-scour)
+ ("python-pyserial" ,python-pyserial)
+ ("python-numpy" ,python-numpy)
+ ("python-lxml" ,python-lxml)))
(home-page "https://inkscape.org/")
(synopsis "Vector graphics editor")
(description "Inkscape is a vector graphics editor. What sets Inkscape
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 575ce40ac8..fe2e77a338 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -88,6 +88,7 @@
;;; Copyright © 2020 Joseph LaFreniere <joseph@lafreniere.xyz>
;;; Copyright © 2020 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
;;; Copyright © 2020 Bonface Munyoki Kilyungi <bonfacemunyoki@gmail.com>
+;;; Copyright © 2020 Ekaitz Zarraga <ekaitz@elenq.tech>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -22524,3 +22525,28 @@ applications with variable CPU loads).")
(define-public python2-parallel
(package-with-python2 python-parallel))
+
+(define-public python-scour
+ (package
+ (name "python-scour")
+ (version "038.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri
+ (git-reference
+ (url "https://github.com/scour-project/scour")
+ (commit
+ (string-append "v" version))))
+ (sha256
+ (base32 "0rgiypb9ig8x4rl3hfzpy7kwnx1q3064nvlrv4fk0dnp84girn0v"))))
+ (propagated-inputs
+ `(("python-six" ,python-six)))
+ (build-system python-build-system)
+ (home-page "https://github.com/scour-project/scour")
+ (synopsis "Scour is an SVG optimizer/cleaner written in Python")
+ (description "The goal of Scour is to output a file that renderes
+identically at a fraction of the size by removing a lot of redundant
+information created by most SVG editors. Optimization options are typically
+lossless but can be tweaked for more agressive cleaning.")
+ (license license:asl2.0)))
--
2.28.0
next reply other threads:[~2020-10-23 10:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-23 10:32 Ekaitz Zarraga [this message]
2020-10-23 23:03 ` [bug#44170] [PATCH] gnu: Correct Inkscape extension dependencies Ekaitz Zarraga
2020-10-24 19:55 ` Christopher Baines
2020-10-24 21:31 ` Ekaitz Zarraga
2020-10-24 22:14 ` Christopher Baines
2020-10-25 12:23 ` Ekaitz Zarraga
2020-10-26 15:56 ` bug#44170: " 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='vhaTS7H_ai2iWTP_d9fg9ZxRqg8MCGrEEnlou7YLr-e-Id0HlC7wGpDzyPjOTGTdmyG6VIRgT2SYNvJuEJ8bUp7du8S2SVAsN9vFlXfGpCo=@elenq.tech' \
--to=ekaitz@elenq.tech \
--cc=44170@debbugs.gnu.org \
/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).