simh.scm 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.com>
  3. ;;;
  4. ;;; This file is part of GNU Guix.
  5. ;;;
  6. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  7. ;;; under the terms of the GNU General Public License as published by
  8. ;;; the Free Software Foundation; either version 3 of the License, or (at
  9. ;;; your option) any later version.
  10. ;;;
  11. ;;; GNU Guix is distributed in the hope that it will be useful, but
  12. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  13. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. ;;; GNU General Public License for more details.
  15. ;;;
  16. ;;; You should have received a copy of the GNU General Public License
  17. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  18. (define-module (gnu packages simh)
  19. #:use-module ((guix licenses) #:prefix license:)
  20. #:use-module (guix packages)
  21. #:use-module (guix download)
  22. #:use-module (guix build-system gnu)
  23. #:use-module (gnu packages admin))
  24. (define-public simh
  25. (package
  26. (name "simh")
  27. (version "3.9-0")
  28. (source (origin
  29. (method url-fetch)
  30. (uri (string-append "https://github.com/" name "/" name
  31. "/archive/v" version ".tar.gz"))
  32. (sha256
  33. (base32
  34. "1ymfy8j15d1aa4ai5xv9w7mk6lk4zx3zhfv0mfn66pdhrc8jlh0g"))
  35. (file-name (string-append name "-" version ".tar.gz"))))
  36. (build-system gnu-build-system)
  37. (inputs
  38. `(("libpcap" ,libpcap)))
  39. (arguments
  40. '(#:tests? #f
  41. #:make-flags (list
  42. "LDFLAGS=-lm"
  43. (string-append "INCPATH="
  44. (assoc-ref %build-inputs "libpcap")
  45. "/include")
  46. (string-append "LIBPATH="
  47. (assoc-ref %build-inputs "libpcap")
  48. "/lib"))
  49. #:phases
  50. (modify-phases %standard-phases
  51. (delete 'configure)
  52. (add-before 'build 'prepare-build
  53. (lambda _
  54. (mkdir "BIN")))
  55. (replace 'install
  56. (lambda* (#:key outputs #:allow-other-keys)
  57. (let* ((out (assoc-ref outputs "out"))
  58. (bin (string-append out "/bin/"))
  59. (lib (string-append out "/lib/simh/")))
  60. (mkdir-p bin)
  61. (mkdir-p lib)
  62. (for-each
  63. (lambda (file)
  64. (copy-file file (string-append bin
  65. "simh-"
  66. (basename file))))
  67. (find-files "BIN"))
  68. (for-each
  69. (lambda (file)
  70. (copy-file file (string-append lib
  71. (basename file))))
  72. (find-files "VAX" "bin$"))))))))
  73. (home-page "http://simh.trailing-edge.com")
  74. (synopsis "Collection of simulators from The Computer History Simulation
  75. Project")
  76. (description
  77. "SIMH is a highly portable, multi-system simulator. SIMH implements
  78. simulators for:
  79. @itemize
  80. @item Data General Nova, Eclipse.
  81. @item Digital Equipment Corporation PDP-1, PDP-4, PDP-7, PDP-8, PDP-9, PDP-10,
  82. PDP-11, PDP-15, VAX.
  83. @item GRI Corporation GRI-909, GRI-99.
  84. @item IBM 1401, 1620, 1130, 7090/7094, System 3.
  85. @item Interdata (Perkin-Elmer) 16b and 32b systems.
  86. @item Hewlett-Packard 2114, 2115, 2116, 2100, 21MX, 1000.
  87. @item Honeywell H316/H516.
  88. @item MITS Altair 8800, with both 8080 and Z80.
  89. @item Royal-Mcbee LGP-30, LGP-21.
  90. @item Scientific Data Systems SDS 940.
  91. @item SWTP 6800.
  92. @end itemize")
  93. (license license:expat)))