gnu: simh: Use G-Expressions.

* gnu/packages/simh.scm (simh)[arguments]: Convert to list of G-Expressions.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
This commit is contained in:
宋文武 2023-09-01 22:53:06 +08:00 committed by Maxim Cournoyer
parent 35c254e5fd
commit 2ae57c98a9
No known key found for this signature in database
GPG Key ID: 1260E46482E63562

View File

@ -19,6 +19,7 @@
(define-module (gnu packages simh) (define-module (gnu packages simh)
#:use-module ((guix licenses) #:prefix license:) #:use-module ((guix licenses) #:prefix license:)
#:use-module (guix gexp)
#:use-module (guix packages) #:use-module (guix packages)
#:use-module (guix download) #:use-module (guix download)
#:use-module (guix git-download) #:use-module (guix git-download)
@ -48,41 +49,40 @@
(inputs (inputs
(list libpcap)) (list libpcap))
(arguments (arguments
`(#:tests? #f (list #:tests? #f
#:make-flags (list #:make-flags
(string-append "GCC=" ,(cc-for-target) " -fcommon")) #~(list (string-append "GCC=" #$(cc-for-target) " -fcommon"))
#:modules ((ice-9 string-fun) #:modules `((ice-9 string-fun)
,@%gnu-build-system-modules) ,@%gnu-build-system-modules)
#:phases #:phases
(modify-phases %standard-phases #~(modify-phases %standard-phases
(delete 'configure) (delete 'configure)
(add-before 'build 'prepare-build (add-before 'build 'prepare-build
(lambda _ (lambda _
(substitute* "makefile" (substitute* "makefile"
(("LIBPATH:=/usr/lib") (("LIBPATH:=/usr/lib")
(string-append "LIBPATH:=" (string-append "LIBPATH:="
(string-replace-substring (string-replace-substring
(getenv "LIBRARY_PATH") ":" " "))) (getenv "LIBRARY_PATH") ":" " ")))
(("export LIBRARY_PATH = .*") "")) (("export LIBRARY_PATH = .*") ""))
(mkdir "BIN"))) (mkdir "BIN")))
(replace 'install (replace 'install
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out")) (let* ((out (assoc-ref outputs "out"))
(bin (string-append out "/bin/")) (bin (string-append out "/bin/"))
(lib (string-append out "/lib/simh/"))) (lib (string-append out "/lib/simh/")))
(mkdir-p bin) (mkdir-p bin)
(mkdir-p lib) (mkdir-p lib)
(for-each (for-each (lambda (file)
(lambda (file) (copy-file file
(copy-file file (string-append bin (string-append bin "simh-"
"simh-" (basename file))))
(basename file)))) (find-files "BIN"))
(find-files "BIN")) (for-each (lambda (file)
(for-each (copy-file file
(lambda (file) (string-append lib
(copy-file file (string-append lib (basename file))))
(basename file)))) (find-files "VAX" "bin$"))))))))
(find-files "VAX" "bin$"))))))))
(home-page "http://simh.trailing-edge.com") (home-page "http://simh.trailing-edge.com")
(synopsis "Collection of simulators from The Computer History Simulation (synopsis "Collection of simulators from The Computer History Simulation
Project") Project")