- (propagated-inputs `(("ghostscript" ,ghostscript/x)))
- (inputs `(("libx11" ,libx11)
+ (arguments
+ '(#:phases (modify-phases %standard-phases
+ (add-before 'configure 'set-gs-file-name
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; Set the value of 'GV.gsInterpreter' in the generated
+ ;; 'gv_system.ad' file.
+ (let ((gs (assoc-ref inputs "ghostscript")))
+ (with-fluids ((%default-port-encoding "ISO-8859-1"))
+ (substitute* "src/Makefile.in"
+ (("GV\\.gsInterpreter:([[:blank:]]+)gs" _ blank)
+ (string-append "GV.gsInterpreter:" blank
+ gs "/bin/gs"))
+ (("GV\\.gsCmd([[:alpha:]]+):([[:blank:]]+)gs" _
+ command blank)
+ (string-append "GV.gsCmd" command ":"
+ blank gs "/bin/gs"))))
+ #t))))))
+ (inputs `(("ghostscript" ,ghostscript/x)
+ ("libx11" ,libx11)