diff options
Diffstat (limited to 'pkgs/development')
-rw-r--r-- | pkgs/development/compilers/ghc/7.10.3.nix | 6 | ||||
-rw-r--r-- | pkgs/development/compilers/ghc/8.0.2.nix | 6 | ||||
-rw-r--r-- | pkgs/development/compilers/ghc/8.2.2.nix | 6 | ||||
-rw-r--r-- | pkgs/development/compilers/ghc/8.4.2.nix | 6 | ||||
-rw-r--r-- | pkgs/development/compilers/ghc/head.nix | 6 | ||||
-rw-r--r-- | pkgs/development/interpreters/guile/1.8.nix | 15 | ||||
-rw-r--r-- | pkgs/development/libraries/fontconfig/2.10.nix | 2 | ||||
-rw-r--r-- | pkgs/development/libraries/fontconfig/default.nix | 2 | ||||
-rw-r--r-- | pkgs/development/libraries/gettext/default.nix | 28 | ||||
-rw-r--r-- | pkgs/development/libraries/glibc/default.nix | 13 | ||||
-rw-r--r-- | pkgs/development/tools/build-managers/cmake/default.nix | 30 | ||||
-rwxr-xr-x | pkgs/development/tools/build-managers/cmake/setup-hook.sh | 25 |
12 files changed, 66 insertions, 79 deletions
diff --git a/pkgs/development/compilers/ghc/7.10.3.nix b/pkgs/development/compilers/ghc/7.10.3.nix index e4bf23c6e9e2..4c227f561155 100644 --- a/pkgs/development/compilers/ghc/7.10.3.nix +++ b/pkgs/development/compilers/ghc/7.10.3.nix @@ -129,10 +129,8 @@ stdenv.mkDerivation rec { "--disable-large-address-space" ]; - # Hack to make sure we never to the relaxation `$PATH` and hooks support for - # compatability. This will be replaced with something clearer in a future - # masss-rebuild. - crossConfig = true; + # Make sure we never relax`$PATH` and hooks support for compatability. + strictDeps = true; nativeBuildInputs = [ ghc perl libxml2 libxslt docbook_xsl docbook_xml_dtd_45 docbook_xml_dtd_42 hscolour diff --git a/pkgs/development/compilers/ghc/8.0.2.nix b/pkgs/development/compilers/ghc/8.0.2.nix index 7d11ffb66c60..ca3b128df15b 100644 --- a/pkgs/development/compilers/ghc/8.0.2.nix +++ b/pkgs/development/compilers/ghc/8.0.2.nix @@ -128,10 +128,8 @@ stdenv.mkDerivation rec { "--disable-large-address-space" ]; - # Hack to make sure we never to the relaxation `$PATH` and hooks support for - # compatability. This will be replaced with something clearer in a future - # masss-rebuild. - crossConfig = true; + # Make sure we never relax`$PATH` and hooks support for compatability. + strictDeps = true; nativeBuildInputs = [ ghc perl hscolour sphinx ]; diff --git a/pkgs/development/compilers/ghc/8.2.2.nix b/pkgs/development/compilers/ghc/8.2.2.nix index 1e399d47764c..d80b4edf26e7 100644 --- a/pkgs/development/compilers/ghc/8.2.2.nix +++ b/pkgs/development/compilers/ghc/8.2.2.nix @@ -147,10 +147,8 @@ stdenv.mkDerivation rec { "--disable-large-address-space" ]; - # Hack to make sure we never to the relaxation `$PATH` and hooks support for - # compatability. This will be replaced with something clearer in a future - # masss-rebuild. - crossConfig = true; + # Make sure we never relax`$PATH` and hooks support for compatability. + strictDeps = true; nativeBuildInputs = [ alex autoconf autoreconfHook automake ghc happy hscolour perl python3 sphinx ]; diff --git a/pkgs/development/compilers/ghc/8.4.2.nix b/pkgs/development/compilers/ghc/8.4.2.nix index 94555482d28b..8aad8861d97a 100644 --- a/pkgs/development/compilers/ghc/8.4.2.nix +++ b/pkgs/development/compilers/ghc/8.4.2.nix @@ -138,10 +138,8 @@ stdenv.mkDerivation rec { "--disable-large-address-space" ]; - # Hack to make sure we never to the relaxation `$PATH` and hooks support for - # compatability. This will be replaced with something clearer in a future - # masss-rebuild. - crossConfig = true; + # Make sure we never relax`$PATH` and hooks support for compatability. + strictDeps = true; nativeBuildInputs = [ ghc perl autoconf automake m4 happy alex python3 ]; diff --git a/pkgs/development/compilers/ghc/head.nix b/pkgs/development/compilers/ghc/head.nix index 7e1c73d166a2..c0f1091b04d7 100644 --- a/pkgs/development/compilers/ghc/head.nix +++ b/pkgs/development/compilers/ghc/head.nix @@ -136,10 +136,8 @@ stdenv.mkDerivation rec { "--disable-large-address-space" ]; - # Hack to make sure we never to the relaxation `$PATH` and hooks support for - # compatability. This will be replaced with something clearer in a future - # masss-rebuild. - crossConfig = true; + # Make sure we never relax`$PATH` and hooks support for compatability. + strictDeps = true; nativeBuildInputs = [ ghc perl autoconf automake happy alex python3 ]; diff --git a/pkgs/development/interpreters/guile/1.8.nix b/pkgs/development/interpreters/guile/1.8.nix index 03326f7a7592..53db5949f02b 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 ''; diff --git a/pkgs/development/libraries/fontconfig/2.10.nix b/pkgs/development/libraries/fontconfig/2.10.nix index 6f711341fad3..eae93d96f453 100644 --- a/pkgs/development/libraries/fontconfig/2.10.nix +++ b/pkgs/development/libraries/fontconfig/2.10.nix @@ -22,6 +22,8 @@ stdenv.mkDerivation rec { "--with-cache-dir=/var/cache/fontconfig" "--disable-docs" "--with-default-fonts=" + ] ++ stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ + "--with-arch=${hostPlatform.parsed.cpu.name}" ]; enableParallelBuilding = true; diff --git a/pkgs/development/libraries/fontconfig/default.nix b/pkgs/development/libraries/fontconfig/default.nix index 4d0b1a7f1153..c2d99446d81b 100644 --- a/pkgs/development/libraries/fontconfig/default.nix +++ b/pkgs/development/libraries/fontconfig/default.nix @@ -45,6 +45,8 @@ stdenv.mkDerivation rec { "--disable-docs" # just <1MB; this is what you get when loading config fails for some reason "--with-default-fonts=${dejavu_fonts.minimal}" + ] ++ stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ + "--with-arch=${hostPlatform.parsed.cpu.name}" ]; enableParallelBuilding = true; diff --git a/pkgs/development/libraries/gettext/default.nix b/pkgs/development/libraries/gettext/default.nix index a7c79ee600ec..abc24700fa21 100644 --- a/pkgs/development/libraries/gettext/default.nix +++ b/pkgs/development/libraries/gettext/default.nix @@ -16,12 +16,19 @@ stdenv.mkDerivation rec { LDFLAGS = if stdenv.isSunOS then "-lm -lmd -lmp -luutil -lnvpair -lnsl -lidmap -lavl -lsec" else ""; - configureFlags = [ "--disable-csharp" "--with-xz" ] + configureFlags = [ + "--disable-csharp" "--with-xz" # avoid retaining reference to CF during stdenv bootstrap - ++ lib.optionals stdenv.isDarwin [ - "gt_cv_func_CFPreferencesCopyAppValue=no" - "gt_cv_func_CFLocaleCopyCurrent=no" - ]; + ] ++ lib.optionals stdenv.isDarwin [ + "gt_cv_func_CFPreferencesCopyAppValue=no" + "gt_cv_func_CFLocaleCopyCurrent=no" + ] ++ stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ + # On cross building, gettext supposes that the wchar.h from libc + # does not fulfill gettext needs, so it tries to work with its + # own wchar.h file, which does not cope well with the system's + # wchar.h and stddef.h (gcc-4.3 - glibc-2.9) + "gl_cv_func_wcwidth_works=yes" + ]; postPatch = '' substituteAllInPlace gettext-runtime/src/gettext.sh.in @@ -33,17 +40,6 @@ stdenv.mkDerivation rec { sed -i -e "s/\(libgettextsrc_la_LDFLAGS = \)/\\1..\/gnulib-lib\/libxml_rpl.la /" gettext-tools/src/Makefile.in ''; - # On cross building, gettext supposes that the wchar.h from libc - # does not fulfill gettext needs, so it tries to work with its - # own wchar.h file, which does not cope well with the system's - # wchar.h and stddef.h (gcc-4.3 - glibc-2.9) - preConfigure = '' - if test -n "$crossConfig"; then - echo gl_cv_func_wcwidth_works=yes > cachefile - configureFlags="$configureFlags --cache-file=`pwd`/cachefile" - fi - ''; - nativeBuildInputs = [ xz xz.bin ]; # HACK, see #10874 (and 14664) buildInputs = stdenv.lib.optional (!stdenv.isLinux && !hostPlatform.isCygwin) libiconv; diff --git a/pkgs/development/libraries/glibc/default.nix b/pkgs/development/libraries/glibc/default.nix index 976dbcde47ff..ea443ce9a246 100644 --- a/pkgs/development/libraries/glibc/default.nix +++ b/pkgs/development/libraries/glibc/default.nix @@ -71,14 +71,15 @@ callPackage ./common.nix { inherit stdenv; } { # Get rid of more unnecessary stuff. rm -rf $out/var $bin/bin/sln - + '' # For some reason these aren't stripped otherwise and retain reference # to bootstrap-tools; on cross-arm this stripping would break objects. - if [ -z "$crossConfig" ]; then - for i in "$out"/lib/*.a; do - [ "$i" = "$out/lib/libm.a" ] || strip -S "$i" - done - fi + + stdenv.lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) '' + + for i in "$out"/lib/*.a; do + [ "$i" = "$out/lib/libm.a" ] || $STRIP -S "$i" + done + '' + '' # Put libraries for static linking in a separate output. Note # that libc_nonshared.a and libpthread_nonshared.a are required diff --git a/pkgs/development/tools/build-managers/cmake/default.nix b/pkgs/development/tools/build-managers/cmake/default.nix index 70ea1623f89c..7f7948bc3231 100644 --- a/pkgs/development/tools/build-managers/cmake/default.nix +++ b/pkgs/development/tools/build-managers/cmake/default.nix @@ -80,19 +80,23 @@ stdenv.mkDerivation rec { configureFlags="--parallel=''${NIX_BUILD_CORES:-1} $configureFlags" ''; - configureFlags = [ "--docdir=share/doc/${name}" ] - ++ (if useSharedLibraries then [ "--no-system-jsoncpp" "--system-libs" ] else [ "--no-system-libs" ]) # FIXME: cleanup - ++ optional (useQt4 || withQt5) "--qt-gui" - ++ ["--"] - ++ optionals (!useNcurses) [ "-DBUILD_CursesDialog=OFF" ] - ++ optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ - "-DCMAKE_CXX_COMPILER=${stdenv.cc.targetPrefix}c++" - "-DCMAKE_C_COMPILER=${stdenv.cc.targetPrefix}cc" - "-DCMAKE_AR=${getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}ar" - "-DCMAKE_RANLIB=${getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}ranlib" - "-DCMAKE_STRIP=${getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}strip" - # TODO: Why are ar and friends not provided by the bintools wrapper? - ]; + configureFlags = [ + "--docdir=share/doc/${name}" + # We should set the proper `CMAKE_SYSTEM_NAME`. + # http://www.cmake.org/Wiki/CMake_Cross_Compiling + # + # Unfortunately cmake seems to expect absolute paths for ar, ranlib, and + # strip. Otherwise they are taken to be relative to the source root of the + # package being built. + "-DCMAKE_CXX_COMPILER=${stdenv.cc.targetPrefix}c++" + "-DCMAKE_C_COMPILER=${stdenv.cc.targetPrefix}cc" + "-DCMAKE_AR=${getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}ar" + "-DCMAKE_RANLIB=${getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}ranlib" + "-DCMAKE_STRIP=${getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}strip" + ] ++ (if useSharedLibraries then [ "--no-system-jsoncpp" "--system-libs" ] else [ "--no-system-libs" ]) # FIXME: cleanup + ++ optional (useQt4 || withQt5) "--qt-gui" + ++ ["--"] + ++ optionals (!useNcurses) [ "-DBUILD_CursesDialog=OFF" ]; dontUseCmakeConfigure = true; enableParallelBuilding = true; diff --git a/pkgs/development/tools/build-managers/cmake/setup-hook.sh b/pkgs/development/tools/build-managers/cmake/setup-hook.sh index 5053559bcca3..733dd9482200 100755 --- a/pkgs/development/tools/build-managers/cmake/setup-hook.sh +++ b/pkgs/development/tools/build-managers/cmake/setup-hook.sh @@ -29,20 +29,17 @@ cmakeConfigurePhase() { cmakeFlags="-DCMAKE_INSTALL_PREFIX=$prefix $cmakeFlags" fi - if [ -n "$crossConfig" ]; then - # By now it supports linux builds only. We should set the proper - # CMAKE_SYSTEM_NAME otherwise. - # http://www.cmake.org/Wiki/CMake_Cross_Compiling - # - # Unfortunately cmake seems to expect absolute paths for ar, ranlib, and - # strip. Otherwise they are taken to be relative to the source root of - # the package being built. - cmakeFlags="-DCMAKE_CXX_COMPILER=$crossConfig-c++ $cmakeFlags" - cmakeFlags="-DCMAKE_C_COMPILER=$crossConfig-cc $cmakeFlags" - cmakeFlags="-DCMAKE_AR=$(command -v $crossConfig-ar) $cmakeFlags" - cmakeFlags="-DCMAKE_RANLIB=$(command -v $crossConfig-ranlib) $cmakeFlags" - cmakeFlags="-DCMAKE_STRIP=$(command -v $crossConfig-strip) $cmakeFlags" - fi + # We should set the proper `CMAKE_SYSTEM_NAME`. + # http://www.cmake.org/Wiki/CMake_Cross_Compiling + # + # Unfortunately cmake seems to expect absolute paths for ar, ranlib, and + # strip. Otherwise they are taken to be relative to the source root of the + # package being built. + cmakeFlags="-DCMAKE_CXX_COMPILER=$CXX $cmakeFlags" + cmakeFlags="-DCMAKE_C_COMPILER=$CC $cmakeFlags" + cmakeFlags="-DCMAKE_AR=$(command -v $AR) $cmakeFlags" + cmakeFlags="-DCMAKE_RANLIB=$(command -v $RANLAB) $cmakeFlags" + cmakeFlags="-DCMAKE_STRIP=$(command -v $STRIP) $cmakeFlags" # on macOS we want to prefer Unix-style headers to Frameworks # because we usually do not package the framework |