gnu: xfig: Use G-Expressions.

* gnu/packages/xfig.scm (xfig)[arguments]<#:phases>: Relocate
'strip-bogus-exec-prefix into …
[sources]: … here, as a snippet instead.
[inputs]: Restyle.

Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
This commit is contained in:
Bruno Victal 2023-09-24 16:30:25 +01:00 committed by Liliana Marie Prikler
parent b14f447106
commit 8c01465142
No known key found for this signature in database
GPG key ID: 442A84B8C70E2F87

View file

@ -4,6 +4,7 @@
;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2021 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2021 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2022 Ivan Vilata i Balaguer <ivan@selidor.net> ;;; Copyright © 2022 Ivan Vilata i Balaguer <ivan@selidor.net>
;;; Copyright © 2023 Bruno Victal <mirai@makinata.eu>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
;;; ;;;
@ -24,6 +25,7 @@ (define-module (gnu packages xfig)
#:use-module (guix packages) #:use-module (guix packages)
#:use-module ((guix licenses) #:select (bsd-2)) #:use-module ((guix licenses) #:select (bsd-2))
#:use-module (guix download) #:use-module (guix download)
#:use-module (guix gexp)
#:use-module (guix build-system gnu) #:use-module (guix build-system gnu)
#:use-module (gnu packages) #:use-module (gnu packages)
#:use-module (gnu packages freedesktop) #:use-module (gnu packages freedesktop)
@ -43,27 +45,23 @@ (define-public xfig
name "-" version ".tar.xz")) name "-" version ".tar.xz"))
(sha256 (sha256
(base32 (base32
"0fndgbm1mkqb1sn2v2kj3nx9mxj70jbp31y2bjvzcmmkry0q3k5j")))) "0fndgbm1mkqb1sn2v2kj3nx9mxj70jbp31y2bjvzcmmkry0q3k5j"))
(modules '((guix build utils)))
(snippet
;; The patch-dot-desktop-files phase requires a relative name.
#~(substitute* "xfig.desktop"
(("^(Exec=)/usr/bin/" _ key) key)))))
(build-system gnu-build-system) (build-system gnu-build-system)
(native-inputs (native-inputs
;; For tests. ;; For tests.
(list desktop-file-utils ghostscript)) (list desktop-file-utils ghostscript))
(inputs (inputs
`(("libxaw3d" ,libxaw3d) (list libxaw3d
("libjpeg" ,libjpeg-turbo) libjpeg-turbo
("libpng" ,libpng) libpng
("libxpm" ,libxpm) libxpm
("libx11" ,libx11) libx11
("libxt" ,libxt))) libxt))
(arguments
`(#:phases
(modify-phases %standard-phases
(add-before 'install 'strip-bogus-exec-prefix
(lambda* (#:key outputs #:allow-other-keys)
(substitute* "xfig.desktop"
;; The patch-dot-desktop-files phase requires a relative name.
(("Exec=/usr/bin/xfig") "Exec=xfig"))
#t)))))
(home-page "https://mcj.sourceforge.net/") (home-page "https://mcj.sourceforge.net/")
(synopsis "Interactive drawing tool") (synopsis "Interactive drawing tool")
(description (description