guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

303/401: gnu: go-github-com-hanwen-go-fuse: Adjust inheritance.


From: guix-commits
Subject: 303/401: gnu: go-github-com-hanwen-go-fuse: Adjust inheritance.
Date: Thu, 26 Dec 2024 19:31:15 -0500 (EST)

sharlatan pushed a commit to branch go-team
in repository guix.

commit 66104831a004e51c509c9cb666deaf3110510c4a
Author: Sharlatan Hellseher <sharlatanus@gmail.com>
AuthorDate: Sun Dec 22 13:55:23 2024 +0000

    gnu: go-github-com-hanwen-go-fuse: Adjust inheritance.
    
    go-github-com-hanwen-go-fuse needs to be downgraded to 1.0.0 to reflect
    go.mode import path and go-github-com-hanwen-go-fuse-v2 can be inherited
    from it with appropriated phase adjustments.  This change implements the
    logic.
    
    * gnu/packages/golang-xyz.scm (go-github-com-hanwen-go-fuse):
    [version]: Downgrade to 1.0.0, to reflect go.mod import path, it's the
    latest version for this variant.
    [arguments] <skip-build?>: ...
    <test-subdirs>: Move from  go-github-com-hanwen-go-fuse-v2 to here.
    <phases>: Add 'remove-example.
    [synopsis]: Move from  go-github-com-hanwen-go-fuse-v2 to here.
    [description]: Move from  go-github-com-hanwen-go-fuse-v2 to here.
    
    (go-github-com-hanwen-go-fuse-v2): Inherit from 
go-github-com-hanwen-go-fuse.
    [arguments] <test-subdirs>: Move to go-github-com-hanwen-go-fuse.
    <phases>: Remove 'remove-examples-and-benchmarks, add
    'remove-benchmark.
    [synopsis]: Move to go-github-com-hanwen-go-fuse.
    [description]: Move to go-github-com-hanwen-go-fuse.
    
    Change-Id: Idffefad61363b9eb0be2ad0b5dc2dc873814f36d
---
 gnu/packages/golang-xyz.scm | 47 ++++++++++++++++++++++++---------------------
 1 file changed, 25 insertions(+), 22 deletions(-)

diff --git a/gnu/packages/golang-xyz.scm b/gnu/packages/golang-xyz.scm
index cf65604208..fbee464e55 100644
--- a/gnu/packages/golang-xyz.scm
+++ b/gnu/packages/golang-xyz.scm
@@ -4563,7 +4563,7 @@ configuration.")
 (define-public go-github-com-hanwen-go-fuse
   (package
     (name "go-github-com-hanwen-go-fuse")
-    (version "2.0.3")
+    (version "1.0.0")
     (source
      (origin
        (method git-fetch)
@@ -4572,21 +4572,32 @@ configuration.")
              (commit (string-append "v" version))))
        (file-name (git-file-name name version))
        (sha256
-        (base32
-         "1y44d08fxyis99s6jxdr6dbbw5kv3wb8lkhq3xmr886i4w41lz03"))))
+        (base32 "04xa8mh34639lv1b2p8dx13x742j5i493i3sk89hd3jfskzvval1"))))
     (build-system go-build-system)
     (arguments
-     (list #:import-path "github.com/hanwen/go-fuse"))
+     (list
+      #:skip-build? #t
+      #:import-path "github.com/hanwen/go-fuse"
+      ;; Most of the tests require "/bin/fusermount" to be available which
+      ;; is missed during packaging, limit to some unit tests only.
+      #:test-subdirs #~(list "internal/..." "splice")
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'remove-example
+            (lambda* (#:key tests? import-path #:allow-other-keys)
+              (with-directory-excursion (string-append "src/" import-path)
+                (delete-file-recursively "example")))))))
     (propagated-inputs
      (list go-golang-org-x-sys))
     (home-page "https://github.com/hanwen/go-fuse";)
-    (synopsis "FUSE bindings for Go")
+    (synopsis "Go bindings for FUSE filesystems")
     (description
-     "This package provides Go native bindings for the FUSE kernel module.")
+     "This is a repository containing Go bindings for writing FUSE file 
systems.")
     (license license:bsd-3)))
 
 (define-public go-github-com-hanwen-go-fuse-v2
   (package
+    (inherit go-github-com-hanwen-go-fuse)
     (name "go-github-com-hanwen-go-fuse-v2")
     (version "2.7.2")
     (source
@@ -4600,28 +4611,20 @@ configuration.")
         (base32 "1fcf94chf9ffgjk0wcpnlz0kfb69m2fwzfn4k348kal75x178aar"))))
     (build-system go-build-system)
     (arguments
-     (list
-      #:import-path "github.com/hanwen/go-fuse/v2"
-      ;; Most of the tests require "/bin/fusermount" to be available which
-      ;; is missed during packaging, limit to some unit tests only.
-      #:test-subdirs #~(list "internal/..." "splice")
-      #:phases
-      #~(modify-phases %standard-phases
-          (add-after 'unpack 'remove-examples-and-benchmarks
+     (substitute-keyword-arguments
+         (package-arguments go-github-com-hanwen-go-fuse)
+       ((#:import-path _) "github.com/hanwen/go-fuse/v2")
+       ((#:phases phases #~%standard-phases)
+          #~(modify-phases #$phases
+          (add-after 'unpack 'remove-benchmark
             (lambda* (#:key tests? import-path #:allow-other-keys)
               (with-directory-excursion (string-append "src/" import-path)
-                (delete-file-recursively "example")
-                (delete-file-recursively "benchmark")))))))
+                (delete-file-recursively "benchmark"))))))))
     (propagated-inputs
      (list go-github-com-kylelemons-godebug
            go-github-com-moby-sys-mountinfo
            go-golang-org-x-sync
-           go-golang-org-x-sys))
-    (home-page "https://github.com/hanwen/go-fuse";)
-    (synopsis "Go bindings for FUSE filesystems")
-    (description
-     "This is a repository containing Go bindings for writing FUSE file 
systems.")
-    (license license:bsd-3)))
+           go-golang-org-x-sys))))
 
 (define-public go-github-com-hashicorp-errwrap
   (package



reply via email to

[Prev in Thread] Current Thread [Next in Thread]