Hi Luis, ------- Original Message ------- On Monday, December 26th, 2022 at 4:15 PM, Luis Felipe <[email protected]> wrote:
> > > Hi, > > I'm packaging a Guile software but the package fails to build when I try to > replace the check phase, and I can't see what I'm doing wrong. > > This is the package definition: > > ٭٭٭٭٭٭٭٭٭٭ > (define-module (packages guile-proba) > #:use-module (gnu packages guile) > #:use-module (gnu packages guile-xyz) > #:use-module (gnu packages texinfo) > #:use-module (guix build-system guile) > #:use-module (guix git-download) > #:use-module ((guix licenses) #:prefix license:) > #:use-module (guix packages)) > > > (define-public guile-proba > (package > (name "guile-proba") > (version "0.1.0") > (source > (origin > (method git-fetch) > (uri (git-reference > (url "https://codeberg.org/luis-felipe/guile-proba") > (commit version))) > (file-name (git-file-name name version)) > (sha256 > (base32 "0bai3nhdmzpcxkp55a74afp92sq609hh9dy5a5w01aysvchp4715")))) > (build-system guile-build-system) > (native-inputs (list guile-3.0 texinfo)) > (propagated-inputs (list guile-config guile-lib texinfo)) > (arguments > `(#:phases > (modify-phases %standard-phases > ;; FIXME: Replacing 'check phase makes build fail. > (replace 'check > (lambda* (#:key tests? #:allow-other-keys) > (when tests? > (invoke "guile" "proba.scm" "run" "tests")))) > (add-after 'install 'install-script-and-manual > (lambda* (#:key outputs #:allow-other-keys) > (let* ((out (assoc-ref outputs "out")) > (bin-dir (string-append out "/bin")) > (info-dir (string-append out "/share/info")) > (script (string-append bin-dir "/proba"))) > (mkdir-p bin-dir) > (mkdir-p info-dir) > (copy-file "proba.scm" script) > (chmod script #o555) > (invoke "makeinfo" "manual/main.texi") > (install-file "guile-proba" info-dir))))) > #:not-compiled-file-regexp > "((packages|tests)\\/.*.scm|(proba|manifest).scm)$")) > (home-page "https://luis-felipe.gitlab.io/guile-proba/") > (synopsis "Testing tools for GNU Guile projects with SRFI 64 test suites") > (description > "This software is a set of testing tools for GNU Guile projects > with SRFI 64-based test suites. It comes with a command-line interface > to run test collections, and a library that includes a test runner and > helpers for writing tests.") > (license license:public-domain))) > ٭٭٭٭٭٭٭٭٭٭ > > > And this is the error after running "guix build -L . guile-proba" (using guix > 9cb42f7): > > ٭٭٭٭٭٭٭٭٭٭ > Backtrace: > 14 (primitive-load "/gnu/store/36iw346l6n6s9wrd4qr923zywj1?") > In ice-9/eval.scm: > 214:21 13 (_ #f) > 217:50 12 (lp (#<procedure 7ffff5f41ca0 at ice-9/eval.scm:282:?> ?)) > > 217:50 11 (lp (#<procedure 7ffff5f41c80 at ice-9/eval.scm:282:?> ?)) > > 217:50 10 (lp (#<procedure 7ffff5f41c60 at ice-9/eval.scm:282:?> ?)) > > 217:50 9 (lp (#<procedure 7ffff5f41c40 at ice-9/eval.scm:282:?> ?)) > > 217:50 8 (lp (#<procedure 7ffff5f41c20 at ice-9/eval.scm:282:?> ?)) > > 217:50 7 (lp (#<procedure 7ffff5f41c00 at ice-9/eval.scm:282:?> ?)) > > 217:50 6 (lp (#<procedure 7ffff5f41be0 at ice-9/eval.scm:282:?> ?)) > > 217:50 5 (lp (#<procedure 7ffff5f41bc0 at ice-9/eval.scm:282:?> ?)) > > 217:50 4 (lp (#<procedure 7ffff5f41ba0 at ice-9/eval.scm:282:?> ?)) > > 217:50 3 (lp (#<procedure 7ffff5f41b80 at ice-9/eval.scm:282:?> ?)) > > 217:33 2 (lp (#<procedure 7ffff5f41a40 at ice-9/eval.scm:649:?> ?)) > > 293:34 1 (_ #(#<directory (guile-user) 7ffff5fdbc80> ((# . #) ?))) > > In guix/build/utils.scm: > 713:4 0 (alist-replace check #<procedure 7ffff5f40ea0 at ice-9?> ?) > > > guix/build/utils.scm:713:4: In procedure alist-replace: > Throw to key `match-error' with args` ("match" "no matching pattern" ())'. > ٭٭٭٭٭٭٭٭٭٭ I believe the build fails because the guile-build-system deletes the 'check phase. From guix/build/guile-build-system.scm: (define %standard-phases (modify-phases gnu:%standard-phases (delete 'bootstrap) (delete 'configure) (add-before 'install-locale 'set-locale-path set-locale-path) (replace 'build build) (add-after 'build 'install-documentation install-documentation) (delete 'check) (delete 'strip) (delete 'validate-runpath) (delete 'install))) Hope that helps! Cheers, Kaelyn > > > Thanks in advance. > > > --- > Luis Felipe López Acevedo > https://luis-felipe.gitlab.io/
