hexedit.scm 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  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, 2022 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. (define-module (gnu packages hexedit)
  22. #:use-module ((guix licenses) #:prefix license:)
  23. #:use-module (guix packages)
  24. #:use-module (gnu packages)
  25. #:use-module (gnu packages autotools)
  26. #:use-module (gnu packages compression)
  27. #:use-module (gnu packages man)
  28. #:use-module (gnu packages ncurses)
  29. #:use-module (guix download)
  30. #:use-module (guix git-download)
  31. #:use-module (guix build-system gnu))
  32. (define-public hexedit
  33. (package
  34. (name "hexedit")
  35. (version "1.6")
  36. (source (origin
  37. (method git-fetch)
  38. (uri (git-reference
  39. (url "https://github.com/pixel/hexedit")
  40. (commit version)))
  41. (file-name (git-file-name name version))
  42. (sha256
  43. (base32
  44. "00l8vazbjzdg09azp6w3nzq4rl7qyh06i65dh621r6zaprp0z23w"))))
  45. (build-system gnu-build-system)
  46. (arguments
  47. `(#:tests? #f ; no check target
  48. #:phases
  49. (modify-phases %standard-phases
  50. ;; Make F1 open the man page even if man-db is not in the profile.
  51. (add-after 'unpack 'patch-man-path
  52. (lambda* (#:key inputs outputs #:allow-other-keys)
  53. (substitute* "interact.c"
  54. (("\"man\"")
  55. (string-append "\"" (assoc-ref inputs "man-db") "/bin/man\""))
  56. (("\"hexedit\"")
  57. (string-append "\"" (assoc-ref outputs "out")
  58. "/share/man/man1/hexedit.1.gz\""))))))))
  59. (native-inputs
  60. (list autoconf automake))
  61. (inputs
  62. (list man-db ncurses))
  63. (synopsis "View and edit files or devices in hexadecimal or ASCII")
  64. (description "hexedit shows a file both in ASCII and in hexadecimal. The
  65. file can be a device as the file is read a piece at a time. You can modify
  66. the file and search through it.")
  67. (home-page "http://rigaux.org/hexedit.html")
  68. (license license:gpl2+)))
  69. (define-public ht
  70. (package
  71. (name "ht")
  72. (version "2.1.0")
  73. (source (origin
  74. (method url-fetch)
  75. (uri (string-append
  76. "https://sourceforge.net/projects/hte/files/ht-source/"
  77. name "-" version ".tar.bz2"))
  78. (sha256
  79. (base32
  80. "0w2xnw3z9ws9qrdpb80q55h6ynhh3aziixcfn45x91bzrbifix9i"))))
  81. (build-system gnu-build-system)
  82. (inputs
  83. (list lzo ncurses))
  84. (synopsis "Viewer, editor, and analyzer for executable binaries")
  85. (description
  86. "ht is a terminal-based program to view, edit, and analyze any file, but
  87. with a special focus on executable binaries. Its goal is to combine the
  88. low-level functionality of a debugger with the usability of an @dfn{Integrated
  89. Development Environment} (IDE).")
  90. (home-page "https://hte.sourceforge.net/")
  91. (license license:gpl2)))
  92. (define-public bvi
  93. (package
  94. (name "bvi")
  95. (version "1.4.1")
  96. (source (origin
  97. (method url-fetch)
  98. (uri (string-append
  99. "mirror://sourceforge/bvi/bvi/" version
  100. "/bvi-" version ".src.tar.gz"))
  101. (sha256
  102. (base32
  103. "0a0yl0dcyff31k3dr4dpgqmlwygp8iaslnr5gmb6814ylxf2ad9h"))))
  104. (build-system gnu-build-system)
  105. (arguments '(#:tests? #f)) ; no check target
  106. (inputs
  107. (list ncurses))
  108. (synopsis "Binary file editor")
  109. (description "@command{bvi} is a display-oriented editor for binary files,
  110. based on the @command{vi} text editor.")
  111. (home-page "https://bvi.sourceforge.net/")
  112. (license license:gpl3+)))