diff options
author | John Ericson <Ericson2314@yahoo.com> | 2018-01-24 12:33:37 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-24 12:33:37 -0500 |
commit | 8696dbece0c8fc106e334dff433c3f4fb18c7ee5 (patch) | |
tree | 3884a1566a014e773aa1d6979a0e0bbd431fef0a | |
parent | f4348cc5cbb598d9779a3660e2c2f232ed1278b2 (diff) | |
parent | c68aa532d68df512a657608a02ef7400b7087873 (diff) | |
download | nixlib-8696dbece0c8fc106e334dff433c3f4fb18c7ee5.tar nixlib-8696dbece0c8fc106e334dff433c3f4fb18c7ee5.tar.gz nixlib-8696dbece0c8fc106e334dff433c3f4fb18c7ee5.tar.bz2 nixlib-8696dbece0c8fc106e334dff433c3f4fb18c7ee5.tar.lz nixlib-8696dbece0c8fc106e334dff433c3f4fb18c7ee5.tar.xz nixlib-8696dbece0c8fc106e334dff433c3f4fb18c7ee5.tar.zst nixlib-8696dbece0c8fc106e334dff433c3f4fb18c7ee5.zip |
Merge pull request #34198 from dtzWill/fix/cross-misc-4
misc cross fixes, batch 4
-rw-r--r-- | pkgs/development/libraries/aspell/default.nix | 2 | ||||
-rw-r--r-- | pkgs/development/libraries/glib/default.nix | 9 | ||||
-rw-r--r-- | pkgs/development/libraries/libgpg-error/default.nix | 8 | ||||
-rw-r--r-- | pkgs/development/libraries/libomxil-bellagio/default.nix | 5 | ||||
-rw-r--r-- | pkgs/development/tools/misc/lsof/default.nix | 5 | ||||
-rw-r--r-- | pkgs/tools/filesystems/e2fsprogs/default.nix | 9 | ||||
-rw-r--r-- | pkgs/tools/misc/file/default.nix | 3 | ||||
-rw-r--r-- | pkgs/tools/networking/jwhois/default.nix | 2 | ||||
-rw-r--r-- | pkgs/tools/security/rhash/default.nix | 2 | ||||
-rw-r--r-- | pkgs/tools/system/cron/default.nix | 4 |
10 files changed, 29 insertions, 20 deletions
diff --git a/pkgs/development/libraries/aspell/default.nix b/pkgs/development/libraries/aspell/default.nix index 0f6f5e8dd147..cccd93e5d4dd 100644 --- a/pkgs/development/libraries/aspell/default.nix +++ b/pkgs/development/libraries/aspell/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { patch -p1 < ${./data-dirs-from-nix-profiles.patch} ''; - buildInputs = [ perl ]; + nativeBuildInputs = [ perl ]; doCheck = true; diff --git a/pkgs/development/libraries/glib/default.nix b/pkgs/development/libraries/glib/default.nix index c0cf864e79a0..656cdffbb4c7 100644 --- a/pkgs/development/libraries/glib/default.nix +++ b/pkgs/development/libraries/glib/default.nix @@ -75,8 +75,13 @@ stdenv.mkDerivation rec { # internal pcre would only add <200kB, but it's relatively common configureFlags = [ "--with-pcre=system" ] ++ optional stdenv.isDarwin "--disable-compile-warnings" - ++ optional (stdenv.isFreeBSD || stdenv.isSunOS) "--with-libiconv=gnu" - ++ optional stdenv.isSunOS "--disable-dtrace"; + ++ optional (stdenv.hostPlatform.libc != "glibc") "--with-libiconv=gnu" + ++ optional stdenv.isSunOS "--disable-dtrace" + # Can't run this test when cross-compiling + ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) + [ "glib_cv_stack_grows=no" "glib_cv_uscore=no" ] + # GElf only supports elf64 hosts + ++ optional (!stdenv.hostPlatform.is64bit) "--disable-libelf"; NIX_CFLAGS_COMPILE = optional stdenv.isDarwin "-lintl" ++ optional stdenv.isSunOS "-DBSD_COMP"; diff --git a/pkgs/development/libraries/libgpg-error/default.nix b/pkgs/development/libraries/libgpg-error/default.nix index 56bf9b177b56..9faf7a404585 100644 --- a/pkgs/development/libraries/libgpg-error/default.nix +++ b/pkgs/development/libraries/libgpg-error/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, gettext }: +{ stdenv, buildPackages, fetchurl, gettext }: stdenv.mkDerivation rec { name = "libgpg-error-${version}"; @@ -16,7 +16,8 @@ stdenv.mkDerivation rec { # If architecture-dependent MO files aren't available, they're generated # during build, so we need gettext for cross-builds. - crossAttrs.buildInputs = [ gettext ]; + depsBuildBuild = [ buildPackages.stdenv.cc ]; + nativeBuildInputs = [ gettext ]; postConfigure = stdenv.lib.optionalString stdenv.isSunOS @@ -27,7 +28,7 @@ stdenv.mkDerivation rec { # Thus, re-run it with Bash. "${stdenv.shell} config.status"; - doCheck = true; + doCheck = true; # not cross meta = with stdenv.lib; { homepage = https://www.gnupg.org/related_software/libgpg-error/index.html; @@ -45,4 +46,3 @@ stdenv.mkDerivation rec { maintainers = [ maintainers.fuuzetsu maintainers.vrthra ]; }; } - diff --git a/pkgs/development/libraries/libomxil-bellagio/default.nix b/pkgs/development/libraries/libomxil-bellagio/default.nix index 5140402eacb9..28c8a915c635 100644 --- a/pkgs/development/libraries/libomxil-bellagio/default.nix +++ b/pkgs/development/libraries/libomxil-bellagio/default.nix @@ -8,7 +8,10 @@ stdenv.mkDerivation rec { url = "mirror://sourceforge/omxil/omxil/Bellagio%20${version}/${name}.tar.gz"; sha256 = "0k6p6h4npn8p1qlgq6z3jbfld6n1bqswzvxzndki937gr0lhfg2r"; }; - + + configureFlags = + stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "ac_cv_func_malloc_0_nonnull=yes" ]; + patches = [ ./fedora-fixes.patch ]; meta = with stdenv.lib; { diff --git a/pkgs/development/tools/misc/lsof/default.nix b/pkgs/development/tools/misc/lsof/default.nix index 76c83e2dbeb0..aa6bd003ed3f 100644 --- a/pkgs/development/tools/misc/lsof/default.nix +++ b/pkgs/development/tools/misc/lsof/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, ncurses }: +{ stdenv, fetchurl, buildPackages, ncurses }: let dialect = with stdenv.lib; last (splitString "-" stdenv.system); in @@ -6,6 +6,7 @@ stdenv.mkDerivation rec { name = "lsof-${version}"; version = "4.89"; + depsBuildBuild = [ buildPackages.stdenv.cc ]; buildInputs = [ ncurses ]; src = fetchurl { @@ -31,7 +32,7 @@ stdenv.mkDerivation rec { # Stop build scripts from searching global include paths LSOF_INCLUDE = "${stdenv.cc.libc}/include"; - configurePhase = "./Configure -n ${dialect}"; + configurePhase = "LINUX_CONF_CC=$CC_FOR_BUILD LSOF_CC=$CC LSOF_AR=\"$AR cr\" LSOF_RANLIB=$RANLIB ./Configure -n ${dialect}"; preBuild = '' sed -i Makefile -e 's/^CFGF=/& -DHASIPv6=1/;' -e 's/-lcurses/-lncurses/' for filepath in $(find dialects/${dialect} -type f); do diff --git a/pkgs/tools/filesystems/e2fsprogs/default.nix b/pkgs/tools/filesystems/e2fsprogs/default.nix index e6a83e32632c..6326cda35397 100644 --- a/pkgs/tools/filesystems/e2fsprogs/default.nix +++ b/pkgs/tools/filesystems/e2fsprogs/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, pkgconfig, libuuid, gettext, texinfo }: +{ stdenv, buildPackages, fetchurl, pkgconfig, libuuid, gettext, texinfo }: stdenv.mkDerivation rec { name = "e2fsprogs-1.43.8"; @@ -10,15 +10,10 @@ stdenv.mkDerivation rec { outputs = [ "bin" "dev" "out" "man" "info" ]; + depsBuildBuild = [ buildPackages.stdenv.cc ]; nativeBuildInputs = [ pkgconfig texinfo ]; buildInputs = [ libuuid ] ++ stdenv.lib.optional (!stdenv.isLinux) gettext; - crossAttrs = { - preConfigure = '' - export CC=$crossConfig-gcc - ''; - }; - configureFlags = if stdenv.isLinux then [ "--enable-elf-shlibs" "--enable-symlink-install" "--enable-relative-symlinks" diff --git a/pkgs/tools/misc/file/default.nix b/pkgs/tools/misc/file/default.nix index 47d67f91ec73..3765f9134308 100644 --- a/pkgs/tools/misc/file/default.nix +++ b/pkgs/tools/misc/file/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, zlib }: +{ stdenv, fetchurl, file, zlib }: stdenv.mkDerivation rec { name = "file-${version}"; @@ -12,6 +12,7 @@ stdenv.mkDerivation rec { sha256 = "0l1bfa0icng9vdwya00ff48fhvjazi5610ylbhl35qi13d6xqfc6"; }; + nativeBuildInputs = stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) file; buildInputs = [ zlib ]; doCheck = true; diff --git a/pkgs/tools/networking/jwhois/default.nix b/pkgs/tools/networking/jwhois/default.nix index 1d7932c7ad38..cd0821ef9ef5 100644 --- a/pkgs/tools/networking/jwhois/default.nix +++ b/pkgs/tools/networking/jwhois/default.nix @@ -15,6 +15,8 @@ stdenv.mkDerivation { patches = [ ./connect.patch ./service-name.patch ]; + makeFlags = [ "AR=${stdenv.cc.bintools.targetPrefix}ar" ]; + meta = { description = "A client for the WHOIS protocol allowing you to query the owner of a domain name"; homepage = http://www.gnu.org/software/jwhois/; diff --git a/pkgs/tools/security/rhash/default.nix b/pkgs/tools/security/rhash/default.nix index e33c680b4578..68c3edc4cd25 100644 --- a/pkgs/tools/security/rhash/default.nix +++ b/pkgs/tools/security/rhash/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { # * .h files installed for static library target only # * .so.0 -> .so link only created in the static library install target buildPhase = '' - make lib-shared lib-static build-shared CC=cc PREFIX=$out + make lib-shared lib-static build-shared CC=$CC AR=$AR PREFIX=$out ''; # we don't actually want the static library, so we remove it after it diff --git a/pkgs/tools/system/cron/default.nix b/pkgs/tools/system/cron/default.nix index 4a8babfd6302..d6347798053b 100644 --- a/pkgs/tools/system/cron/default.nix +++ b/pkgs/tools/system/cron/default.nix @@ -14,7 +14,9 @@ stdenv.mkDerivation { preBuild = '' # do not set sticky bit in /nix/store substituteInPlace Makefile --replace ' -o root' ' ' --replace 111 755 --replace 4755 0755 - makeFlags="DESTROOT=$out CC=cc" + # do not strip during install, broken on cross and we'll do ourselves as needed + substituteInPlace Makefile --replace ' -s cron' ' cron' + makeFlags="DESTROOT=$out CC=$CC" # We want to ignore the $glibc/include/paths.h definition of # sendmail path. |