summary refs log tree commit diff
diff options
context:
space:
mode:
authorTobias Geerinckx-Rice <me@tobias.gr>2018-02-15 22:56:05 +0100
committerTobias Geerinckx-Rice <me@tobias.gr>2018-02-16 11:11:41 +0100
commit1b0ce451f4ba492e72b7e1ee85534955664a6559 (patch)
tree515ec97f87f043d3d3e4c4700ff64d44a7bbdd7b
parent629c1947ea2b007d7103612dc0d25237abb2b555 (diff)
downloadguix-1b0ce451f4ba492e72b7e1ee85534955664a6559.tar.gz
gnu: erlang: Update phase style.
* gnu/packages/erlang.scm (erlang)[arguments]: Substitute INVOKE for
SYSTEM*, don't use %OUTPUTS, and end phases with #t.
-rw-r--r--gnu/packages/erlang.scm43
1 files changed, 25 insertions, 18 deletions
diff --git a/gnu/packages/erlang.scm b/gnu/packages/erlang.scm
index 78c6b509a1..07aac3a088 100644
--- a/gnu/packages/erlang.scm
+++ b/gnu/packages/erlang.scm
@@ -95,9 +95,9 @@
          (add-after 'unpack 'remove-timestamps
            (lambda _
              (let ((source-date-epoch
-                     (time-utc->date
-                       (make-time time-utc 0 (string->number
-                                               (getenv "SOURCE_DATE_EPOCH"))))))
+                    (time-utc->date
+                     (make-time time-utc 0 (string->number
+                                            (getenv "SOURCE_DATE_EPOCH"))))))
                (substitute* "lib/reltool/src/reltool_target.erl"
                  (("Date = date\\(\\),")
                   (string-append "Date = "
@@ -116,8 +116,8 @@
                (substitute* "lib/dialyzer/test/small_SUITE_data/src/gs_make.erl"
                  (("tuple_to_list\\(date\\(\\)\\),tuple_to_list\\(time\\(\\)\\)")
                   (date->string
-                    source-date-epoch
-                    "tuple_to_list({~Y,~m,~d}), tuple_to_list({~H,~M,~S})")))
+                   source-date-epoch
+                   "tuple_to_list({~Y,~m,~d}), tuple_to_list({~H,~M,~S})")))
                (substitute* "lib/snmp/src/compile/snmpc_mib_to_hrl.erl"
                  (("\\{Y,Mo,D\\} = date\\(\\),")
                   (date->string source-date-epoch
@@ -125,7 +125,8 @@
                (substitute* "lib/snmp/src/compile/snmpc_mib_to_hrl.erl"
                  (("\\{H,Mi,S\\} = time\\(\\),")
                   (date->string source-date-epoch
-                                "{H,Mi,S} = {~H,~M,~S},"))))))
+                                "{H,Mi,S} = {~H,~M,~S},")))
+               #t)))
          (add-after 'patch-source-shebangs 'patch-source-env
            (lambda _
              (let ((escripts
@@ -141,31 +142,37 @@
                        "make/verify_runtime_dependencies"
                        "make/emd2exml.in"))))
                (substitute* escripts
-                 (("/usr/bin/env") (which "env"))))))
+                 (("/usr/bin/env") (which "env")))
+               #t)))
          (add-before 'configure 'set-erl-top
            (lambda _
-             (setenv "ERL_TOP" (getcwd))))
+             (setenv "ERL_TOP" (getcwd))
+             #t))
          (add-after 'patch-source-env 'autoconf
-           (lambda _ (zero? (system* "./otp_build" "autoconf"))))
+           (lambda _
+             (invoke "./otp_build" "autoconf")
+             #t))
          (add-after 'install 'patch-erl
            ;; This only works after install.
-           (lambda _
-             (substitute* (string-append (assoc-ref %outputs "out") "/bin/erl")
-               (("sed") (which "sed")))))
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out")))
+               (substitute* (string-append out "/bin/erl")
+                 (("sed") (which "sed")))
+               #t)))
          (add-after 'install 'install-doc
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))
                     (manpages (assoc-ref inputs "erlang-manpages"))
                     (share (string-append out "/share/")))
-             (mkdir-p share)
-             (mkdir-p (string-append share "/misc/erlang"))
-             (with-directory-excursion share
-               (and
-                 (zero? (system* "tar" "xvf" manpages))
+               (mkdir-p share)
+               (mkdir-p (string-append share "/misc/erlang"))
+               (with-directory-excursion share
+                 (invoke "tar" "xvf" manpages)
                  (rename-file "COPYRIGHT"
                               (string-append share "/misc/erlang/COPYRIGHT"))
                  ;; Delete superfluous file.
-                 (delete-file "PR.template")))))))))
+                 (delete-file "PR.template"))
+               #t))))))
     (home-page "http://erlang.org/")
     (synopsis "The Erlang programming language")
     (description