From 7342923d98cbefec61c2d67ce916d83d42f4bc3e Mon Sep 17 00:00:00 2001
From: Tobias Geerinckx-Rice <me@tobias.gr>
Date: Fri, 26 Apr 2019 04:36:02 +0200
Subject: [PATCH] gnu: wgetpaste: Add and use wget input.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This package has but one purpose; late binding's overkill.

* gnu/packages/wget.scm (wgetpaste)[arguments]: Add ‘use-inputs’ phase.
[inputs]: Add wget.
---
 gnu/packages/wget.scm | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/wget.scm b/gnu/packages/wget.scm
index 128041318b0..4f8671ad6e2 100644
--- a/gnu/packages/wget.scm
+++ b/gnu/packages/wget.scm
@@ -93,6 +93,13 @@ (define-public wgetpaste
        (modify-phases %standard-phases
          (delete 'configure)
          (delete 'build)
+         (add-before 'install 'use-inputs
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let* ((wget (assoc-ref inputs "wget")))
+               (substitute* "wgetpaste"
+                 (("(LC_ALL=C) wget" _ prefix)
+                  (format "~a ~a/bin/wget" prefix wget)))
+               #t)))
          (replace 'install
            (lambda* (#:key outputs #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))
@@ -100,7 +107,9 @@ (define-public wgetpaste
                     (zsh (string-append out "/share/zsh/site-functions")))
                (install-file "wgetpaste" bin)
                (install-file "_wgetpaste" zsh)))))
-       #:tests? #f)) ; no test target
+       #:tests? #f))                    ; no test target
+    (inputs
+     `(("wget" ,wget)))
     (home-page "http://wgetpaste.zlin.dk/")
     (synopsis "Script that automates pasting to a number of pastebin services")
     (description
-- 
GitLab