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