| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 |
|
| 21 | (define-module (gnu packages patchutils)
|
| 22 | #:use-module (guix packages)
|
| 23 | #:use-module (guix licenses)
|
| 24 | #:use-module (guix download)
|
| 25 | #:use-module (guix git-download)
|
| 26 | #:use-module (guix build-system gnu)
|
| 27 | #:use-module (guix build-system python)
|
| 28 | #:use-module (gnu packages)
|
| 29 | #:use-module (gnu packages ed)
|
| 30 | #:use-module (gnu packages base)
|
| 31 | #:use-module (gnu packages bash)
|
| 32 | #:use-module (gnu packages file)
|
| 33 | #:use-module (gnu packages gawk)
|
| 34 | #:use-module (gnu packages gettext)
|
| 35 | #:use-module (gnu packages less)
|
| 36 | #:use-module (gnu packages mail)
|
| 37 | #:use-module (gnu packages ncurses)
|
| 38 | #:use-module (gnu packages perl)
|
| 39 | #:use-module (gnu packages python)
|
| 40 | #:use-module (gnu packages version-control)
|
| 41 | #:use-module (gnu packages xml))
|
| 42 |
|
| 43 | (define-public patchutils
|
| 44 | (package
|
| 45 | (name "patchutils")
|
| 46 | (version "0.3.4")
|
| 47 | (source
|
| 48 | (origin
|
| 49 | (method url-fetch)
|
| 50 | (uri (string-append "http://cyberelk.net/tim/data/patchutils/stable/"
|
| 51 | name "-" version ".tar.xz"))
|
| 52 | (sha256
|
| 53 | (base32
|
| 54 | "0xp8mcfyi5nmb5a2zi5ibmyshxkb1zv1dgmnyn413m7ahgdx8mfg"))
|
| 55 | (patches (search-patches "patchutils-test-perms.patch"))))
|
| 56 | (build-system gnu-build-system)
|
| 57 | (inputs `(("perl" ,perl)))
|
| 58 | (arguments
|
| 59 | '(#:parallel-tests? #f
|
| 60 | #:phases
|
| 61 | (modify-phases %standard-phases
|
| 62 | (add-before 'check 'patch-test-scripts
|
| 63 | (lambda _
|
| 64 | (substitute* (find-files "tests" "^run-test$")
|
| 65 | (("/bin/echo") (which "echo")))
|
| 66 | #t))
|
| 67 | (add-after 'install 'wrap-program
|
| 68 | |
| 69 | (lambda* (#:key inputs outputs #:allow-other-keys)
|
| 70 | (let* ((out (assoc-ref outputs "out"))
|
| 71 | (diffutils (assoc-ref inputs "diffutils"))
|
| 72 | (sed (assoc-ref inputs "sed"))
|
| 73 | (gawk (assoc-ref inputs "gawk")))
|
| 74 | (for-each
|
| 75 | (lambda (prog)
|
| 76 | (wrap-program (string-append out "/bin/" prog)
|
| 77 | `("PATH" ":" prefix
|
| 78 | ,(map (lambda (dir)
|
| 79 | (string-append dir "/bin"))
|
| 80 | (list diffutils sed gawk)))))
|
| 81 | '("dehtmldiff" "editdiff" "espdiff")))
|
| 82 | #t)))))
|
| 83 | (home-page "http://cyberelk.net/tim/software/patchutils")
|
| 84 | (synopsis "Collection of tools for manipulating patch files")
|
| 85 | (description
|
| 86 | "Patchutils is a collection of programs that can manipulate patch files
|
| 87 | in useful ways such as interpolating between two pre-patches, combining two
|
| 88 | incremental patches, fixing line numbers in hand-edited patches, and simply
|
| 89 | listing the files modified by a patch.")
|
| 90 | (license gpl2+)))
|
| 91 |
|
| 92 | (define-public quilt
|
| 93 | (package
|
| 94 | (name "quilt")
|
| 95 | (version "0.65")
|
| 96 | (source
|
| 97 | (origin
|
| 98 | (method url-fetch)
|
| 99 | (uri (string-append "mirror://savannah/quilt/"
|
| 100 | name "-" version ".tar.gz"))
|
| 101 | (sha256
|
| 102 | (base32
|
| 103 | "06b816m2gz9jfif7k9v2hrm7fz76zjg5pavf7hd3ifybwn4cgjzn"))
|
| 104 | (patches (search-patches "quilt-test-fix-regex.patch"
|
| 105 | "quilt-getopt-second-separator.patch"
|
| 106 | "quilt-getopt-nondigit-param.patch"))))
|
| 107 | (build-system gnu-build-system)
|
| 108 | (native-inputs
|
| 109 | `(("gettext" ,gnu-gettext)))
|
| 110 | (inputs `(("perl" ,perl)
|
| 111 | ("less" ,less)
|
| 112 | ("file" ,file)
|
| 113 | ("ed" ,ed)
|
| 114 | ("diffstat" ,diffstat)))
|
| 115 | (arguments
|
| 116 | '(#:parallel-tests? #f
|
| 117 | #:phases
|
| 118 | (modify-phases %standard-phases
|
| 119 | (add-before 'check 'patch-tests
|
| 120 | (lambda _
|
| 121 | (substitute*
|
| 122 | '("test/run"
|
| 123 | "test/edit.test")
|
| 124 | (("/bin/sh") (which "sh")))
|
| 125 | #t))
|
| 126 | (add-after 'install 'wrap-program
|
| 127 | |
| 128 | |
| 129 | |
| 130 | (lambda* (#:key inputs outputs #:allow-other-keys)
|
| 131 | (let* ((out (assoc-ref outputs "out"))
|
| 132 | (coreutils (assoc-ref inputs "coreutils"))
|
| 133 | (diffutils (assoc-ref inputs "diffutils"))
|
| 134 | (findutils (assoc-ref inputs "findutils"))
|
| 135 | (diffstat (assoc-ref inputs "diffstat"))
|
| 136 | (less (assoc-ref inputs "less"))
|
| 137 | (file (assoc-ref inputs "file"))
|
| 138 | (ed (assoc-ref inputs "ed"))
|
| 139 | (sed (assoc-ref inputs "sed"))
|
| 140 | (bash (assoc-ref inputs "bash"))
|
| 141 | (grep (assoc-ref inputs "grep")))
|
| 142 | (wrap-program (string-append out "/bin/quilt")
|
| 143 | `("PATH" ":" prefix
|
| 144 | ,(map (lambda (dir)
|
| 145 | (string-append dir "/bin"))
|
| 146 | (list coreutils diffutils findutils
|
| 147 | less file ed sed bash grep
|
| 148 | diffstat)))))
|
| 149 | #t)))))
|
| 150 | (home-page "https://savannah.nongnu.org/projects/quilt/")
|
| 151 | (synopsis "Script for managing patches to software")
|
| 152 | (description
|
| 153 | "Quilt allows you to easily manage large numbers of patches by keeping
|
| 154 | track of the changes each patch makes. Patches can be applied, un-applied,
|
| 155 | refreshed, and more.")
|
| 156 | (license gpl2)))
|
| 157 |
|
| 158 | (define-public colordiff
|
| 159 | (package
|
| 160 | (name "colordiff")
|
| 161 | (version "1.0.18")
|
| 162 | (source
|
| 163 | (origin
|
| 164 | (method url-fetch)
|
| 165 | (uri (list (string-append "https://www.colordiff.org/colordiff-"
|
| 166 | version ".tar.gz")
|
| 167 | (string-append "http://www.colordiff.org/archive/colordiff-"
|
| 168 | version ".tar.gz")))
|
| 169 | (sha256
|
| 170 | (base32
|
| 171 | "1q6n60n4b9fnzccxyxv04mxjsql4ddq17vl2c74ijvjdhpcfrkr9"))))
|
| 172 | (build-system gnu-build-system)
|
| 173 | (arguments
|
| 174 | `(#:tests? #f |
| 175 | #:make-flags (list (string-append "DESTDIR=" (assoc-ref %outputs "out"))
|
| 176 | "INSTALL_DIR=/bin" "MAN_DIR=/share/man/man1")
|
| 177 | #:phases
|
| 178 | (modify-phases %standard-phases
|
| 179 | (delete 'configure) |
| 180 | (delete 'build)))) |
| 181 | (inputs
|
| 182 | `(("perl" ,perl)
|
| 183 | ("xmlto" ,xmlto)))
|
| 184 | (home-page "https://www.colordiff.org")
|
| 185 | (synopsis "Display diff output with colors")
|
| 186 | (description
|
| 187 | "Colordiff is Perl script wrapper on top of diff command which provides
|
| 188 | 'syntax highlighting' for various patch formats.")
|
| 189 | (license gpl2+)))
|
| 190 |
|
| 191 | (define-public patches
|
| 192 | (let ((commit "ef1b8a7d954b82ed4af3a08fd63d2085d19090ef"))
|
| 193 | (package
|
| 194 | (name "patches")
|
| 195 | (home-page "https://github.com/stefanha/patches")
|
| 196 | (version (string-append "0.0-1." (string-take commit 7)))
|
| 197 | (source (origin
|
| 198 | (method git-fetch)
|
| 199 | (uri (git-reference
|
| 200 | (url home-page)
|
| 201 | (commit commit)))
|
| 202 | (sha256
|
| 203 | (base32
|
| 204 | "11rdmhv0l1s8nqb20ywmw2zqizczch2p62qf9apyx5wqgxlnjshk"))
|
| 205 | (file-name (string-append name "-"version "-checkout"))))
|
| 206 | (build-system python-build-system)
|
| 207 | (inputs `(("python-notmuch" ,python2-notmuch)))
|
| 208 | (arguments
|
| 209 | `(#:tests? #f |
| 210 | #:python ,python-2)) |
| 211 | (synopsis "Patch tracking tool")
|
| 212 | (description
|
| 213 | "'Patches' is a patch-tracking tool initially written for the QEMU
|
| 214 | project. It provides commands that build a database of patches from a mailing
|
| 215 | list, and commands that can search that database. It allows users to track
|
| 216 | the status of a patch, apply patches, and search for patches---all that from
|
| 217 | the command-line or from Emacs via its Notmuch integration.")
|
| 218 | (license gpl2+))))
|
| 219 |
|
| 220 | (define-public vbindiff
|
| 221 | (package
|
| 222 | (name "vbindiff")
|
| 223 | (version "3.0_beta5")
|
| 224 | (source (origin
|
| 225 | (method url-fetch)
|
| 226 | (uri (string-append "https://www.cjmweb.net/vbindiff/vbindiff-"
|
| 227 | version ".tar.gz"))
|
| 228 | (sha256
|
| 229 | (base32
|
| 230 | "1f1kj4jki08bnrwpzi663mjfkrx4wnfpzdfwd2qgijlkx5ysjkgh"))))
|
| 231 | (build-system gnu-build-system)
|
| 232 | (inputs
|
| 233 | `(("ncurses" ,ncurses)))
|
| 234 | (home-page "https://www.cjmweb.net/vbindiff/")
|
| 235 | (synopsis "Console-based tool for comparing binary data")
|
| 236 | (description "Visual Binary Diff (@command{vbindiff}) displays files in
|
| 237 | hexadecimal and ASCII (or EBCDIC). It can also display two files at once, and
|
| 238 | highlight the differences between them. It works well with large files (up to 4
|
| 239 | GiB).")
|
| 240 | (license gpl2+)))
|