hexedit.scm 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  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. (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.5")
  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. "1sfa4i374n1xrz2ivvzcd8jzc296ly11x1713s4bplvszcqpw6dv"))))
  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. #t)))))
  60. (native-inputs
  61. `(("autoconf" ,autoconf)
  62. ("automake" ,automake)))
  63. (inputs
  64. `(("man-db" ,man-db)
  65. ("ncurses" ,ncurses)))
  66. (synopsis "View and edit files or devices in hexadecimal or ASCII")
  67. (description "hexedit shows a file both in ASCII and in hexadecimal. The
  68. file can be a device as the file is read a piece at a time. You can modify
  69. the file and search through it.")
  70. (home-page "http://rigaux.org/hexedit.html")
  71. (license license:gpl2+)))
  72. (define-public ht
  73. (package
  74. (name "ht")
  75. (version "2.1.0")
  76. (source (origin
  77. (method url-fetch)
  78. (uri (string-append
  79. "https://sourceforge.net/projects/hte/files/ht-source/"
  80. name "-" version ".tar.bz2"))
  81. (sha256
  82. (base32
  83. "0w2xnw3z9ws9qrdpb80q55h6ynhh3aziixcfn45x91bzrbifix9i"))))
  84. (build-system gnu-build-system)
  85. (inputs
  86. `(("lzo" ,lzo)
  87. ("ncurses" ,ncurses)))
  88. (synopsis "Viewer, editor, and analyzer for executable binaries")
  89. (description
  90. "ht is a terminal-based program to view, edit, and analyze any file, but
  91. with a special focus on executable binaries. Its goal is to combine the
  92. low-level functionality of a debugger with the usability of an @dfn{Integrated
  93. Development Environment} (IDE).")
  94. (home-page "http://hte.sourceforge.net/")
  95. (license license:gpl2)))
  96. (define-public bvi
  97. (package
  98. (name "bvi")
  99. (version "1.4.1")
  100. (source (origin
  101. (method url-fetch)
  102. (uri (string-append
  103. "mirror://sourceforge/bvi/bvi/" version
  104. "/bvi-" version ".src.tar.gz"))
  105. (sha256
  106. (base32
  107. "0a0yl0dcyff31k3dr4dpgqmlwygp8iaslnr5gmb6814ylxf2ad9h"))))
  108. (build-system gnu-build-system)
  109. (arguments '(#:tests? #f)) ; no check target
  110. (inputs
  111. `(("ncurses" ,ncurses)))
  112. (synopsis "Binary file editor")
  113. (description "@command{bvi} is a display-oriented editor for binary files,
  114. based on the @command{vi} text editor.")
  115. (home-page "http://bvi.sourceforge.net/")
  116. (license license:gpl3+)))