Primitive SOURCE_DATE_EPOCH support for reproducible builds (patches 294)

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@7188 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
anders_k 2020-06-26 22:52:09 +00:00
parent 6cd1e7d908
commit 7e2be76681
6 changed files with 95 additions and 24 deletions

View file

@ -4,13 +4,13 @@ Import('defenv')
### imports
Import('FlagsConfigure GetOptionOrEnv')
Import('FlagsConfigure GetOptionOrEnv GetStdSysEnvVarList')
### HACKS!
if GetOptionOrEnv('NSIS_SCONS_GNU_ENVPATHHACK'):
import os
defenv['ENV']['PATH'] = os.getenv('PATH') # Major hack!
import_env = ['SystemDrive', 'SystemRoot', 'TEMP', 'TMP', 'PATHEXT']
import_env = GetStdSysEnvVarList(path=True, temp=True)
for var in import_env:
if var in os.environ:
defenv['ENV'][var] = os.environ.get(var, '')