gnu: erlang: Switch to new package style (partial)
* gnu/packages/erlang.scm (erlang)[propagated-inputs]: Remove labels. [arguments]<#:phases>: Remove trailing #T. Prefer SEARCH-INPUT-FILE over WHICH. Use LET instead of LET* when appropriate.master
parent
ffe18274d6
commit
1c5b0f4f3e
|
@ -71,9 +71,7 @@
|
||||||
(inputs
|
(inputs
|
||||||
(list ncurses openssl wxwidgets))
|
(list ncurses openssl wxwidgets))
|
||||||
(propagated-inputs
|
(propagated-inputs
|
||||||
`(("fontconfig" ,fontconfig)
|
(list fontconfig glu mesa))
|
||||||
("glu" ,glu)
|
|
||||||
("mesa" ,mesa)))
|
|
||||||
(arguments
|
(arguments
|
||||||
`(#:test-target "release_tests"
|
`(#:test-target "release_tests"
|
||||||
#:configure-flags
|
#:configure-flags
|
||||||
|
@ -85,7 +83,7 @@
|
||||||
"--enable-threads"
|
"--enable-threads"
|
||||||
"--enable-wx"
|
"--enable-wx"
|
||||||
(string-append "--with-ssl=" (assoc-ref %build-inputs "openssl")))
|
(string-append "--with-ssl=" (assoc-ref %build-inputs "openssl")))
|
||||||
#:modules ((srfi srfi-19) ; make-time, et cetera.
|
#:modules ((srfi srfi-19) ; make-time, et cetera.
|
||||||
(guix build utils)
|
(guix build utils)
|
||||||
(guix build gnu-build-system))
|
(guix build gnu-build-system))
|
||||||
#:phases
|
#:phases
|
||||||
|
@ -127,59 +125,46 @@
|
||||||
(substitute* "lib/snmp/src/compile/snmpc_mib_to_hrl.erl"
|
(substitute* "lib/snmp/src/compile/snmpc_mib_to_hrl.erl"
|
||||||
(("\\{H,Mi,S\\} = time\\(\\),")
|
(("\\{H,Mi,S\\} = time\\(\\),")
|
||||||
(date->string source-date-epoch
|
(date->string source-date-epoch
|
||||||
"{H,Mi,S} = {~H,~M,~S},")))
|
"{H,Mi,S} = {~H,~M,~S},"))))))
|
||||||
#t)))
|
|
||||||
(add-after 'unpack 'patch-/bin/sh
|
(add-after 'unpack 'patch-/bin/sh
|
||||||
(lambda _
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
(substitute* "erts/etc/unix/run_erl.c"
|
(let ((sh (search-input-file inputs "/bin/sh")))
|
||||||
(("sh = \"/bin/sh\";")
|
(substitute* "erts/etc/unix/run_erl.c"
|
||||||
(string-append "sh = \""
|
(("sh = \"/bin/sh\";")
|
||||||
(which "sh")
|
(string-append "sh = \"" sh "\";")))
|
||||||
"\";")))
|
(substitute* "erts/emulator/sys/unix/sys_drivers.c"
|
||||||
|
(("SHELL \"/bin/sh\"")
|
||||||
(substitute* "erts/emulator/sys/unix/sys_drivers.c"
|
(string-append "SHELL \"" sh "\"")))
|
||||||
(("SHELL \"/bin/sh\"")
|
(substitute* "erts/emulator/sys/unix/erl_child_setup.c"
|
||||||
(string-append "SHELL \""
|
(("SHELL \"/bin/sh\"")
|
||||||
(which "sh")
|
(string-append "SHELL \"" sh "\"")))
|
||||||
"\"")))
|
(substitute* "lib/kernel/src/os.erl"
|
||||||
(substitute* "erts/emulator/sys/unix/erl_child_setup.c"
|
(("/bin/sh") sh)))))
|
||||||
(("SHELL \"/bin/sh\"")
|
|
||||||
(string-append "SHELL \""
|
|
||||||
(which "sh")
|
|
||||||
"\"")))
|
|
||||||
|
|
||||||
(substitute* "lib/kernel/src/os.erl"
|
|
||||||
(("/bin/sh") (which "sh")))
|
|
||||||
|
|
||||||
#t))
|
|
||||||
(add-after 'patch-source-shebangs 'patch-source-env
|
(add-after 'patch-source-shebangs 'patch-source-env
|
||||||
(lambda _
|
(lambda _
|
||||||
(let ((escripts
|
(let ((escripts
|
||||||
(append
|
(append
|
||||||
(find-files "." "\\.escript")
|
(find-files "." "\\.escript")
|
||||||
(find-files "lib/stdlib/test/escript_SUITE_data/")
|
(find-files "lib/stdlib/test/escript_SUITE_data/")
|
||||||
'("erts/lib_src/utils/make_atomics_api"
|
'("erts/lib_src/utils/make_atomics_api"
|
||||||
"erts/preloaded/src/add_abstract_code"
|
"erts/preloaded/src/add_abstract_code"
|
||||||
"lib/diameter/bin/diameterc"
|
"lib/diameter/bin/diameterc"
|
||||||
"lib/reltool/examples/display_args"
|
"lib/reltool/examples/display_args"
|
||||||
"lib/reltool/examples/mnesia_core_dump_viewer"
|
"lib/reltool/examples/mnesia_core_dump_viewer"
|
||||||
"lib/snmp/src/compile/snmpc.src"
|
"lib/snmp/src/compile/snmpc.src"
|
||||||
"make/verify_runtime_dependencies"
|
"make/verify_runtime_dependencies"
|
||||||
"make/emd2exml.in"))))
|
"make/emd2exml.in"))))
|
||||||
(substitute* escripts
|
(substitute* escripts
|
||||||
(("/usr/bin/env") (which "env")))
|
(("/usr/bin/env") (which "env"))))))
|
||||||
#t)))
|
|
||||||
(add-before 'configure 'set-erl-top
|
(add-before 'configure 'set-erl-top
|
||||||
(lambda _
|
(lambda _
|
||||||
(setenv "ERL_TOP" (getcwd))
|
(setenv "ERL_TOP" (getcwd))))
|
||||||
#t))
|
|
||||||
(add-after 'install 'patch-erl
|
(add-after 'install 'patch-erl
|
||||||
;; This only works after install.
|
;; This only works after 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")))
|
||||||
(substitute* (string-append out "/bin/erl")
|
(substitute* (string-append out "/bin/erl")
|
||||||
(("sed") (which "sed")))
|
(("sed") (which "sed"))))))
|
||||||
#t)))
|
|
||||||
(add-after 'install 'install-doc
|
(add-after 'install 'install-doc
|
||||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||||
(let* ((out (assoc-ref outputs "out"))
|
(let* ((out (assoc-ref outputs "out"))
|
||||||
|
@ -187,8 +172,7 @@
|
||||||
(share (string-append out "/share/")))
|
(share (string-append out "/share/")))
|
||||||
(mkdir-p share)
|
(mkdir-p share)
|
||||||
(with-directory-excursion share
|
(with-directory-excursion share
|
||||||
(invoke "tar" "xvf" manpages))
|
(invoke "tar" "xvf" manpages))))))))
|
||||||
#t))))))
|
|
||||||
(home-page "https://www.erlang.org/")
|
(home-page "https://www.erlang.org/")
|
||||||
(synopsis "The Erlang programming language")
|
(synopsis "The Erlang programming language")
|
||||||
(description
|
(description
|
||||||
|
|
Reference in New Issue