[Top][All Lists]

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

How should I install non-guix software?

From: Luther Thompson
Subject: How should I install non-guix software?
Date: Sat, 4 Aug 2018 21:45:40 -0400

I don't know if this has been discussed before, but is there a best
practice for installing software from outside the Guix package system?
If I have a source tarball for a program that doesn't have a Guix
package, or if I write my own program, there just isn't any good place
to put the installed files. Scripts have the additional problem of not
being able to use their shebang line.

As a more unique example, I was recently using a React tutorial. IIRC,
I ran the command `npm start`. It tried to run another installed script.
I had to manually change the shebang line of that other script to point
to /home/luther/.guix-profile/bin/node to get it to run.

I can think of a few solutions, all of them difficult:

1. Write a Guix package for every little piece of software we want to
run. I have yet to successfully do this, but I might decide to learn
someday. I already know Scheme. AFAIK, this won't work for node
packages, but it should work for everything else. This solution would
be a lot of work for users.

2. Put ~/bin in our $PATH and install all our executables there. This
wouldn't work for the majority of software that installs more than just
executable files.

3. Instead of installing the software, run it directly from whatever
directory we unpacked/compiled it to.

Unless we use solution 1, we also need a solution for scripts.

1. Make a soft link at /usr/bin/env in the root filesystem pointing
to /run/current-system/profile/bin/env. This seems like the simplest
solution, but I figure there must be some reason the devs haven't
already done this.

2. Know which interpreter we need for each program and invoke that
interpreter explicitly.

3. Manually change the shebang line for every script to point into
our .guix-profile. I don't like this idea, because it would mean
hard-coding the name of our home directory into every script. We can't
really do that with programs that we want to hack on and publish.

Currently, I invoke binaries from their own directories and for
scripts, I invoke the interpreters. I've only been using GuixSD for a
short time, so I doubt that this is a fool-proof solution. How do
you guys handle this?


reply via email to

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