From 2018e992bedce4040a129ce2134dde20cd6371a6 Mon Sep 17 00:00:00 2001
From: Armijn Hemel <armijn@gpl-violations.org>
Date: Mon, 31 Jul 2006 14:45:53 +0000
Subject: [PATCH] patch the binaries to nuke paths to glibc. Ripped from
 stdenv/linux/scripts/fix-outpath.sh

svn path=/nixpkgs/trunk/; revision=6003
---
 pkgs/shells/bash-static/builder.sh | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/pkgs/shells/bash-static/builder.sh b/pkgs/shells/bash-static/builder.sh
index ee482ced23bf..b8c3a401022f 100644
--- a/pkgs/shells/bash-static/builder.sh
+++ b/pkgs/shells/bash-static/builder.sh
@@ -1,5 +1,12 @@
 source $stdenv/setup
 genericBuild
 cd $out/bin
+
+find . -type f | while read fn; do
+    cat $fn | sed "s|/nix/store/[a-z0-9]*-|/nix/store/ffffffffffffffffffffffffffffffff-|g" > $fn.tmp
+    if test -x $fn; then chmod +x $fn.tmp; fi
+    mv $fn.tmp $fn
+done
+
 strip $out/bin/bash
 ln -s bash sh