simh.scm 3.8 KB

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