forked from mirrors/nixpkgs
my-env: Preserve http_proxy and ftp_proxy variables
There are few build scripts which set them to `nodtd.invalid` to disable downloading files by buildscript. But for user environment we should restore original values
This commit is contained in:
parent
e57249ab20
commit
fea8454d35
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
OLDPATH="$PATH"
|
OLDPATH="$PATH"
|
||||||
OLDTZ="$TZ"
|
OLDTZ="$TZ"
|
||||||
|
OLD_http_proxy="$http_proxy"
|
||||||
|
OLD_ftp_proxy="$http_proxy"
|
||||||
source @myenvpath@
|
source @myenvpath@
|
||||||
|
|
||||||
PATH="$PATH:$OLDPATH"
|
PATH="$PATH:$OLDPATH"
|
||||||
|
@ -10,6 +12,8 @@ export NIX_MYENV_NAME="@name@"
|
||||||
export buildInputs
|
export buildInputs
|
||||||
export NIX_STRIP_DEBUG=0
|
export NIX_STRIP_DEBUG=0
|
||||||
export TZ="$OLDTZ"
|
export TZ="$OLDTZ"
|
||||||
|
export http_proxy="$OLD_http_proxy"
|
||||||
|
export ftp_proxy="$OLD_ftp_proxy"
|
||||||
|
|
||||||
if test $# -gt 0; then
|
if test $# -gt 0; then
|
||||||
exec "$@"
|
exec "$@"
|
||||||
|
|
Loading…
Reference in a new issue