go1.5: Fix references to go1.4

This commit is contained in:
William A. Kennington III 2015-08-28 16:17:43 -07:00
parent 5a303519fa
commit 500f871d45

View file

@ -11,6 +11,12 @@ let
find $out -name "*.c" -delete
cp -rf $out/bin/* $out/share/go/bin/
'';
removeReferences = [ go_1_4 ];
removeExpr = refs: lib.flip lib.concatMapStrings refs (ref: ''
| sed "s,${ref},$(echo "${ref}" | sed "s,$NIX_STORE/[^-]*,$NIX_STORE/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee,"),g" \
'');
in
stdenv.mkDerivation rec {
@ -105,8 +111,18 @@ stdenv.mkDerivation rec {
./all.bash
'';
preFixup = ''
while read file; do
cat $file ${removeExpr removeReferences} > $file.tmp
mv $file.tmp $file
chmod +x $file
done < <(find $out/share/go/pkg/bootstrap/bin -type f 2>/dev/null)
'';
setupHook = ./setup-hook.sh;
disallowedReferences = [ go_1_4 ];
meta = with stdenv.lib; {
branch = "1.5";
homepage = http://golang.org/;