guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

useful snippet for debugging a package that builds but shouldn't


From: raingloom
Subject: useful snippet for debugging a package that builds but shouldn't
Date: Tue, 28 Dec 2021 00:57:55 +0100

I used it to run `make localmodconfig` in a linux build, others might
find it useful as well. Should I contribute it to the cookbook or Guix
itself as well?

```
(define (error-before phase pkg)
  (package
   (inherit pkg)
   (arguments
    (substitute-keyword-arguments
        (package-arguments pkg)
      ((#:phases phases)
       `(modify-phases ,phases
          (add-before (quote ,phase) 'error-on-purpose
           (lambda _
             (error "error on purpose")))))))))
```



reply via email to

[Prev in Thread] Current Thread [Next in Thread]