guix-devel
[Top][All Lists]
Advanced

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

[PATCH 0/2] Improve search path handling?


From: David Thompson
Subject: [PATCH 0/2] Improve search path handling?
Date: Mon, 23 Feb 2015 21:11:33 -0500
User-agent: Notmuch/0.18.2 (http://notmuchmail.org) Emacs/24.4.1 (x86_64-pc-linux-gnu)

While hacking on Ruby stuff, I noticed that executable files in Ruby
gems aren't installed in 'bin', but rather 'lib/ruby/gems/2.2.0/bin'.
In order to make these executables "just work", I decided to add a
search path specification for $PATH to the ruby package.  That's when I
noticed an issue: 'guix package --search-paths' would have me clobber
the $PATH I had already configured to use my profile.

    export PATH="/home/dave/.guix-profile/lib/ruby/gems/2.2.0/bin"

To solve this, two things need to happen: A default $PATH with 'bin' and
'sbin' needs to be included, and search path specifications that have
the same variable name need to be merged.

The merge is necessary to avoid a situation like this:

    export PATH="/home/dave/.guix-profile/bin:/home/dave/.guix-profile/sbin"
    export PATH="/home/dave/.guix-profile/lib/ruby/gems/2.2.0/bin"

I also tweaked 'guix environment' to use the base search paths, which it
was already doing, but via a hardcoded search path specification.

Or maybe this is all silly and I'm doing it wrong!  You decide!

Thanks in advance for the patch review.

-- 
David Thompson
Web Developer - Free Software Foundation - http://fsf.org
GPG Key: 0FF1D807
Support the FSF: https://fsf.org/donate



reply via email to

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