aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/ghostscript.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2016-07-25 11:36:51 +0200
committerLudovic Courtès <ludo@gnu.org>2016-07-25 11:36:51 +0200
commit71eba3ebc1b37b1623ad1cf29fadd711adafc043 (patch)
tree584c4dd5563b952f5a675d28b7a5585ba7a5c416 /gnu/packages/ghostscript.scm
parent1abdc167d3a602e3a35374762ac1ed4d7e9f0593 (diff)
downloadpatches-71eba3ebc1b37b1623ad1cf29fadd711adafc043.tar
patches-71eba3ebc1b37b1623ad1cf29fadd711adafc043.tar.gz
gnu: Add 'ghostscript-gs' and 'ghostscript-gs-with-x'.
* gnu/packages/ghostscript.scm (ghostscript-wrapper): New procedure. (ghostscript-gs, ghostscript-gs/x): New variables.
Diffstat (limited to 'gnu/packages/ghostscript.scm')
-rw-r--r--gnu/packages/ghostscript.scm37
1 files changed, 36 insertions, 1 deletions
diff --git a/gnu/packages/ghostscript.scm b/gnu/packages/ghostscript.scm
index 417f47e79a..f013a734e5 100644
--- a/gnu/packages/ghostscript.scm
+++ b/gnu/packages/ghostscript.scm
@@ -33,7 +33,8 @@
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix download)
- #:use-module (guix build-system gnu))
+ #:use-module (guix build-system gnu)
+ #:use-module (guix build-system trivial))
(define-public lcms
(package
@@ -198,6 +199,40 @@ output file formats and printers.")
("libxt" ,libxt)
,@(package-inputs ghostscript)))))
+(define (ghostscript-wrapper name ghostscript)
+ ;; Return a GHOSTSCRIPT wrapper that provides the 'gs' command.
+ ;; See <https://lists.gnu.org/archive/html/guix-devel/2016-07/msg00987.html>.
+ (package
+ (name name)
+ (version (package-version ghostscript))
+ (source #f)
+ (build-system trivial-build-system)
+ (inputs `(("ghostscript" ,ghostscript)))
+ (arguments
+ `(#:modules ((guix build utils))
+ #:builder (begin
+ (use-modules (guix build utils))
+
+ (let* ((out (assoc-ref %outputs "out"))
+ (bin (string-append out "/bin"))
+ (gs (assoc-ref %build-inputs "ghostscript")))
+ (mkdir-p bin)
+ (with-directory-excursion bin
+ (symlink (string-append gs "/bin/gsc") "gs")
+ #t)))))
+ (synopsis "Wrapper providing Ghostscript's 'gs' command")
+ (description
+ "This package provides the @command{gs} command, which used to be
+provided by Ghostscript itself and no longer is.")
+ (license (package-license ghostscript))
+ (home-page (package-home-page ghostscript))))
+
+(define-public ghostscript-gs
+ (ghostscript-wrapper "ghostscript-gs" ghostscript))
+
+(define-public ghostscript-gs/x
+ (ghostscript-wrapper "ghostscript-gs-with-x" ghostscript/x))
+
(define-public ijs
(package
(name "ijs")