summary refs log tree commit diff
diff options
context:
space:
mode:
authorCharles Strahan <charles@cstrahan.com>2016-03-22 21:39:45 -0400
committerCharles Strahan <charles@cstrahan.com>2016-03-22 21:39:45 -0400
commit0547fd247f9960eeffd01973c55ed99112a57205 (patch)
tree8f82a406b1f61312e2740df923eb36eb95f79cc5
parent18b35bd7417368cebacefea4a10c920a8e5516c4 (diff)
downloadnixlib-0547fd247f9960eeffd01973c55ed99112a57205.tar
nixlib-0547fd247f9960eeffd01973c55ed99112a57205.tar.gz
nixlib-0547fd247f9960eeffd01973c55ed99112a57205.tar.bz2
nixlib-0547fd247f9960eeffd01973c55ed99112a57205.tar.lz
nixlib-0547fd247f9960eeffd01973c55ed99112a57205.tar.xz
nixlib-0547fd247f9960eeffd01973c55ed99112a57205.tar.zst
nixlib-0547fd247f9960eeffd01973c55ed99112a57205.zip
go-1.6: fix the build
One of the test scripts dynamically creates and executes a bash script,
which attempts to use `/usr/bin/env bash`. This patches the file to
use the stdenv's shell instead.

Otherwise, the only way this could have worked was by building go_1_6
outside of the sandbox.
-rw-r--r--pkgs/development/compilers/go/1.6.nix5
1 files changed, 5 insertions, 0 deletions
diff --git a/pkgs/development/compilers/go/1.6.nix b/pkgs/development/compilers/go/1.6.nix
index 122f0d336f71..e941910a41b2 100644
--- a/pkgs/development/compilers/go/1.6.nix
+++ b/pkgs/development/compilers/go/1.6.nix
@@ -46,6 +46,11 @@ stdenv.mkDerivation rec {
     cd go
     patchShebangs ./ # replace /bin/bash
 
+    # This script produces another script at run time,
+    # and thus it is not corrected by patchShebangs.
+    substituteInPlace misc/cgo/testcarchive/test.bash \
+      --replace '#!/usr/bin/env bash' '#!${stdenv.shell}'
+
     # Disabling the 'os/http/net' tests (they want files not available in
     # chroot builds)
     rm src/net/{listen,parse}_test.go