From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:33753) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jGkxL-0006uS-Gs for guix-patches@gnu.org; Tue, 24 Mar 2020 10:55:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jGkxK-0005Mb-3R for guix-patches@gnu.org; Tue, 24 Mar 2020 10:55:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49466) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jGkxK-0005MP-0Q for guix-patches@gnu.org; Tue, 24 Mar 2020 10:55:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jGkxJ-0006BE-TT for guix-patches@gnu.org; Tue, 24 Mar 2020 10:55:01 -0400 Subject: [bug#40212] [PATCH] gnu: xorriso: Build gui frontend. Resent-Message-ID: Received: from eggs.gnu.org ([2001:470:142:3::10]:33647) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jGkwk-0006Bb-B2 for guix-patches@gnu.org; Tue, 24 Mar 2020 10:54:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jGkwi-0004nk-TE for guix-patches@gnu.org; Tue, 24 Mar 2020 10:54:26 -0400 Received: from flashner.co.il ([178.62.234.194]:45678) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jGkwi-000497-NO for guix-patches@gnu.org; Tue, 24 Mar 2020 10:54:24 -0400 From: Efraim Flashner Date: Tue, 24 Mar 2020 16:53:21 +0200 Message-Id: <20200324145321.7569-1-efraim@flashner.co.il> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 40212@debbugs.gnu.org Cc: Efraim Flashner * gnu/packages/cdrom.scm (xorriso)[outputs]: Add gui. [arguments]: Add custom phase to install gui files to separate output and wrap the binary. [inputs]: Add tk. --- A while ago I had to burn a CD (or I thought I did) and I realized I didn't know how to do it anymore and for some reason it was easier to build the GUI front-end for xorriso than other options. Adding tk as an input increases the closure size from about 80 MiB to abo= ut 150 MiB so I moved it to a separate output. Creating a separate package entirely would be easier, it's literally just adding "tk" as an input. --- gnu/packages/cdrom.scm | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/gnu/packages/cdrom.scm b/gnu/packages/cdrom.scm index d6127d11f9..c760725ba3 100644 --- a/gnu/packages/cdrom.scm +++ b/gnu/packages/cdrom.scm @@ -3,7 +3,7 @@ ;;; Copyright =C2=A9 2013, 2014 Andreas Enge ;;; Copyright =C2=A9 2015 Taylan Ulrich Bay=C4=B1rl=C4=B1/Kammer ;;; Copyright =C2=A9 2015 Paul van der Walt -;;; Copyright =C2=A9 2015, 2016, 2017, 2018, 2019 Efraim Flashner +;;; Copyright =C2=A9 2015, 2016, 2017, 2018, 2019, 2020 Efraim Flashner = ;;; Copyright =C2=A9 2016 Alex Kost ;;; Copyright =C2=A9 2016 Marius Bakke ;;; Copyright =C2=A9 2017 John Darrington @@ -66,6 +66,7 @@ #:use-module (gnu packages python) #:use-module (gnu packages image) #:use-module (gnu packages photo) + #:use-module (gnu packages tcl) #:use-module (gnu packages video) #:use-module (gnu packages wget) #:use-module (gnu packages xiph)) @@ -156,6 +157,7 @@ libcdio.") (package (name "xorriso") (version "1.5.2") + (outputs '("out" "gui")) (source (origin (method url-fetch) (uri (string-append "mirror://gnu/xorriso/xorriso-" @@ -172,10 +174,31 @@ libcdio.") (let* ((out (assoc-ref outputs "out")) (out-bin (string-append out "/bin"))) (install-file "frontend/grub-mkrescue-sed.sh" out-bin) + #t))) + (add-after 'install 'move-gui-to-separate-output + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out")) + (gui (assoc-ref outputs "gui")) + (name "xorriso-tcltk")) + (mkdir-p (string-append gui "/bin")) + (mkdir-p (string-append gui "/share/info")) + (mkdir-p (string-append gui "/share/man/man1")) + (rename-file + (string-append out "/bin/" name) + (string-append gui "/bin/" name)) + (rename-file + (string-append out "/share/info/" name ".info") + (string-append gui "/share/info/" name ".info")) + (rename-file + (string-append out "/share/man/man1/" name ".1") + (string-append gui "/share/man/man1/" name ".1")) + (wrap-program (string-append gui "/bin/" name) + `("PATH" ":" prefix (,(string-append out "/bin")))) #t)))))) (inputs `(("acl" ,acl) ("readline" ,readline) + ("tk" ,tk) ("zlib" ,zlib))) (home-page "https://www.gnu.org/software/xorriso/") (synopsis "Create, manipulate, burn ISO-9660 file systems") --=20 2.26.0