News for hackers. Stuff that matters.
Re:The guide to software development with Guix by dannymi on Thursday June 08, 2023 @07:56AM (#36240368)
Somewhat un-guixy-but-easy way to get started in:

    $ mkdir -p ~/profiles
    $ guix package -p ~/profiles/developer -i gcc-toolchain gfortran-toolchain emacs
    $ guix shell -p ~/profiles/developer --check
    (env)$ cd yourproject # which has guix.scm inside
    (env)$ emacs
    (have emacs do "guix build -f guix.scm" in there from time to time)
This creates a new profile "developer" (you might want that to be more granular eventually, but whatever) with the 3 packages inside and then starts a shell inside that profile. You will have access to those inside that shell (only guarded by PATH etc), but you will ALSO have access to all the tools-outside-that-shell.

If you want to containerize, you can do that, too. Note that then you won't have any of the usual packages, including coreutils, available (no "ls" :) ):

    (env)$ exit
    $ guix shell -C -p ~/profiles/developer --check
    (env)$ ls
    sh: ls: command not found
    (env)$ exit
    $ guix package -p ~/profiles/developer -i coreutils
    $ guix shell -C -p ~/profiles/developer --check
    (env)$ ls
It works!

    (env)$ guix
    sh: guix: command not found
Well, that can't be good.

    (env)$ exit
    $ guix package -p ~/profiles/developer -i guix
    $ guix shell -C -p ~/profiles/developer --check
    (env)$ guix build -f guix.scm
It works!

Note that the "-C" automatically also exposes the current directory that "guix shell" saw when starting up to the container.

Re:The guide to software development with Guix by dannymi on Thursday June 08, 2023 @08:12AM (#36240561)
The manifest stuff is so you can have a more declarative way to specify packages (think Cargo.toml instead of mutable Debian installation).

    (env)$ exit
    $ guix package --export-manifest -p ~/profiles/developer
    (specifications->manifest
      (list "guix"
            "coreutils"
            "emacs"
            "gfortran-toolchain"
            "gcc-toolchain"))
    $ guix package --export-manifest -p ~/profiles/developer > yourproject/manifest.scm
    $ guix shell -C -m yourproject/manifest.scm
    (env)$
Works the same as before. Now more declarative. And you can throw away ~/profiles/developer* now, it will be rebuilt each time (with caching, don't worry).