| 1 | ;;; GNU Guix --- Functional package management for GNU |
| 2 | ;;; Copyright © 2016 Kei Kebreau <kkebreau@posteo.net> |
| 3 | ;;; Copyright © 2017 Gábor Boskovits <boskovits@gmail.com> |
| 4 | ;;; Copyright © 2018, 2020 Tobias Geerinckx-Rice <me@tobias.gr> |
| 5 | ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net> |
| 6 | ;;; |
| 7 | ;;; This file is part of GNU Guix. |
| 8 | ;;; |
| 9 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
| 10 | ;;; under the terms of the GNU General Public License as published by |
| 11 | ;;; the Free Software Foundation; either version 3 of the License, or (at |
| 12 | ;;; your option) any later version. |
| 13 | ;;; |
| 14 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
| 15 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of |
| 16 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 17 | ;;; GNU General Public License for more details. |
| 18 | ;;; |
| 19 | ;;; You should have received a copy of the GNU General Public License |
| 20 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
| 21 | |
| 22 | (define-module (gnu packages hexedit) |
| 23 | #:use-module ((guix licenses) #:prefix license:) |
| 24 | #:use-module (guix packages) |
| 25 | #:use-module (gnu packages) |
| 26 | #:use-module (gnu packages autotools) |
| 27 | #:use-module (gnu packages compression) |
| 28 | #:use-module (gnu packages man) |
| 29 | #:use-module (gnu packages ncurses) |
| 30 | #:use-module (guix download) |
| 31 | #:use-module (guix git-download) |
| 32 | #:use-module (guix build-system gnu)) |
| 33 | |
| 34 | (define-public hexedit |
| 35 | (package |
| 36 | (name "hexedit") |
| 37 | (version "1.5") |
| 38 | (source (origin |
| 39 | (method git-fetch) |
| 40 | (uri (git-reference |
| 41 | (url "https://github.com/pixel/hexedit") |
| 42 | (commit version))) |
| 43 | (file-name (git-file-name name version)) |
| 44 | (sha256 |
| 45 | (base32 |
| 46 | "1sfa4i374n1xrz2ivvzcd8jzc296ly11x1713s4bplvszcqpw6dv")))) |
| 47 | (build-system gnu-build-system) |
| 48 | (arguments |
| 49 | `(#:tests? #f ; no check target |
| 50 | #:phases |
| 51 | (modify-phases %standard-phases |
| 52 | ;; Make F1 open the man page even if man-db is not in the profile. |
| 53 | (add-after 'unpack 'patch-man-path |
| 54 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 55 | (substitute* "interact.c" |
| 56 | (("\"man\"") |
| 57 | (string-append "\"" (assoc-ref inputs "man-db") "/bin/man\"")) |
| 58 | (("\"hexedit\"") |
| 59 | (string-append "\"" (assoc-ref outputs "out") |
| 60 | "/share/man/man1/hexedit.1.gz\""))) |
| 61 | #t))))) |
| 62 | (native-inputs |
| 63 | `(("autoconf" ,autoconf) |
| 64 | ("automake" ,automake))) |
| 65 | (inputs |
| 66 | `(("man-db" ,man-db) |
| 67 | ("ncurses" ,ncurses))) |
| 68 | (synopsis "View and edit files or devices in hexadecimal or ASCII") |
| 69 | (description "hexedit shows a file both in ASCII and in hexadecimal. The |
| 70 | file can be a device as the file is read a piece at a time. You can modify |
| 71 | the file and search through it.") |
| 72 | (home-page "http://rigaux.org/hexedit.html") |
| 73 | (license license:gpl2+))) |
| 74 | |
| 75 | (define-public ht |
| 76 | (package |
| 77 | (name "ht") |
| 78 | (version "2.1.0") |
| 79 | (source (origin |
| 80 | (method url-fetch) |
| 81 | (uri (string-append |
| 82 | "https://sourceforge.net/projects/hte/files/ht-source/" |
| 83 | name "-" version ".tar.bz2")) |
| 84 | (sha256 |
| 85 | (base32 |
| 86 | "0w2xnw3z9ws9qrdpb80q55h6ynhh3aziixcfn45x91bzrbifix9i")))) |
| 87 | (build-system gnu-build-system) |
| 88 | (inputs |
| 89 | `(("lzo" ,lzo) |
| 90 | ("ncurses" ,ncurses))) |
| 91 | (synopsis "Viewer, editor, and analyzer for executable binaries") |
| 92 | (description |
| 93 | "ht is a terminal-based program to view, edit, and analyze any file, but |
| 94 | with a special focus on executable binaries. Its goal is to combine the |
| 95 | low-level functionality of a debugger with the usability of an @dfn{Integrated |
| 96 | Development Environment} (IDE).") |
| 97 | (home-page "http://hte.sourceforge.net/") |
| 98 | (license license:gpl2))) |
| 99 | |
| 100 | (define-public bvi |
| 101 | (package |
| 102 | (name "bvi") |
| 103 | (version "1.4.1") |
| 104 | (source (origin |
| 105 | (method url-fetch) |
| 106 | (uri (string-append |
| 107 | "mirror://sourceforge/bvi/bvi/" version |
| 108 | "/bvi-" version ".src.tar.gz")) |
| 109 | (sha256 |
| 110 | (base32 |
| 111 | "0a0yl0dcyff31k3dr4dpgqmlwygp8iaslnr5gmb6814ylxf2ad9h")))) |
| 112 | (build-system gnu-build-system) |
| 113 | (arguments '(#:tests? #f)) ; no check target |
| 114 | (inputs |
| 115 | `(("ncurses" ,ncurses))) |
| 116 | (synopsis "Binary file editor") |
| 117 | (description "@command{bvi} is a display-oriented editor for binary files, |
| 118 | based on the @command{vi} text editor.") |
| 119 | (home-page "http://bvi.sourceforge.net/") |
| 120 | (license license:gpl3+))) |