| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 |
|
| 19 | (define-module (gnu packages patchutils)
|
| 20 | #:use-module (guix packages)
|
| 21 | #:use-module (guix licenses)
|
| 22 | #:use-module (guix download)
|
| 23 | #:use-module (guix build-system gnu)
|
| 24 | #:use-module (gnu packages)
|
| 25 | #:use-module (gnu packages ed)
|
| 26 | #:use-module (gnu packages base)
|
| 27 | #:use-module (gnu packages bash)
|
| 28 | #:use-module (gnu packages file)
|
| 29 | #:use-module (gnu packages gawk)
|
| 30 | #:use-module (gnu packages less)
|
| 31 | #:use-module (gnu packages perl)
|
| 32 | #:use-module (gnu packages xml))
|
| 33 |
|
| 34 | (define-public patchutils
|
| 35 | (package
|
| 36 | (name "patchutils")
|
| 37 | (version "0.3.3")
|
| 38 | (source
|
| 39 | (origin
|
| 40 | (method url-fetch)
|
| 41 | (uri (string-append "http://cyberelk.net/tim/data/patchutils/stable/"
|
| 42 | name "-" version ".tar.xz"))
|
| 43 | (sha256
|
| 44 | (base32
|
| 45 | "0g5df00cj4nczrmr4k791l7la0sq2wnf8rn981fsrz1f3d2yix4i"))
|
| 46 | (patches
|
| 47 | (list (search-patch "patchutils-xfail-gendiff-tests.patch")))))
|
| 48 | (build-system gnu-build-system)
|
| 49 | (inputs `(("perl" ,perl)))
|
| 50 | (arguments
|
| 51 | '(#:parallel-tests? #f
|
| 52 | #:phases (alist-cons-before
|
| 53 | 'check 'patch-test-scripts
|
| 54 | (lambda _
|
| 55 | (let ((echo (which "echo")))
|
| 56 | (substitute*
|
| 57 | (find-files "tests" "^run-test$")
|
| 58 | (("/bin/echo") echo))))
|
| 59 | (alist-cons-after
|
| 60 | 'install 'wrap-program
|
| 61 | |
| 62 | (lambda* (#:key inputs outputs #:allow-other-keys)
|
| 63 | (let* ((out (assoc-ref outputs "out"))
|
| 64 | (diffutils (assoc-ref inputs "diffutils"))
|
| 65 | (sed (assoc-ref inputs "sed"))
|
| 66 | (gawk (assoc-ref inputs "gawk")))
|
| 67 | (for-each
|
| 68 | (lambda (prog)
|
| 69 | (wrap-program (string-append out "/bin/" prog)
|
| 70 | `("PATH" ":" prefix
|
| 71 | ,(map (lambda (dir)
|
| 72 | (string-append dir "/bin"))
|
| 73 | (list diffutils sed gawk)))))
|
| 74 | '("dehtmldiff" "editdiff" "espdiff"))))
|
| 75 | %standard-phases))))
|
| 76 | (home-page "http://cyberelk.net/tim/software/patchutils")
|
| 77 | (synopsis "Collection of tools for manipulating patch files")
|
| 78 | (description
|
| 79 | "Patchutils is a collection of programs that can manipulate patch files
|
| 80 | in useful ways such as interpolating between two pre-patches, combining two
|
| 81 | incremental patches, fixing line numbers in hand-edited patches, and simply
|
| 82 | listing the files modified by a patch.")
|
| 83 | (license gpl2+)))
|
| 84 |
|
| 85 | (define-public quilt
|
| 86 | (package
|
| 87 | (name "quilt")
|
| 88 | (version "0.61")
|
| 89 | (source
|
| 90 | (origin
|
| 91 | (method url-fetch)
|
| 92 | (uri (string-append "mirror://savannah/quilt/"
|
| 93 | name "-" version ".tar.gz"))
|
| 94 | (sha256
|
| 95 | (base32
|
| 96 | "1hwz58djkq9cv46sjwxbp2v5m8yjr41kd0nm1zm1xm6418khmv0y"))))
|
| 97 | (build-system gnu-build-system)
|
| 98 | (inputs `(("perl" ,perl)
|
| 99 | ("less" ,less)
|
| 100 | ("file" ,file)
|
| 101 | ("ed" ,ed)))
|
| 102 | (arguments
|
| 103 | '(#:parallel-tests? #f
|
| 104 | #:phases
|
| 105 | (alist-cons-before
|
| 106 | 'check 'patch-tests
|
| 107 | (lambda _
|
| 108 | (substitute*
|
| 109 | '("test/run"
|
| 110 | "test/edit.test")
|
| 111 | (("/bin/sh") (which "sh")))
|
| 112 | |
| 113 | (delete-file "test/mail.test"))
|
| 114 | (alist-cons-after
|
| 115 | 'install 'wrap-program
|
| 116 | |
| 117 | |
| 118 | |
| 119 | (lambda* (#:key inputs outputs #:allow-other-keys)
|
| 120 | (let* ((out (assoc-ref outputs "out"))
|
| 121 | (coreutils (assoc-ref inputs "coreutils"))
|
| 122 | (diffutils (assoc-ref inputs "diffutils"))
|
| 123 | (findutils (assoc-ref inputs "findutils"))
|
| 124 | (less (assoc-ref inputs "less"))
|
| 125 | (file (assoc-ref inputs "file"))
|
| 126 | (ed (assoc-ref inputs "ed"))
|
| 127 | (sed (assoc-ref inputs "sed"))
|
| 128 | (bash (assoc-ref inputs "bash"))
|
| 129 | (grep (assoc-ref inputs "grep")))
|
| 130 | (wrap-program (string-append out "/bin/quilt")
|
| 131 | `("PATH" ":" prefix
|
| 132 | ,(map (lambda (dir)
|
| 133 | (string-append dir "/bin"))
|
| 134 | (list coreutils diffutils findutils
|
| 135 | less file ed sed bash grep))))))
|
| 136 | %standard-phases))))
|
| 137 | (home-page "https://savannah.nongnu.org/projects/quilt/")
|
| 138 | (synopsis "Script for managing patches to software")
|
| 139 | (description
|
| 140 | "Quilt allows you to easily manage large numbers of patches by keeping
|
| 141 | track of the changes each patch makes. Patches can be applied, un-applied,
|
| 142 | refreshed, and more.")
|
| 143 | (license gpl2)))
|
| 144 |
|
| 145 | (define-public colordiff
|
| 146 | (package
|
| 147 | (name "colordiff")
|
| 148 | (version "1.0.13")
|
| 149 | (source
|
| 150 | (origin
|
| 151 | (method url-fetch)
|
| 152 | (uri (string-append "http://www.colordiff.org/colordiff-"
|
| 153 | version ".tar.gz"))
|
| 154 | (sha256
|
| 155 | (base32 "0akcz1p3klsjnhwcqdfq4grs6paljc5c0jzr3mqla5f862hhaa6f"))))
|
| 156 | (build-system gnu-build-system)
|
| 157 | (arguments
|
| 158 | `(#:tests? #f
|
| 159 | #:make-flags (list (string-append "DESTDIR=" (assoc-ref %outputs "out"))
|
| 160 | "INSTALL_DIR=/bin" "MAN_DIR=/share/man/man1")
|
| 161 | #:phases
|
| 162 | (alist-delete 'configure
|
| 163 | (alist-delete 'build %standard-phases))))
|
| 164 | (inputs
|
| 165 | `(("perl" ,perl)
|
| 166 | ("xmlto" ,xmlto)))
|
| 167 | (home-page "http://www.colordiff.org")
|
| 168 | (synopsis "Display diff output with colors")
|
| 169 | (description
|
| 170 | "Colordiff is Perl script wrapper on top of diff command which provides
|
| 171 | 'syntax highlighting' for various patch formats.")
|
| 172 | (license gpl2+)))
|