gnu: a2ps: Improve package style.
* gnu/packages/pretty-print.scm (a2ps)[origin]<snippet>: Use G-expressions. [arguments]<#:phases>: Use G-expression and SEARCH-INPUT-FILE.
This commit is contained in:
		
							parent
							
								
									4239b6ac85
								
							
						
					
					
						commit
						c072084fed
					
				
					 1 changed files with 40 additions and 39 deletions
				
			
		| 
						 | 
				
			
			@ -27,6 +27,7 @@
 | 
			
		|||
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 | 
			
		||||
(define-module (gnu packages pretty-print)
 | 
			
		||||
  #:use-module (guix gexp)
 | 
			
		||||
  #:use-module (guix packages)
 | 
			
		||||
  #:use-module (guix licenses)
 | 
			
		||||
  #:use-module (guix git-download)
 | 
			
		||||
| 
						 | 
				
			
			@ -65,14 +66,15 @@
 | 
			
		|||
              (modules '((guix build utils)))
 | 
			
		||||
              (snippet
 | 
			
		||||
               ;; Remove timestamp from the installed 'README' file.
 | 
			
		||||
               '(begin
 | 
			
		||||
               #~(begin
 | 
			
		||||
                   (substitute* "etc/README.in"
 | 
			
		||||
                     (("@date@")
 | 
			
		||||
                      "1st of some month, sometime after 1970"))))))
 | 
			
		||||
    (build-system gnu-build-system)
 | 
			
		||||
    (arguments
 | 
			
		||||
     '(#:phases
 | 
			
		||||
       (modify-phases %standard-phases
 | 
			
		||||
     (list
 | 
			
		||||
      #:phases
 | 
			
		||||
      #~(modify-phases %standard-phases
 | 
			
		||||
          (add-after 'unpack 'skip-failing-tests
 | 
			
		||||
            (lambda _
 | 
			
		||||
              (substitute* (list "tests/Makefile.am" "tests/Makefile.in")
 | 
			
		||||
| 
						 | 
				
			
			@ -86,13 +88,12 @@
 | 
			
		|||
                    "tests/styles.tst")
 | 
			
		||||
                (("/bin/rm") (which "rm")))))
 | 
			
		||||
          (add-before 'check 'patch-test-files
 | 
			
		||||
           ;; Alternatively, we could unpatch the shebangs in tstfiles
 | 
			
		||||
            ;; Alternatively, we could unpatch the shebangs in tst files.
 | 
			
		||||
            (lambda* (#:key inputs #:allow-other-keys)
 | 
			
		||||
             (let ((perl (assoc-ref inputs "perl")))
 | 
			
		||||
              (substitute* '("tests/ps-ref/includeres.ps"
 | 
			
		||||
                             "tests/gps-ref/includeres.ps")
 | 
			
		||||
                (("/usr/local/bin/perl")
 | 
			
		||||
                  (string-append perl "/bin/perl"))))
 | 
			
		||||
                 (search-input-file inputs "/bin/perl")))
 | 
			
		||||
              ;; Some of the reference postscript contain a 'version 3'
 | 
			
		||||
              ;; string that in inconsistent with the source text in the
 | 
			
		||||
              ;; tstfiles directory.  Erroneous search-and-replace?
 | 
			
		||||
| 
						 | 
				
			
			@ -103,8 +104,8 @@
 | 
			
		|||
                (("version 3") "version 2"))
 | 
			
		||||
              (substitute* '("tests/ps-ref/psmandup.ps"
 | 
			
		||||
                             "tests/gps-ref/psmandup.ps")
 | 
			
		||||
               (("#! */bin/sh") (string-append
 | 
			
		||||
                                 "#!" (which "sh")))))))))
 | 
			
		||||
                (("#! */bin/sh")
 | 
			
		||||
                 (string-append "#!" (which "sh")))))))))
 | 
			
		||||
    (native-inputs
 | 
			
		||||
     (list gperf groff perl pkg-config))
 | 
			
		||||
    (inputs
 | 
			
		||||
| 
						 | 
				
			
			@ -116,7 +117,7 @@
 | 
			
		|||
printing.  It accomplishes this by being able to delegate files to external
 | 
			
		||||
handlers, such as Groff and Gzip.  It handles as many steps as is necessary to
 | 
			
		||||
produce a pretty-printed file.  It also includes some extra abilities for
 | 
			
		||||
special cases, such as pretty-printing \"--help\" output.")
 | 
			
		||||
special cases, such as pretty-printing @samp{-help} output.")
 | 
			
		||||
    (license gpl3+)))
 | 
			
		||||
 | 
			
		||||
(define-public trueprint
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Reference in a new issue