Commit | Line | Data |
---|---|---|
be4f149d JMSG |
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 | ||
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 build-system gnu) | |
24 | #:use-module (gnu packages admin)) | |
25 | ||
26 | (define-public simh | |
27 | (package | |
28 | (name "simh") | |
29 | (version "3.9-0") | |
30 | (source (origin | |
31 | (method url-fetch) | |
32 | (uri (string-append "https://github.com/" name "/" name | |
33 | "/archive/v" version ".tar.gz")) | |
34 | (sha256 | |
35 | (base32 | |
36 | "1ymfy8j15d1aa4ai5xv9w7mk6lk4zx3zhfv0mfn66pdhrc8jlh0g")) | |
37 | (file-name (string-append name "-" version ".tar.gz")))) | |
38 | (build-system gnu-build-system) | |
39 | (inputs | |
40 | `(("libpcap" ,libpcap))) | |
41 | (arguments | |
42 | '(#:tests? #f | |
43 | #:make-flags (list | |
44 | "LDFLAGS=-lm" | |
45 | (string-append "INCPATH=" | |
46 | (assoc-ref %build-inputs "libpcap") | |
47 | "/include") | |
48 | (string-append "LIBPATH=" | |
49 | (assoc-ref %build-inputs "libpcap") | |
50 | "/lib")) | |
51 | #:phases | |
52 | (modify-phases %standard-phases | |
53 | (delete 'configure) | |
54 | (add-before 'build 'prepare-build | |
55 | (lambda _ | |
56 | (mkdir "BIN"))) | |
57 | (replace 'install | |
58 | (lambda* (#:key outputs #:allow-other-keys) | |
59 | (let* ((out (assoc-ref outputs "out")) | |
60 | (bin (string-append out "/bin/")) | |
61 | (lib (string-append out "/lib/simh/"))) | |
62 | (mkdir-p bin) | |
63 | (mkdir-p lib) | |
64 | (for-each | |
65 | (lambda (file) | |
66 | (copy-file file (string-append bin | |
67 | "simh-" | |
68 | (basename file)))) | |
69 | (find-files "BIN")) | |
70 | (for-each | |
71 | (lambda (file) | |
72 | (copy-file file (string-append lib | |
73 | (basename file)))) | |
74 | (find-files "VAX" "bin$")))))))) | |
75 | (home-page "http://simh.trailing-edge.com") | |
76 | (synopsis "Collection of simulators from The Computer History Simulation | |
77 | Project") | |
78 | (description | |
79 | "SIMH is a highly portable, multi-system simulator. SIMH implements | |
80 | simulators for: | |
81 | ||
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))) |