From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: guix environment Date: Tue, 20 Jan 2015 22:43:44 +0100 Message-ID: <87egqpyvov.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: (Federico Beffa's message of "Tue, 20 Jan 2015 18:21:03 +0100") List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Federico Beffa Cc: Guix-devel , bug-guix@gnu.org List-Id: bug-guix.gnu.org Federico Beffa skribis: > I believe that "guix environment" does not consider all outputs > properly. As one example, when I execute: > > guix environment libpeas > > the $PATH doesn't include /gnu/store/...glib-2.42.1-bin/bin where > ("glib:bin" ,glib "bin") is one of the native-inputs of the package. > > Is this intentional? I don=E2=80=99t think so. On closer inspection, I see two issues: (define (packages->transitive-inputs packages) "Return a list of the transitive inputs for all PACKAGES." (define (transitive-inputs package) (filter-map (match-lambda ((_ (? package? package)) package) (_ #f)) ; <---- ! (bag-transitive-inputs (package->bag package)))) (delete-duplicates (append-map transitive-inputs packages))) Here only inputs of the form ("foo" PKG) are considered; things like ("glib" ,glib "bin") are discarded. (define (for-each-search-path proc inputs derivations pure?) (let ((paths (map derivation->output-path derivations))) ; <-- ! [...] Above, =E2=80=98derivation->output-path=E2=80=99 considers only the =E2=80= =9Cout=E2=80=9D output, ignoring others if they are needed. I think these would need to be adjusted. Any takers? :-) Ludo=E2=80=99.