unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#69043] [PATCH] gnu: go-github-com-charmbracelet-bubbletea: Delete examples.
@ 2024-02-11  0:24 Troy Figiel
  2024-02-11  0:24 ` [bug#69043] [PATCH v2] gnu: go-github-com-charmbracelet-bubbletea: Remove examples Troy Figiel
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Troy Figiel @ 2024-02-11  0:24 UTC (permalink / raw)
  To: 69043

* gnu/packages/golang.scm (go-github-com-charmbracelet-bubbletea)[source]: Delete examples and tutorials.
---
 gnu/packages/golang.scm | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 163691a1e6..d917f02a25 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -10443,7 +10443,10 @@ (define-public go-github-com-charmbracelet-bubbletea
        (file-name (git-file-name name version))
        (sha256
         (base32
-         "1105cggi5fwqx69m0vrhgwx6kaw82w4ahn58sj0a81603c4yvrk0"))))
+         "1105cggi5fwqx69m0vrhgwx6kaw82w4ahn58sj0a81603c4yvrk0"))
+       (modules '((guix build utils)))
+       (snippet '(for-each delete-file-recursively
+                           '("examples" "tutorials")))))
     (build-system go-build-system)
     (arguments
      `(#:import-path "github.com/charmbracelet/bubbletea"))

base-commit: 9edbb2d7a40c9da7583a1046e39b87633459f656
-- 
2.42.0





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

* [bug#69043] [PATCH v2] gnu: go-github-com-charmbracelet-bubbletea: Remove examples.
  2024-02-11  0:24 [bug#69043] [PATCH] gnu: go-github-com-charmbracelet-bubbletea: Delete examples Troy Figiel
@ 2024-02-11  0:24 ` Troy Figiel
  2024-02-11 10:50 ` [bug#69043] [PATCH] gnu: go-github-com-charmbracelet-bubbletea: Delete examples Troy Figiel
  2024-02-13 21:41 ` bug#69043: " Sharlatan Hellseher
  2 siblings, 0 replies; 7+ messages in thread
From: Troy Figiel @ 2024-02-11  0:24 UTC (permalink / raw)
  To: 69043

* gnu/packages/golang.scm (go-github-com-charmbracelet-bubbletea): Remove
examples and tutorials.
[arguments]<#:phases>: Add remove-examples phase.
---
 gnu/packages/golang.scm | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 163691a1e6..734db8ca30 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -10446,7 +10446,14 @@ (define-public go-github-com-charmbracelet-bubbletea
          "1105cggi5fwqx69m0vrhgwx6kaw82w4ahn58sj0a81603c4yvrk0"))))
     (build-system go-build-system)
     (arguments
-     `(#:import-path "github.com/charmbracelet/bubbletea"))
+     (list
+      #:import-path "github.com/charmbracelet/bubbletea"
+      #:phases #~(modify-phases %standard-phases
+                   (add-after 'unpack 'remove-examples
+                     (lambda* (#:key import-path #:allow-other-keys)
+                       (with-directory-excursion (string-append "src/" import-path)
+                         (for-each delete-file-recursively
+                                   '("examples" "tutorials"))))))))
     (propagated-inputs
      `(("github.com/mattn/go-isatty" ,go-github-com-mattn-go-isatty)
        ("github.com/muesli/termenv" ,go-github-com-muesli-termenv)

base-commit: 16d2be641424815a1779119bb64bc6ba1be1161b
-- 
2.42.0





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

* [bug#69043] [PATCH] gnu: go-github-com-charmbracelet-bubbletea: Delete examples.
  2024-02-11  0:24 [bug#69043] [PATCH] gnu: go-github-com-charmbracelet-bubbletea: Delete examples Troy Figiel
  2024-02-11  0:24 ` [bug#69043] [PATCH v2] gnu: go-github-com-charmbracelet-bubbletea: Remove examples Troy Figiel
@ 2024-02-11 10:50 ` Troy Figiel
  2024-02-11 11:26   ` Troy Figiel
  2024-02-11 14:24   ` Hilton Chain via Guix-patches via
  2024-02-13 21:41 ` bug#69043: " Sharlatan Hellseher
  2 siblings, 2 replies; 7+ messages in thread
From: Troy Figiel @ 2024-02-11 10:50 UTC (permalink / raw)
  To: 69043


[-- Attachment #1.1.1: Type: text/plain, Size: 1406 bytes --]

As a note, quite a few Go packages come with "examples", "tutorials" or
"benchmarks". These prevent us from recursively building or testing all
packages, as they often come with their own go.mod file or require Go
libraries that create cyclical dependencies. These directories are not
needed for the package to work though.

On 2024-02-11 01:24, Troy Figiel wrote:
> * gnu/packages/golang.scm (go-github-com-charmbracelet-bubbletea)[source]: Delete examples and tutorials.
> ---
>  gnu/packages/golang.scm | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
> index 163691a1e6..d917f02a25 100644
> --- a/gnu/packages/golang.scm
> +++ b/gnu/packages/golang.scm
> @@ -10443,7 +10443,10 @@ (define-public go-github-com-charmbracelet-bubbletea
>         (file-name (git-file-name name version))
>         (sha256
>          (base32
> -         "1105cggi5fwqx69m0vrhgwx6kaw82w4ahn58sj0a81603c4yvrk0"))))
> +         "1105cggi5fwqx69m0vrhgwx6kaw82w4ahn58sj0a81603c4yvrk0"))
> +       (modules '((guix build utils)))
> +       (snippet '(for-each delete-file-recursively
> +                           '("examples" "tutorials")))))
>      (build-system go-build-system)
>      (arguments
>       `(#:import-path "github.com/charmbracelet/bubbletea"))
> 
> base-commit: 9edbb2d7a40c9da7583a1046e39b87633459f656

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 6367 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* [bug#69043] [PATCH] gnu: go-github-com-charmbracelet-bubbletea: Delete examples.
  2024-02-11 10:50 ` [bug#69043] [PATCH] gnu: go-github-com-charmbracelet-bubbletea: Delete examples Troy Figiel
@ 2024-02-11 11:26   ` Troy Figiel
  2024-02-11 14:24   ` Hilton Chain via Guix-patches via
  1 sibling, 0 replies; 7+ messages in thread
From: Troy Figiel @ 2024-02-11 11:26 UTC (permalink / raw)
  To: 69043

I used the word "delete" here, whereas other patches use "remove". I
wasn't sure which word would be better, but uniformizing would be best
anyway.




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

* [bug#69043] [PATCH] gnu: go-github-com-charmbracelet-bubbletea: Delete examples.
  2024-02-11 10:50 ` [bug#69043] [PATCH] gnu: go-github-com-charmbracelet-bubbletea: Delete examples Troy Figiel
  2024-02-11 11:26   ` Troy Figiel
@ 2024-02-11 14:24   ` Hilton Chain via Guix-patches via
  2024-02-11 16:44     ` Troy Figiel
  1 sibling, 1 reply; 7+ messages in thread
From: Hilton Chain via Guix-patches via @ 2024-02-11 14:24 UTC (permalink / raw)
  To: Troy Figiel; +Cc: 69043

Hi Troy,

On Sun, 11 Feb 2024 18:50:18 +0800,
Troy Figiel wrote:
>
> As a note, quite a few Go packages come with "examples", "tutorials" or
> "benchmarks". These prevent us from recursively building or testing all
> packages, as they often come with their own go.mod file or require Go
> libraries that create cyclical dependencies. These directories are not
> needed for the package to work though.
>
> On 2024-02-11 01:24, Troy Figiel wrote:
> > * gnu/packages/golang.scm (go-github-com-charmbracelet-bubbletea)[source]: Delete examples and tutorials.
> > ---
> >  gnu/packages/golang.scm | 5 ++++-
> >  1 file changed, 4 insertions(+), 1 deletion(-)
> >
> > diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
> > index 163691a1e6..d917f02a25 100644
> > --- a/gnu/packages/golang.scm
> > +++ b/gnu/packages/golang.scm
> > @@ -10443,7 +10443,10 @@ (define-public go-github-com-charmbracelet-bubbletea
> >         (file-name (git-file-name name version))
> >         (sha256
> >          (base32
> > -         "1105cggi5fwqx69m0vrhgwx6kaw82w4ahn58sj0a81603c4yvrk0"))))
> > +         "1105cggi5fwqx69m0vrhgwx6kaw82w4ahn58sj0a81603c4yvrk0"))
> > +       (modules '((guix build utils)))
> > +       (snippet '(for-each delete-file-recursively
> > +                           '("examples" "tutorials")))))
> >      (build-system go-build-system)
> >      (arguments
> >       `(#:import-path "github.com/charmbracelet/bubbletea"))
> >
> > base-commit: 9edbb2d7a40c9da7583a1046e39b87633459f656

Since examples and tutorials are still useful for context like getting source
code with ‘guix build --source go-github-com-charmbracelet-bubbletea’, and when
distributing source code, it makes more sense to have them as well, I'd suggest
deleting them in a separate build phase.

Thanks




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

* [bug#69043] [PATCH] gnu: go-github-com-charmbracelet-bubbletea: Delete examples.
  2024-02-11 14:24   ` Hilton Chain via Guix-patches via
@ 2024-02-11 16:44     ` Troy Figiel
  0 siblings, 0 replies; 7+ messages in thread
From: Troy Figiel @ 2024-02-11 16:44 UTC (permalink / raw)
  To: Hilton Chain; +Cc: 69043


[-- Attachment #1.1.1: Type: text/plain, Size: 424 bytes --]

Hi,

On 2024-02-11 15:24, Hilton Chain wrote:
> Since examples and tutorials are still useful for context like getting source
> code with ‘guix build --source go-github-com-charmbracelet-bubbletea’, and when
> distributing source code, it makes more sense to have them as well, I'd suggest
> deleting them in a separate build phase.

Good point, I will add a phase after the unpack phase.

Best wishes,

Troy

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 6367 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* bug#69043: [PATCH] gnu: go-github-com-charmbracelet-bubbletea: Delete examples.
  2024-02-11  0:24 [bug#69043] [PATCH] gnu: go-github-com-charmbracelet-bubbletea: Delete examples Troy Figiel
  2024-02-11  0:24 ` [bug#69043] [PATCH v2] gnu: go-github-com-charmbracelet-bubbletea: Remove examples Troy Figiel
  2024-02-11 10:50 ` [bug#69043] [PATCH] gnu: go-github-com-charmbracelet-bubbletea: Delete examples Troy Figiel
@ 2024-02-13 21:41 ` Sharlatan Hellseher
  2 siblings, 0 replies; 7+ messages in thread
From: Sharlatan Hellseher @ 2024-02-13 21:41 UTC (permalink / raw)
  To: 69043-done

[-- Attachment #1: Type: text/plain, Size: 77 bytes --]


Hi,

Pushed as 14ea50518d26060b12149078371b4a50e0dee938 to master.

--
Oleg

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

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

end of thread, other threads:[~2024-02-13 21:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-11  0:24 [bug#69043] [PATCH] gnu: go-github-com-charmbracelet-bubbletea: Delete examples Troy Figiel
2024-02-11  0:24 ` [bug#69043] [PATCH v2] gnu: go-github-com-charmbracelet-bubbletea: Remove examples Troy Figiel
2024-02-11 10:50 ` [bug#69043] [PATCH] gnu: go-github-com-charmbracelet-bubbletea: Delete examples Troy Figiel
2024-02-11 11:26   ` Troy Figiel
2024-02-11 14:24   ` Hilton Chain via Guix-patches via
2024-02-11 16:44     ` Troy Figiel
2024-02-13 21:41 ` bug#69043: " Sharlatan Hellseher

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).