diff mbox series

[bug#69608,7/7] gnu: kubo: Unbundle more packages.

Message ID 2e89095c79519b44e0bec91c6d61454bc19817e0.1709812934.git.sharlatanus@gmail.com
State New
Headers show
Series gnu: kubo: Unbundle more packages. | expand

Commit Message

Sharlatan Hellseher March 7, 2024, 12:18 p.m. UTC
* gnu/packages/ipfs.scm (kubo) [snippet]: Remove more available vendor
packages.
[inputs]: Add go-github-com-benbjohnson-clock and
go-github-com-blang-semver-v4. Remove go-github-com-cheggaaa-pb-v3,
fail over to vendor package explicitly as v3 is not required.

Change-Id: I8317ea656120b034a98d180278b928f0744f5fbb
---
 gnu/packages/ipfs.scm | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

Comments

Troy Figiel March 7, 2024, 3:57 p.m. UTC | #1
Hi Oleg,

Quick note for the future, not a review.

On 2024-03-07 13:18, Sharlatan Hellseher wrote:
>         (snippet '(for-each delete-file-recursively
>                             ;; TODO: unbundle the rest as well
>                             '("vendor/github.com/alecthomas"
> -                             ;; "vendor/github.com/blang"
> +                             "vendor/github.com/benbjohnson/clock"
> +                             "vendor/github.com/beorn7/perks"
> +                             "vendor/github.com/blang"
>                               "vendor/github.com/cespare"
> -                             ;; TODO: Go files not found
> -                             ;; "vendor/github.com/cheggaaa"
> +                             ;; TODO: kubo depends on v1.0.29 which is way too
> +                             ;; hard to back port.
> +                             ; "vendor/github.com/cheggaaa/pb"
>                               "vendor/github.com/davecgh"
>                               "vendor/github.com/dustin"
>                               "vendor/github.com/flynn"
> @@ -261,8 +264,6 @@ (define-public kubo
>                               ;; "vendor/github.com/ipld"
>                               "vendor/github.com/jackpal"
>                               "vendor/github.com/klauspost"
> -                             ;; TODO: Go files not found
> -                             ;; "vendor/github.com/lucas-clemente"
>                               "vendor/github.com/mattn"
>                               "vendor/github.com/mgutz"
>                               "vendor/github.com/minio"

A phase that removes the "vendor" directory (if it exists), would be
nice. "vendor" is the standard location Go uses to bundle all
dependencies, so it would be a simple way to get rid of most/all bundled
dependencies of a package. I noticed Nix indeed uses a similar step in
their build process.

Best wishes,

Troy
diff mbox series

Patch

diff --git a/gnu/packages/ipfs.scm b/gnu/packages/ipfs.scm
index bad65f04a0..0a1065535b 100644
--- a/gnu/packages/ipfs.scm
+++ b/gnu/packages/ipfs.scm
@@ -241,10 +241,13 @@  (define-public kubo
        (snippet '(for-each delete-file-recursively
                            ;; TODO: unbundle the rest as well
                            '("vendor/github.com/alecthomas"
-                             ;; "vendor/github.com/blang"
+                             "vendor/github.com/benbjohnson/clock"
+                             "vendor/github.com/beorn7/perks"
+                             "vendor/github.com/blang"
                              "vendor/github.com/cespare"
-                             ;; TODO: Go files not found
-                             ;; "vendor/github.com/cheggaaa"
+                             ;; TODO: kubo depends on v1.0.29 which is way too
+                             ;; hard to back port.
+                             ; "vendor/github.com/cheggaaa/pb"
                              "vendor/github.com/davecgh"
                              "vendor/github.com/dustin"
                              "vendor/github.com/flynn"
@@ -261,8 +264,6 @@  (define-public kubo
                              ;; "vendor/github.com/ipld"
                              "vendor/github.com/jackpal"
                              "vendor/github.com/klauspost"
-                             ;; TODO: Go files not found
-                             ;; "vendor/github.com/lucas-clemente"
                              "vendor/github.com/mattn"
                              "vendor/github.com/mgutz"
                              "vendor/github.com/minio"
@@ -306,11 +307,10 @@  (define-public kubo
                                   #~(string-append #$output "/bin/ipfs"))
                             "commands" "completion" "bash")))))))))
     (inputs (list go-github-com-alecthomas-units
-                  ;; TODO: needs to be updated first
-                  ;; go-github-com-blang-semver
+                  go-github-com-benbjohnson-clock
+                  go-github-com-blang-semver-v4
                   go-github-com-cespare-xxhash
                   go-github-com-cheekybits-genny
-                  go-github-com-cheggaaa-pb-v3
                   go-github-com-davecgh-go-spew
                   go-github-com-dustin-go-humanize
                   go-github-com-flynn-noise