Re: GUI for Guix

2023-10-03 Thread Daniel Meißner
Am 2. Oktober 2023 17:08:27 MESZ schrieb Ricardo Wurmus :
> 
> Adam Faiz  writes:
> 
> >> The last message in that issue discussion is mine:
> >
> >>FWIW M-x guix-installed-packages (and all the other stuff) works for me
> >
> >> Is it *actually* broken?  If it is and you can provide information on
> > how to trigger the broken behavior we might be a step closer to fixing
> > it.
> >
> > I assumed that M-x guix-installed-packages already worked, so I wanted to 
> > test the main menu instead.
> >
> > I did the following steps:
> > 1. M-x guix
> > 2. Chose 'packages' by pressing p
> > 3. Go to the search by pressing s
> 
> This works for me.  It starts the REPL in the background and shows me a
> long list of packages.
> 

This works for me most of the time, too. But I also remember some spurious 
REPL-related errors from time to time. I usually restart Emacs and then it 
works again.

-- 
Best
Daniel



Re: Development repositories as Guix channels

2023-07-06 Thread Daniel Meißner
Hi Arun,

Am 6. Juli 2023 16:35:06 MESZ schrieb Arun Isaac :
> 
> Hi,
> 
> This is with reference to the "Level 2: The repository as a channel"
> section in the Guix blog post "From development environments to
> continuous integration—the ultimate guide to software development with
> Guix"[1]. This section describes how to convert a project repository
> into a Guix channel so that the repository can double as a way to
> distribute packages. I have been trying to follow the instructions and
> have hit a little snag.
> 
> The post says the source field of the package definition should be a
> local-file file-like object. This is fine as long as we are using `guix
> build' to build packages in the repository. But, when the repository is
> distributed as a channel, the local-file becomes meaningless. The
> channel only has access to the sources under the .guix/modules directory
> and none of the sources required to build the package itself.
> 
> It seems to me that it is not possible to distribute project
> repositories as Guix channels. But hopefully, I'm missing something
> simple. Could anybody please clarify?

I have recently followed the instructions from this blog post as well and 
indeed you are right that it does not work as advertised. There's however only 
a small mistake in the changes for Level 2. You have to replace the relative 
path in the local-file form with "../.." as that gives you the root of your 
source tree relative to the new location of the Scheme file. Then everything 
works nicely. Even building the package with `guix build -f guix.scm' works 
from the root of the tree. Somehow Guile computes the directory relative to 
real file and not the symlink. Didn't expect.

Bonus: I have even setup CI via Cuirass which was surprisingly easy on a Guix 
system and now it rebuilds my package every time one of its inputs in Guix 
changes ❤️ This is awesome! Thanks for this blog post, it was inspiring.

Hope that helps

Best

-- 
Daniel



Re: Deprecating legacy build phase style when cross-compiling vs. native

2022-04-01 Thread Daniel Meißner
Hi,

Ludovic Courtès  writes:

> The easiest change is to replace:
>
>   %output
>
> with:
>
>   (assoc-ref %outputs "out")
>
> It’s a simple search-and-replace.
>
> The next step would be to use gexps and #$output, but that can be done
> incrementally over time IMO.

I have a patch in that direction sitting on
https://issues.guix.gnu.org/54641 and I am wondering if this is the
style that you’re proposing as the next step.  If so, I could provide
some more patches for other packages as well.

I am also wondering: How are multiple outputs handled with gexps and
#$output?

Best

--
Daniel