Hi Carlo,

On  3 Feb, Carlo Ascani via wrote:
> 
> Greetings,
> 
> I have some preliminary questions before even try to use guix.
> 
> My use case will be:
> 
> - Use guix on a foreign distro (Debian 12)
> - Use it especially to create isolated development environment [1]
> 
> My questions:
> 
> - How easy is it to install older versions of packages? [2]

Generally, Guix only has one version of a package available at a time (e.g. one 
version of Vim available).

The Guix repository has all the commits within it for earlier versions of a 
package. If you 'pin' the version of the Guix repository that you're using then 
you can install the earlier version of a package. This is done by specifying a 
'channels.scm' file where you set the guix repository location and the specific 
commit to use.

There's a specific `guix time-machine` command where you feed in the channels 
file, along with a manifest file that contains the packages to install: if in a 
team setting this is how all developers can use the same package versions. 
There's a few good blog posts out there about this sort of thing, including one 
I did here:

https://www.futurile.net/2023/11/07/guix-time-travel-tricks/

> - Can I specify services to be started in the development environments? [3]
(...)

Mostly people use `guix shell` to start a ephemeral environment with the 
packages they want specified. The way that services are run is generally using 
`guix home`. I think your options here will be to either start a specific 
service in your main environment (main guix home). I don't _think_ you can do 
it it in an 'environment-local' directory, as we're still in our main shell 
environment and running multiple databases will conflict. Is there a specific 
tool that you're using today that you're thinking of here?

The second option is rather than to use `guix shell` use `guix system 
container` [0]. This will give you a running container that you can then do 
normal start-up stuff with, such as running a database. The advantage is that 
this will all be in a declarative configuration file. I don't have an 
experience with it, so it may take some investigation.

HTH,

Steve

[0] https://guix.gnu.org/cookbook/en/html_node/Guix-System-Containers.html



Reply via email to