all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Search in One Channel
@ 2022-12-28 23:45 jgart
  2022-12-29 23:26 ` Csepp
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: jgart @ 2022-12-28 23:45 UTC (permalink / raw)
  To: guix-devel

Hi Guixers,

Below are the channels that I'm currently subscribed to. 

I'd like to search just in the guix-emacs channel with `guix search`. 

Is there a way to do that currently? 

If not,

Would a patch be accepted to add that feature to the `guix search` subcommand?

Any thoughts or ideas on how I should approach implementing search/filter search in one channel only? 

My subscribed channels list:

(list (channel
        (name 'guixrus)
        (url "https://git.sr.ht/~whereiseveryone/guixrus")
        (introduction
         (make-channel-introduction
          "7c67c3a9f299517bfc4ce8235628657898dd26b2"
          (openpgp-fingerprint
           "CD2D 5EAA A98C CB37 DA91  D6B0 5F58 1664 7F8B E551"))))
      (channel
        (name 'emacs)
        (url "https://github.com/babariviere/guix-emacs")
        (introduction
         (make-channel-introduction
          "72ca4ef5b572fea10a4589c37264fa35d4564783"
          (openpgp-fingerprint
           "261C A284 3452 FB01 F6DF  6CF4 F9B7 864F 2AB4 6F18"))))
      (channel
        (name 'druix)
        (url "https://github.com/drewc/druix.git")
        (branch "main"))
      (channel
        (name 'rde)
        (url "https://git.sr.ht/~abcdw/rde")
        (introduction
         (make-channel-introduction
          "257cebd587b66e4d865b3537a9a88cccd7107c95"
          (openpgp-fingerprint
           "2841 9AC6 5038 7440 C7E9  2FFA 2208 D209 58C1 DEB0"))))
      (channel
        (name 'nonguix)
        (url "https://gitlab.com/nonguix/nonguix")
        (introduction
         (make-channel-introduction
          "897c1a470da759236cc11798f4e0a5f7d4d59fbc"
          (openpgp-fingerprint
           "2A39 3FFF 68F4 EF7A 3D29  12AF 6F51 20A0 22FB B2D5"))))
      %default-guix-channel)

all best,

jgart


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Search in One Channel
  2022-12-28 23:45 Search in One Channel jgart
@ 2022-12-29 23:26 ` Csepp
  2022-12-30  1:47 ` jgart
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Csepp @ 2022-12-29 23:26 UTC (permalink / raw)
  To: jgart; +Cc: guix-devel


"jgart" <jgart@dismail.de> writes:

> Hi Guixers,
>
> Below are the channels that I'm currently subscribed to. 
>
> I'd like to search just in the guix-emacs channel with `guix search`. 
>
> Is there a way to do that currently? 

You could filter based on the location field of the output.
There might be a builtin recutils function for that.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Search in One Channel
  2022-12-28 23:45 Search in One Channel jgart
  2022-12-29 23:26 ` Csepp
@ 2022-12-30  1:47 ` jgart
  2022-12-30  1:49 ` jgart
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: jgart @ 2022-12-30  1:47 UTC (permalink / raw)
  To: Csepp; +Cc: guix-devel

hi,

> You could filter based on the location field of the output.

That would work, but, what if 10 different custom Guix channels use gnu/packages/emacs-xyz.scm as a valid path in their channel file structure?


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Search in One Channel
  2022-12-28 23:45 Search in One Channel jgart
  2022-12-29 23:26 ` Csepp
  2022-12-30  1:47 ` jgart
@ 2022-12-30  1:49 ` jgart
  2023-01-05 11:56 ` zimoun
  2023-01-05 13:23 ` david larsson
  4 siblings, 0 replies; 6+ messages in thread
From: jgart @ 2022-12-30  1:49 UTC (permalink / raw)
  To: Csepp; +Cc: guix-devel

Or what if 10 different custom Guix channels use gnu/packages/*.scm as a valid path.

I won't be able to associate which channel that package came from when searching with only that information.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Search in One Channel
  2022-12-28 23:45 Search in One Channel jgart
                   ` (2 preceding siblings ...)
  2022-12-30  1:49 ` jgart
@ 2023-01-05 11:56 ` zimoun
  2023-01-05 13:23 ` david larsson
  4 siblings, 0 replies; 6+ messages in thread
From: zimoun @ 2023-01-05 11:56 UTC (permalink / raw)
  To: jgart, guix-devel

Hi,

On Wed, 28 Dec 2022 at 23:45, "jgart" <jgart@dismail.de> wrote:

> I'd like to search just in the guix-emacs channel with `guix search`. 

Currently, the only option I am aware is to parse the output (with
recutils or other).

Well, it is not convenient but something like:

    guix time-machine -C one-specific-channel.scm -- search foo-bar

should work.  Not convenient because «Compute derivation» and because
you need to extract the correct information for the file
one-specific-channel.scm.

My question is: what is your use case?  Why is “guix search” on all
the channels not fitting your needs?

Well, “guix search” should use ’location’ which is a good indication for
package channel provenance, although it is not a strong guarantee.

Well, it is not straightforward to use ’module-name’ as search term.
Because how to map the string search terms with this module name.  And
because it could lead to some performance penalty.

Cheers,
simon


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Search in One Channel
  2022-12-28 23:45 Search in One Channel jgart
                   ` (3 preceding siblings ...)
  2023-01-05 11:56 ` zimoun
@ 2023-01-05 13:23 ` david larsson
  4 siblings, 0 replies; 6+ messages in thread
From: david larsson @ 2023-01-05 13:23 UTC (permalink / raw)
  To: jgart; +Cc: guix-devel, guix-devel-bounces+david.larsson=selfhosted.xyz

On 2022-12-29 00:45, jgart wrote:

[..]

> 
> Any thoughts or ideas on how I should approach implementing
> search/filter search in one channel only?

I think something like this would be a start where the "pkg-dir" 
argument is the path to a package directory in a channel:

(define (packages-i-want mypkgname pkg-dir)

   (fold-packages (lambda (package result)

                    (if (mypkg? package mypkgname)

                        (cons package result)

                        result))

                  '()

                  (fold-modules cons '() `(,pkg-dir))))

Best regards,
David Larsson


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-01-05 13:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-28 23:45 Search in One Channel jgart
2022-12-29 23:26 ` Csepp
2022-12-30  1:47 ` jgart
2022-12-30  1:49 ` jgart
2023-01-05 11:56 ` zimoun
2023-01-05 13:23 ` david larsson

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.