summary refs log tree commit diff
path: root/pkgs/development/interpreters/guile/1.8.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/interpreters/guile/1.8.nix')
-rw-r--r--pkgs/development/interpreters/guile/1.8.nix15
1 files changed, 5 insertions, 10 deletions
diff --git a/pkgs/development/interpreters/guile/1.8.nix b/pkgs/development/interpreters/guile/1.8.nix
index cf42c9a7b683..658b2cce77f9 100644
--- a/pkgs/development/interpreters/guile/1.8.nix
+++ b/pkgs/development/interpreters/guile/1.8.nix
@@ -16,7 +16,11 @@ stdenv.mkDerivation rec {
   setOutputFlags = false; # $dev gets into the library otherwise
 
   # GCC 4.6 raises a number of set-but-unused warnings.
-  configureFlags = [ "--disable-error-on-warning" ];
+  configureFlags = [ "--disable-error-on-warning" ]
+    # Guile needs patching to preset results for the configure tests about
+    # pthreads, which work only in native builds.
+    ++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform)
+                          "--with-threads=no";
 
   depsBuildBuild = [ buildPackages.stdenv.cc ]
     ++ stdenv.lib.optional (hostPlatform != buildPlatform)
@@ -34,17 +38,8 @@ stdenv.mkDerivation rec {
     libtool
   ];
 
-
   patches = [ ./cpp-4.5.patch ];
 
-  # Guile needs patching to preset results for the configure tests
-  # about pthreads, which work only in native builds.
-  preConfigure = ''
-    if test -n "$crossConfig"; then
-      configureFlags="--with-threads=no $configureFlags"
-    fi
-  '';
-
   preBuild = ''
     sed -e '/lt_dlinit/a  lt_dladdsearchdir("'$out/lib'");' -i libguile/dynl.c
   '';