From mboxrd@z Thu Jan 1 00:00:00 1970 From: Luther Thompson Subject: How should I install non-guix software? Date: Sat, 4 Aug 2018 21:45:40 -0400 Message-ID: <20180804214540.497af879@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49279) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fm87K-0008NT-KD for help-guix@gnu.org; Sat, 04 Aug 2018 21:46:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fm87F-00072K-LR for help-guix@gnu.org; Sat, 04 Aug 2018 21:45:58 -0400 Received: from mail-yb0-x22b.google.com ([2607:f8b0:4002:c09::22b]:36691) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fm87F-00071O-Fm for help-guix@gnu.org; Sat, 04 Aug 2018 21:45:53 -0400 Received: by mail-yb0-x22b.google.com with SMTP id s1-v6so4079031ybk.3 for ; Sat, 04 Aug 2018 18:45:53 -0700 (PDT) Received: from localhost (50-243-201-195-static.hfc.comcastbusiness.net. [50.243.201.195]) by smtp.gmail.com with ESMTPSA id q8-v6sm3719950ywc.86.2018.08.04.18.45.51 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 04 Aug 2018 18:45:52 -0700 (PDT) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: help-guix@gnu.org 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? Luther