From f76a51add021d599f0db54b7045cbf63a6a722d1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@gnu.org>
Date: Wed, 17 Oct 2012 23:34:05 +0200
Subject: [PATCH] distro: Clear references to the store in static binaries.

* distro/packages/base.scm (%static-binaries): Clear references to the
  store path for files in $out/bin.
---
 distro/packages/base.scm | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/distro/packages/base.scm b/distro/packages/base.scm
index 1b3d96a93b0..5e391ed5802 100644
--- a/distro/packages/base.scm
+++ b/distro/packages/base.scm
@@ -1967,7 +1967,7 @@ (define %static-inputs
                                  ;; Since we use `-static', remove
                                  ;; `-export-dynamic'.
                                  (substitute* "configure"
-                                  (("-export-dynamic") "")))
+                                   (("-export-dynamic") "")))
                                %standard-phases)
                      ,@((package-arguments gawk) system)))))))
     `(,@(map (match-lambda
@@ -2036,6 +2036,10 @@ (define (copy-directory source destination)
                                      (string-append bin "/" name)))))
                       (alist-delete "coreutils" %build-inputs))
 
+            ;; Clear references to the store path.
+            (for-each remove-store-references
+                      (directory-contents bin))
+
             #t)))))
     (description "Statically-linked bootstrap binaries")
     (long-description
-- 
GitLab