Subject: bug#72281: closed (Re: [bug#72281] [PATCH] Guix Packager: add copy feature for fetch command)

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 19 Aug 2024 12:55:02 +0000

Your bug report

#72281: [PATCH] Guix Packager: add copy feature for fetch command

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
72281: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=72281
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: [bug#72281] [PATCH] Guix Packager: add copy feature for fetch command
From: Ludovic Courtès <[email-masked]>
To: Jakob Kirsch <[email-masked]>
Cc: [email-masked], Philippe Virouleau <[email-masked]>
Date: Mon, 19 Aug 2024 14:53:43 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Hello,

(Cc: Philippe, the author of Guix Packager.)

Jakob Kirsch <[email-masked]> skribis:

> ---
>  src/components/inputs/SourceInput.tsx | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/src/components/inputs/SourceInput.tsx b/src/components/inputs/SourceInput.tsx
> index aa1b714..2f67425 100644
> --- a/src/components/inputs/SourceInput.tsx
> +++ b/src/components/inputs/SourceInput.tsx
> @@ -136,9 +136,12 @@ function HashHelp({ method, url, version }: {
>    method: Method, url: UrlType, version: string
>  }) {
>    return (
> -    <div>
> +    <div
> +      onClick={() => {
> +        navigator.clipboard.writeText(getFetchHelp(method, url, version))
> +      }}>
>        <Typography variant="body2">
> -        You may compute the sha256 by running the following command(s):
> +        You may compute the sha256 by running the following command(s) (click to copy):

I took the liberty to apply this patch and it’s now deployed:

  https://guix-hpc.gitlabpages.inria.fr/guix-packager/

Philippe, lemme know if anything needs to be tweaked.  :-)

Thanks for your contribution!

Ludo’.

Subject: [PATCH] Guix Packager: add copy feature for fetch command
From: Jakob Kirsch <[email-masked]>
To: [email-masked]
Cc: Jakob Kirsch <[email-masked]>
Date: Thu, 25 Jul 2024 00:26:23 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

---
 src/components/inputs/SourceInput.tsx | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/components/inputs/SourceInput.tsx b/src/components/inputs/SourceInput.tsx
index aa1b714..2f67425 100644
--- a/src/components/inputs/SourceInput.tsx
+++ b/src/components/inputs/SourceInput.tsx
@@ -136,9 +136,12 @@ function HashHelp({ method, url, version }: {
   method: Method, url: UrlType, version: string
 }) {
   return (
-    <div>
+    <div
+      onClick={() => {
+        navigator.clipboard.writeText(getFetchHelp(method, url, version))
+      }}>
       <Typography variant="body2">
-        You may compute the sha256 by running the following command(s):
+        You may compute the sha256 by running the following command(s) (click to copy):
       </Typography>
       <SyntaxHighlighter
         text={getFetchHelp(method, url, version)}
--
2.45.2