Message ID | 87ttmf9tj0.fsf@troyfigiel.com |
---|---|
State | New |
Headers | show |
Series | [bug#69043] gnu: go-github-com-charmbracelet-bubbletea: Delete examples. | expand |
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
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.
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
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
Hi, Pushed as 14ea50518d26060b12149078371b4a50e0dee938 to master. -- Oleg
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"))