From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [ANN] Emacs-Guix 0.4 Date: Thu, 24 May 2018 14:16:36 +0200 Message-ID: <87y3g9uu3f.fsf@gnu.org> References: <878t8f7qfk.fsf@gmail.com> <87y3gekkdu.fsf@gmail.com> <8736yixucx.fsf@gnu.org> <874liygt8b.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:32926) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fLpAi-00087O-Co for help-guix@gnu.org; Thu, 24 May 2018 08:16:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fLpAf-0000Bd-O9 for help-guix@gnu.org; Thu, 24 May 2018 08:16:44 -0400 In-Reply-To: <874liygt8b.fsf@gmail.com> (Alex Kost's message of "Wed, 23 May 2018 20:46:44 +0300") 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: Alex Kost Cc: help-guix@gnu.org Hello! Alex Kost skribis: > Ludovic Court=C3=A8s (2018-05-23 17:30 +0200) wrote: [...] >> I think =E2=80=98guix-dependent-packages=E2=80=99 is going to be very us= eful. I wonder >> if we could have =E2=80=98C-u guix-dependent-packages=E2=80=99 list only= packages that >> are direct dependents? That would be helpful in some situations. > > I agree! Is there a shell command for this? I mean I'd like to know > what Guile code can do this :-) No, there=E2=80=99s no such command. Perhaps something to add to =E2=80=98= guix refresh -l=E2=80=99, say =E2=80=98guix refresh -l direct=E2=80=99? > Currently, the following code is used to get dependent packages: > > (with-store store > (run-with-store store > (mlet %store-monad ((edges (node-back-edges %bag-node-type > (all-packages)))) > (return (node-transitive-edges packages edges))))) =E2=80=98node-transitive-edges=E2=80=99 traverses the whole DAG, so you sho= uld simply call =E2=80=98edges=E2=80=99 instead. HTH! Ludo=E2=80=99.