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.
This commit is contained in:
		
							parent
							
								
									b7c03093eb
								
							
						
					
					
						commit
						106aac634d
					
				
					 1 changed files with 36 additions and 36 deletions
				
			
		|  | @ -7579,44 +7579,44 @@ original.") | ||||||
|         (base32 "1ppzgnffgdcmq6fq4gmdq2ig10ip2bnfgklkb3i8nc6bdxm7pb89")))) |         (base32 "1ppzgnffgdcmq6fq4gmdq2ig10ip2bnfgklkb3i8nc6bdxm7pb89")))) | ||||||
|     (build-system cmake-build-system) |     (build-system cmake-build-system) | ||||||
|     (arguments |     (arguments | ||||||
|      `(#:test-target "check" |      (list #:test-target "check" | ||||||
|        #:phases |            #:phases | ||||||
|        (modify-phases %standard-phases |            #~(modify-phases %standard-phases | ||||||
|          (add-after 'unpack 'fix-build-env |                (add-after 'unpack 'enter-build-directory | ||||||
|            (lambda* (#:key inputs #:allow-other-keys) |                  (lambda _ | ||||||
|              (use-modules (guix build utils)) |                    (chdir "fortune-mod"))) | ||||||
|              (let* ((cmake-rules (assoc-ref inputs "cmake-rules"))) |                (add-after 'enter-build-directory 'copy-cmake-modules | ||||||
|                (copy-file cmake-rules |                  (lambda _ | ||||||
|                           (string-append "fortune-mod/cmake/" |                    (copy-file #$shlomif-cmake-modules | ||||||
|                                          (strip-store-file-name cmake-rules))) |                               (string-append "cmake/" | ||||||
|                (chdir "fortune-mod") |                                              (strip-store-file-name | ||||||
|                ;; TODO: Valgrind tests fail for some reason. |                                               #$shlomif-cmake-modules))))) | ||||||
|                ;; Similar issue: https://github.com/shlomif/fortune-mod/issues/21 (?) |                (add-after 'enter-build-directory 'delete-failing-test | ||||||
|                (delete-file "tests/t/valgrind.t") |                  (lambda _ | ||||||
|                #t))) |                    ;; TODO: Valgrind tests fail for some reason. | ||||||
|          (add-after 'install 'fix-install-directory |                    ;; Similar issue: https://github.com/shlomif/fortune-mod/issues/21 (?) | ||||||
|            (lambda* (#:key outputs #:allow-other-keys) |                    (delete-file "tests/t/valgrind.t"))) | ||||||
|              ;; Move binary from "games/" to "bin/" and remove the latter.  This |                (add-after 'install 'fix-install-directory | ||||||
|              ;; is easier than patching CMakeLists.txt since the tests hard-code |                  (lambda* (#:key outputs #:allow-other-keys) | ||||||
|              ;; the location as well. |                    ;; Move binary from "games/" to "bin/" and remove the latter.  This | ||||||
|              (let* ((out   (assoc-ref outputs "out")) |                    ;; is easier than patching CMakeLists.txt since the tests hard-code | ||||||
|                     (bin   (string-append out "/bin")) |                    ;; the location as well. | ||||||
|                     (games (string-append out "/games"))) |                    (let* ((out   (assoc-ref outputs "out")) | ||||||
|                (rename-file (string-append games "/fortune") |                           (bin   (string-append out "/bin")) | ||||||
|                             (string-append bin "/fortune")) |                           (games (string-append out "/games"))) | ||||||
|                (rmdir games) |                      (rename-file (string-append games "/fortune") | ||||||
|                #t)))))) |                                   (string-append bin "/fortune")) | ||||||
|  |                      (rmdir games))))))) | ||||||
|     (inputs (list recode)) |     (inputs (list recode)) | ||||||
|     (native-inputs |     (native-inputs | ||||||
|      `(("perl" ,perl) |      (list perl | ||||||
|        ;; The following is only needed for tests. |            ;; The following are only needed for tests. | ||||||
|        ("perl-file-find-object" ,perl-file-find-object) |            perl-file-find-object | ||||||
|        ("perl-test-differences" ,perl-test-differences) |            perl-test-differences | ||||||
|        ("perl-class-xsaccessor" ,perl-class-xsaccessor) |            perl-class-xsaccessor | ||||||
|        ("perl-io-all" ,perl-io-all) |            perl-io-all | ||||||
|        ("perl-test-runvalgrind" ,perl-test-runvalgrind) |            perl-test-runvalgrind | ||||||
|        ("cmake-rules" ,shlomif-cmake-modules) |            rinutils)) | ||||||
|        ("rinutils" ,rinutils))) |  | ||||||
|     (home-page "https://www.shlomifish.org/open-source/projects/fortune-mod/") |     (home-page "https://www.shlomifish.org/open-source/projects/fortune-mod/") | ||||||
|     (synopsis "The Fortune Cookie program from BSD games") |     (synopsis "The Fortune Cookie program from BSD games") | ||||||
|     (description "Fortune is a command-line utility which displays a random |     (description "Fortune is a command-line utility which displays a random | ||||||
|  |  | ||||||
		Reference in a new issue