I have an rpm package prebuilt by a third party and have to install it into my Guix server machine. So how can I install an rpm package into a Guix machine?


2 Answers 2


Short answer: You can't. There is no documented way to convert your rpm packages to one managed by Guix, and no "API" that could deal with those packages.

Also, there is no way to install without conversion of RPM packages inside GuixSD or NIX.

Your best beat here is to extract rpm contents inside a RPM based distribution, and repack it outside the package tree. You will have to deal with dependencies and other hell related to this conversion. Good luck.

  • If that is true, I would say that this is a fatal cons of guix or nix. I would assume that some devops may need rpm/deb packages sooner or later, and the dependencies of those packages would possibly hard to find.
    – cmal
    Commented Jun 8, 2017 at 9:28
  • I know how you feel but Guix and Nix have a peculiar way to manage packages an its dependencies, making multiple versions of the same software possible to coexist. Its hard to do that, and at the same time deal with the classic package management workflow, where newer packages are just a replacement for the current version, and libs when needer are overridden as well.
    – user34720
    Commented Jun 8, 2017 at 10:44
  • I love this, and I hope soon there will be method to use rpm and deb packages without troubles. After all, I am learning and using it for realistic jobs rather than just a toy.
    – cmal
    Commented Jun 9, 2017 at 2:32
  • Well. That is a good thing. Not everyone has the opportunity to use such distribution at work and learn with it. People at corporations tend to use classic packaging distributions, and if you are using Guix instead of Debian or Red Hat is a hell of a learning curve you will face :)
    – user34720
    Commented Jun 9, 2017 at 10:35
  • No I am using it myself and wish one day I can use it in my production env. haha
    – cmal
    Commented Jun 10, 2017 at 11:01

I haven't tried installing a foreign distribution RPM package on Guix System, and would advise against it on your main system (it may lead to breakage), but if it's just for testing purpose, it's entirely possible:

# Generate a test RPM package.
# mkdir /var/lib/rpm
# chown root:users /var/run/rpm
# chmod g+rw /var/run/rpm

# Install it with RPM.
$ guix shell rpm
[env]$ rpm_package=$(guix pack -f rpm -R -S /usr/bin/hello=bin/hello hello hello)
[env]$ sudo -E rpm -i --prefix=/opt $rpm_package

# Validate its installation.
[env]$ rpm -q hello
[env]$ file /opt/usr/bin/hello
/opt/usr/bin/hello: symbolic link to ../../gnu/store/hccgf4lpfy2dwwmglmhsyr83yywzxhbr-profile/bin/hello
[env]$ /opt/usr/bin/hello
Hello, world!

See https://guix.gnu.org/en/manual/devel/en/html_node/Invoking-guix-pack.html#Invoking-guix-pack for more information about the guix pack command which was used to generate the hello test RPM package.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .