~ruther/guix-local

e9aa1e945954f44bf6a15b91ff1bae48e7b7b772 — moksh 5 months ago 10dc03f
gnu: uxn11: Enable tests.

* gnu/packages/emulators (uxn11)[arguments]
<#:tests?>: Remove.
<#:test-target>: Set to “test”.
<#:phases>: Delete ‘build’.  Move ‘check’ after ‘install’.
Add ‘fix-cc’ and ‘pre-check’.

Closes: guix/guix#3228
Change-Id: I27789bd36ecd6b66684403b0043ad75972ca0ced
Signed-off-by: 宋文武 <iyzsong@member.fsf.org>
1 files changed, 12 insertions(+), 5 deletions(-)

M gnu/packages/emulators.scm
M gnu/packages/emulators.scm => gnu/packages/emulators.scm +12 -5
@@ 4613,17 4613,24 @@ stack-machine, written in ANSI C.  Graphical output is implemented using SDL2.")
      (build-system gnu-build-system)
      (arguments
       (list
        #:tests? #f ;no tests
        #:test-target "test"
        #:make-flags
        #~(list (string-append "PREFIX="
                               (assoc-ref %outputs "out")))
        #~(list (string-append "PREFIX=" #$output))
        #:phases
        #~(modify-phases %standard-phases
            (delete 'configure)
            (replace 'build
            (delete 'check)
            (delete 'build)
            (add-before 'install 'fix-cc
              (lambda* (#:key inputs #:allow-other-keys)
                (substitute* "makefile"
                  (("cc") #$(cc-for-target))))))))
                  (("cc") #$(cc-for-target)))))
            (add-after 'fix-cc 'pre-check
              (lambda* (#:key inputs #:allow-other-keys)
                (invoke "make" "bin/uxncli")
                (invoke "make" "tests")))
            (add-after 'install 'check
              (assoc-ref %standard-phases 'check)))))
      (inputs (list libx11))
      (home-page "https://100r.co/site/uxn.html")
      (synopsis "Emulator for the Uxn stack-machine using X11")