summary refs log tree commit diff
diff options
context:
space:
mode:
authorTobias Geerinckx-Rice <me@tobias.gr>2022-01-04 02:51:46 +0100
committerTobias Geerinckx-Rice <me@tobias.gr>2022-01-04 05:39:00 +0100
commit106aac634dfd3f3d0f95b840fd5f7b63e51a5511 (patch)
treeece59258fbdb3e9c598feae1f53d24d1f3d4919e
parentb7c03093eb52567d9a2488f93ed91fdde3c9f3a8 (diff)
downloadguix-106aac634dfd3f3d0f95b840fd5f7b63e51a5511.tar.gz
gnu: fortune-mod: Use G-expressions.
* gnu/packages/games.scm (fortune-mod)[arguments]:
Rewrite as G-expressions.  Split up misnamed 'fix-build-env phase into
'enter-build-directory, 'copy-cmake-modules, and 'delete-failing-test.
Don't explicitly return #t from phases.
[native-inputs]: Remove input labels.  Remove shlomif-cmake-modules.
-rw-r--r--gnu/packages/games.scm72
1 files changed, 36 insertions, 36 deletions
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 488f18657d..51c8133c2d 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -7579,44 +7579,44 @@ original.")
         (base32 "1ppzgnffgdcmq6fq4gmdq2ig10ip2bnfgklkb3i8nc6bdxm7pb89"))))
     (build-system cmake-build-system)
     (arguments
-     `(#:test-target "check"
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'fix-build-env
-           (lambda* (#:key inputs #:allow-other-keys)
-             (use-modules (guix build utils))
-             (let* ((cmake-rules (assoc-ref inputs "cmake-rules")))
-               (copy-file cmake-rules
-                          (string-append "fortune-mod/cmake/"
-                                         (strip-store-file-name cmake-rules)))
-               (chdir "fortune-mod")
-               ;; TODO: Valgrind tests fail for some reason.
-               ;; Similar issue: https://github.com/shlomif/fortune-mod/issues/21 (?)
-               (delete-file "tests/t/valgrind.t")
-               #t)))
-         (add-after 'install 'fix-install-directory
-           (lambda* (#:key outputs #:allow-other-keys)
-             ;; Move binary from "games/" to "bin/" and remove the latter.  This
-             ;; is easier than patching CMakeLists.txt since the tests hard-code
-             ;; the location as well.
-             (let* ((out   (assoc-ref outputs "out"))
-                    (bin   (string-append out "/bin"))
-                    (games (string-append out "/games")))
-               (rename-file (string-append games "/fortune")
-                            (string-append bin "/fortune"))
-               (rmdir games)
-               #t))))))
+     (list #:test-target "check"
+           #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'unpack 'enter-build-directory
+                 (lambda _
+                   (chdir "fortune-mod")))
+               (add-after 'enter-build-directory 'copy-cmake-modules
+                 (lambda _
+                   (copy-file #$shlomif-cmake-modules
+                              (string-append "cmake/"
+                                             (strip-store-file-name
+                                              #$shlomif-cmake-modules)))))
+               (add-after 'enter-build-directory 'delete-failing-test
+                 (lambda _
+                   ;; TODO: Valgrind tests fail for some reason.
+                   ;; Similar issue: https://github.com/shlomif/fortune-mod/issues/21 (?)
+                   (delete-file "tests/t/valgrind.t")))
+               (add-after 'install 'fix-install-directory
+                 (lambda* (#:key outputs #:allow-other-keys)
+                   ;; Move binary from "games/" to "bin/" and remove the latter.  This
+                   ;; is easier than patching CMakeLists.txt since the tests hard-code
+                   ;; the location as well.
+                   (let* ((out   (assoc-ref outputs "out"))
+                          (bin   (string-append out "/bin"))
+                          (games (string-append out "/games")))
+                     (rename-file (string-append games "/fortune")
+                                  (string-append bin "/fortune"))
+                     (rmdir games)))))))
     (inputs (list recode))
     (native-inputs
-     `(("perl" ,perl)
-       ;; The following is only needed for tests.
-       ("perl-file-find-object" ,perl-file-find-object)
-       ("perl-test-differences" ,perl-test-differences)
-       ("perl-class-xsaccessor" ,perl-class-xsaccessor)
-       ("perl-io-all" ,perl-io-all)
-       ("perl-test-runvalgrind" ,perl-test-runvalgrind)
-       ("cmake-rules" ,shlomif-cmake-modules)
-       ("rinutils" ,rinutils)))
+     (list perl
+           ;; The following are only needed for tests.
+           perl-file-find-object
+           perl-test-differences
+           perl-class-xsaccessor
+           perl-io-all
+           perl-test-runvalgrind
+           rinutils))
     (home-page "https://www.shlomifish.org/open-source/projects/fortune-mod/")
     (synopsis "The Fortune Cookie program from BSD games")
     (description "Fortune is a command-line utility which displays a random