all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Hilton Chain via Guix-patches via <guix-patches@gnu.org>
To: 64527@debbugs.gnu.org
Cc: Hilton Chain <hako@ultrarare.space>
Subject: [bug#64527] [PATCH 2/2] gnu: bees: Wrap script.
Date: Sat,  8 Jul 2023 11:49:55 +0800	[thread overview]
Message-ID: <c9914a2d174b23191f969cccd2f04e0a2a39fa9e.1688787928.git.hako@ultrarare.space> (raw)
In-Reply-To: <45766016e071762b6cffcac63cd43006baeeb7ad.1688787928.git.hako@ultrarare.space>

* gnu/packages/file-systems.scm (bees)[arguments]<#:phases>: Remove 'fixpath.
Add 'wrap.
[inputs]: Add guile-3.0.
---
 gnu/packages/file-systems.scm | 38 +++++++++++++----------------------
 1 file changed, 14 insertions(+), 24 deletions(-)

diff --git a/gnu/packages/file-systems.scm b/gnu/packages/file-systems.scm
index 0b024d6b92..52c8224ec1 100644
--- a/gnu/packages/file-systems.scm
+++ b/gnu/packages/file-systems.scm
@@ -1982,31 +1982,21 @@ (define-public bees
            #:phases
            #~(modify-phases %standard-phases
                (delete 'configure)
-               (add-after 'unpack 'fixpath
+               (add-after 'install 'wrap
                  (lambda* (#:key inputs #:allow-other-keys)
-                   (substitute* "scripts/beesd.in"
-                     (((string-append "\\<(" (string-join (list "realpath"
-                                                                "uuidparse"
-                                                                "grep"
-                                                                "false"
-                                                                "sed"
-                                                                "true"
-                                                                "head"
-                                                                "mkdir"
-                                                                "mount"
-                                                                "touch"
-                                                                "du"
-                                                                "cut"
-                                                                "rm"
-                                                                "truncate"
-                                                                "chmod")
-                                                          "|") ")\\>") command)
-                      (search-input-file inputs (string-append "/bin/" command)))
-
-                     (("btrfs sub")
-                      (string-append (search-input-file inputs "/bin/btrfs")
-                                     " sub"))))))))
-    (inputs (list btrfs-progs cityhash util-linux))
+                   (wrap-script (string-append #$output "/sbin/beesd")
+                     `("PATH" suffix
+                       ,(map (lambda (program)
+                               (dirname (search-input-file
+                                         inputs (string-append "/bin/" program))))
+                             '("btrfs" "grep" "sed"
+                               ;; Provided by `util-linux`:
+                               "uuidparse"
+                               ;; Provided by `coreutils`:
+                               ;;  "chmod" "cut" "du" "false" "head" "mkdir"
+                               ;;  "mount" "realpath" "rm" "touch" "true"
+                               "truncate")))))))))
+    (inputs (list btrfs-progs cityhash guile-3.0 util-linux))
     (home-page "https://github.com/Zygo/bees")
     (synopsis "Deduplication agent for btrfs file systems")
     (description
-- 
2.40.1





  reply	other threads:[~2023-07-08  3:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-08  3:46 [bug#64527] [PATCH 1/2] gnu: bees: Update to 0.10 Hilton Chain via Guix-patches via
2023-07-08  3:49 ` Hilton Chain via Guix-patches via [this message]
2023-07-18 11:42   ` 宋文武 via Guix-patches via
2023-07-19 13:44     ` bug#64527: " Hilton Chain via Guix-patches via

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c9914a2d174b23191f969cccd2f04e0a2a39fa9e.1688787928.git.hako@ultrarare.space \
    --to=guix-patches@gnu.org \
    --cc=64527@debbugs.gnu.org \
    --cc=hako@ultrarare.space \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.