GNU bug report logs - #76420
[PATCH] gnu: Add canvasblocker/icecat.

Previous Next

Package: guix-patches;

Reported by: Nicolas Graves <ngraves <at> ngraves.fr>

Date: Wed, 19 Feb 2025 19:28:02 UTC

Severity: normal

Tags: patch

Full log


Message #8 received at 76420 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Nicolas Graves <ngraves <at> ngraves.fr>
Cc: 76420 <at> debbugs.gnu.org
Subject: Re: [bug#76420] [PATCH] gnu: Add canvasblocker/icecat.
Date: Mon, 10 Mar 2025 14:41:56 +0100
Nicolas Graves <ngraves <at> ngraves.fr> skribis:

> * gnu/packages/browser-extensions.scm (canvasblocker/icecat): New variable.

[...]

> +       (snippet
> +        #~(for-each
> +           (match-lambda
> +             ((? file-is-directory? dir)
> +              (delete-file-recursively dir))
> +             (file
> +              (delete-file file)))
> +           (remove (cut member <> '("." ".tools" ".."))
> +                   (append
> +                    ;; Hidden files and directories
> +                    (filter (cut string-prefix? "." <>) (scandir "."))
> +                    '("canvasblocker.xpi" "package-lock.json")))))))

filter + remove + match: sounds like we could make it less verbose.

Maybe with:

  (for-each (match-lambda
              ((or "." ".." ".tools") #t)
              ( …)
            (scandir "."))

?

Apart from that it LGTM!

Ludo’.




This bug report was last modified 93 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.