From ae748e9ba6035bf6b91f5803cfc5122ffca1d2e7 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Tue, 20 Aug 2024 17:01:37 +0200 Subject: [PATCH] gnu: sugar-toolkit-gtk3: Add missing inputs and patch references. * gnu/packages/sugar.scm (sugar-toolkit-gtk3)[arguments]: Add phase 'patch-references. [inputs]: Add shared-mime-info and unzip. Change-Id: Id34b0e8696b655b4788cd5d40b1ca78a5eb34597 --- gnu/packages/sugar.scm | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/gnu/packages/sugar.scm b/gnu/packages/sugar.scm index 5db070a72d..25cfbad13e 100644 --- a/gnu/packages/sugar.scm +++ b/gnu/packages/sugar.scm @@ -23,6 +23,7 @@ (define-module (gnu packages sugar) #:use-module (gnu packages autotools) #:use-module (gnu packages base) #:use-module (gnu packages bash) + #:use-module (gnu packages compression) #:use-module (gnu packages freedesktop) #:use-module (gnu packages game-development) #:use-module (gnu packages gettext) @@ -329,6 +330,23 @@ (define-public sugar-toolkit-gtk3 (substitute* "autogen.sh" (("^\"\\$srcdir/configure" m) (string-append "#" m))))) + (add-after 'unpack 'patch-references + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "src/sugar3/eggsmclient-xsmp.c" + (("/bin/rm") (search-input-file inputs "/bin/rm"))) + (substitute* "src/sugar3/mime.py" + (("'/usr/local/share/'" m) + (string-append m ", '/run/current-system/profile/share'"))) + (substitute* "src/sugar3/bundle/activitybundle.py" + (("'update-mime-database', mime_dir") + (string-append "'" + (search-input-file inputs "/bin/update-mime-database") + "', mime_dir"))) + (substitute* "src/sugar3/bundle/bundle.py" + (("'unzip', '-o'") + (string-append "'" + (search-input-file inputs "/bin/unzip") + "', '-o'"))))) (add-after 'glib-or-gtk-wrap 'python-and-gi-wrap (lambda* (#:key inputs outputs #:allow-other-keys) (wrap-program (search-input-file outputs "bin/sugar-activity3") @@ -345,7 +363,9 @@ (define-public sugar-toolkit-gtk3 libx11 libxfixes libxi - python)) + python + shared-mime-info + unzip)) (propagated-inputs ;; The gi typelib files are needed by users of this library. (list gdk-pixbuf