diff options
author | Vladimír Čunát <vcunat@gmail.com> | 2016-03-08 09:57:58 +0100 |
---|---|---|
committer | Vladimír Čunát <vcunat@gmail.com> | 2016-03-08 09:58:19 +0100 |
commit | 09af15654f0c8091f1b9e0bbb2e523cdee194442 (patch) | |
tree | e648edef1ce4c64c533f2593aa22b8015cf0e506 /pkgs/stdenv/generic | |
parent | f306e67e15bdbe9a8358c9f81319fc4fcbadc2eb (diff) | |
parent | 0ee75214f336474e127c2e3546c0406a0c4d5fa7 (diff) |
Merge master into closure-size
The kde-5 stuff still didn't merge well. I hand-fixed what I saw, but there may be more problems.
Diffstat (limited to 'pkgs/stdenv/generic')
-rw-r--r-- | pkgs/stdenv/generic/setup.sh | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/pkgs/stdenv/generic/setup.sh b/pkgs/stdenv/generic/setup.sh index 2255bbfe669f0..650bdc2e2e190 100644 --- a/pkgs/stdenv/generic/setup.sh +++ b/pkgs/stdenv/generic/setup.sh @@ -189,6 +189,17 @@ _addRpathPrefix() { fi } +# Return success if the specified file is an ELF object. +isELF() { + local fn="$1" + local magic + exec {fd}< "$fn" + read -n 4 -u $fd magic + exec {fd}<&- + if [[ "$magic" =~ ELF ]]; then return 0; else return 1; fi +} + + ###################################################################### # Initialisation. @@ -371,6 +382,13 @@ export NIX_BUILD_CORES paxmark() { true; } +# Prevent OpenSSL-based applications from using certificates in +# /etc/ssl. +if [ -z "$SSL_CERT_FILE" ]; then + export SSL_CERT_FILE=/no-cert-file.crt +fi + + ###################################################################### # Textual substitution functions. @@ -639,14 +657,14 @@ configurePhase() { # Add --disable-dependency-tracking to speed up some builds. if [ -z "$dontAddDisableDepTrack" ]; then - if grep -q dependency-tracking $configureScript; then + if grep -q dependency-tracking "$configureScript"; then configureFlags="--disable-dependency-tracking $configureFlags" fi fi # By default, disable static builds. if [ -z "$dontDisableStatic" ]; then - if grep -q enable-static $configureScript; then + if grep -q enable-static "$configureScript"; then configureFlags="--disable-static $configureFlags" fi fi |