Merge pull request #40529 from obsidiansystems/strictDeps
treewide: Remove crossConfig and add strictDeps
This commit is contained in:
commit
71bbe836b9
|
@ -188,6 +188,7 @@ stdenv.mkDerivation {
|
||||||
else throw "unknown emulation for platform: " + targetPlatform.config;
|
else throw "unknown emulation for platform: " + targetPlatform.config;
|
||||||
in targetPlatform.platform.bfdEmulation or (fmt + sep + arch);
|
in targetPlatform.platform.bfdEmulation or (fmt + sep + arch);
|
||||||
|
|
||||||
|
strictDeps = true;
|
||||||
depsTargetTargetPropagated = extraPackages;
|
depsTargetTargetPropagated = extraPackages;
|
||||||
|
|
||||||
wrapperName = "BINTOOLS_WRAPPER";
|
wrapperName = "BINTOOLS_WRAPPER";
|
||||||
|
|
|
@ -8,7 +8,7 @@ set -u
|
||||||
# native compile.
|
# native compile.
|
||||||
#
|
#
|
||||||
# TODO(@Ericson2314): No native exception
|
# TODO(@Ericson2314): No native exception
|
||||||
[[ -z ${crossConfig-} ]] || (( "$hostOffset" < 0 )) || return 0
|
[[ -z ${strictDeps-} ]] || (( "$hostOffset" < 0 )) || return 0
|
||||||
|
|
||||||
bintoolsWrapper_addLDVars () {
|
bintoolsWrapper_addLDVars () {
|
||||||
# See ../setup-hooks/role.bash
|
# See ../setup-hooks/role.bash
|
||||||
|
|
|
@ -188,6 +188,7 @@ stdenv.mkDerivation {
|
||||||
wrap ${targetPrefix}gccgo ${./cc-wrapper.sh} $ccPath/${targetPrefix}gccgo
|
wrap ${targetPrefix}gccgo ${./cc-wrapper.sh} $ccPath/${targetPrefix}gccgo
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
strictDeps = true;
|
||||||
propagatedBuildInputs = [ bintools ];
|
propagatedBuildInputs = [ bintools ];
|
||||||
depsTargetTargetPropagated = extraPackages;
|
depsTargetTargetPropagated = extraPackages;
|
||||||
|
|
||||||
|
|
|
@ -60,7 +60,7 @@ set -u
|
||||||
# native compile.
|
# native compile.
|
||||||
#
|
#
|
||||||
# TODO(@Ericson2314): No native exception
|
# TODO(@Ericson2314): No native exception
|
||||||
[[ -z ${crossConfig-} ]] || (( "$hostOffset" < 0 )) || return 0
|
[[ -z ${strictDeps-} ]] || (( "$hostOffset" < 0 )) || return 0
|
||||||
|
|
||||||
# It's fine that any other cc-wrapper will redefine this. Bash functions close
|
# It's fine that any other cc-wrapper will redefine this. Bash functions close
|
||||||
# over no state, and there's no @-substitutions within, so any redefined
|
# over no state, and there's no @-substitutions within, so any redefined
|
||||||
|
|
|
@ -129,10 +129,8 @@ stdenv.mkDerivation rec {
|
||||||
"--disable-large-address-space"
|
"--disable-large-address-space"
|
||||||
];
|
];
|
||||||
|
|
||||||
# Hack to make sure we never to the relaxation `$PATH` and hooks support for
|
# Make sure we never relax`$PATH` and hooks support for compatability.
|
||||||
# compatability. This will be replaced with something clearer in a future
|
strictDeps = true;
|
||||||
# masss-rebuild.
|
|
||||||
crossConfig = true;
|
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
ghc perl libxml2 libxslt docbook_xsl docbook_xml_dtd_45 docbook_xml_dtd_42 hscolour
|
ghc perl libxml2 libxslt docbook_xsl docbook_xml_dtd_45 docbook_xml_dtd_42 hscolour
|
||||||
|
|
|
@ -128,10 +128,8 @@ stdenv.mkDerivation rec {
|
||||||
"--disable-large-address-space"
|
"--disable-large-address-space"
|
||||||
];
|
];
|
||||||
|
|
||||||
# Hack to make sure we never to the relaxation `$PATH` and hooks support for
|
# Make sure we never relax`$PATH` and hooks support for compatability.
|
||||||
# compatability. This will be replaced with something clearer in a future
|
strictDeps = true;
|
||||||
# masss-rebuild.
|
|
||||||
crossConfig = true;
|
|
||||||
|
|
||||||
nativeBuildInputs = [ ghc perl hscolour sphinx ];
|
nativeBuildInputs = [ ghc perl hscolour sphinx ];
|
||||||
|
|
||||||
|
|
|
@ -147,10 +147,8 @@ stdenv.mkDerivation rec {
|
||||||
"--disable-large-address-space"
|
"--disable-large-address-space"
|
||||||
];
|
];
|
||||||
|
|
||||||
# Hack to make sure we never to the relaxation `$PATH` and hooks support for
|
# Make sure we never relax`$PATH` and hooks support for compatability.
|
||||||
# compatability. This will be replaced with something clearer in a future
|
strictDeps = true;
|
||||||
# masss-rebuild.
|
|
||||||
crossConfig = true;
|
|
||||||
|
|
||||||
nativeBuildInputs = [ alex autoconf autoreconfHook automake ghc happy hscolour perl python3 sphinx ];
|
nativeBuildInputs = [ alex autoconf autoreconfHook automake ghc happy hscolour perl python3 sphinx ];
|
||||||
|
|
||||||
|
|
|
@ -138,10 +138,8 @@ stdenv.mkDerivation rec {
|
||||||
"--disable-large-address-space"
|
"--disable-large-address-space"
|
||||||
];
|
];
|
||||||
|
|
||||||
# Hack to make sure we never to the relaxation `$PATH` and hooks support for
|
# Make sure we never relax`$PATH` and hooks support for compatability.
|
||||||
# compatability. This will be replaced with something clearer in a future
|
strictDeps = true;
|
||||||
# masss-rebuild.
|
|
||||||
crossConfig = true;
|
|
||||||
|
|
||||||
nativeBuildInputs = [ ghc perl autoconf automake m4 happy alex python3 ];
|
nativeBuildInputs = [ ghc perl autoconf automake m4 happy alex python3 ];
|
||||||
|
|
||||||
|
|
|
@ -136,10 +136,8 @@ stdenv.mkDerivation rec {
|
||||||
"--disable-large-address-space"
|
"--disable-large-address-space"
|
||||||
];
|
];
|
||||||
|
|
||||||
# Hack to make sure we never to the relaxation `$PATH` and hooks support for
|
# Make sure we never relax`$PATH` and hooks support for compatability.
|
||||||
# compatability. This will be replaced with something clearer in a future
|
strictDeps = true;
|
||||||
# masss-rebuild.
|
|
||||||
crossConfig = true;
|
|
||||||
|
|
||||||
nativeBuildInputs = [ ghc perl autoconf automake happy alex python3 ];
|
nativeBuildInputs = [ ghc perl autoconf automake happy alex python3 ];
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,11 @@ stdenv.mkDerivation rec {
|
||||||
setOutputFlags = false; # $dev gets into the library otherwise
|
setOutputFlags = false; # $dev gets into the library otherwise
|
||||||
|
|
||||||
# GCC 4.6 raises a number of set-but-unused warnings.
|
# 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 ]
|
depsBuildBuild = [ buildPackages.stdenv.cc ]
|
||||||
++ stdenv.lib.optional (hostPlatform != buildPlatform)
|
++ stdenv.lib.optional (hostPlatform != buildPlatform)
|
||||||
|
@ -34,17 +38,8 @@ stdenv.mkDerivation rec {
|
||||||
libtool
|
libtool
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
patches = [ ./cpp-4.5.patch ];
|
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 = ''
|
preBuild = ''
|
||||||
sed -e '/lt_dlinit/a lt_dladdsearchdir("'$out/lib'");' -i libguile/dynl.c
|
sed -e '/lt_dlinit/a lt_dladdsearchdir("'$out/lib'");' -i libguile/dynl.c
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -22,6 +22,8 @@ stdenv.mkDerivation rec {
|
||||||
"--with-cache-dir=/var/cache/fontconfig"
|
"--with-cache-dir=/var/cache/fontconfig"
|
||||||
"--disable-docs"
|
"--disable-docs"
|
||||||
"--with-default-fonts="
|
"--with-default-fonts="
|
||||||
|
] ++ stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
|
||||||
|
"--with-arch=${hostPlatform.parsed.cpu.name}"
|
||||||
];
|
];
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
|
@ -45,6 +45,8 @@ stdenv.mkDerivation rec {
|
||||||
"--disable-docs"
|
"--disable-docs"
|
||||||
# just <1MB; this is what you get when loading config fails for some reason
|
# just <1MB; this is what you get when loading config fails for some reason
|
||||||
"--with-default-fonts=${dejavu_fonts.minimal}"
|
"--with-default-fonts=${dejavu_fonts.minimal}"
|
||||||
|
] ++ stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
|
||||||
|
"--with-arch=${hostPlatform.parsed.cpu.name}"
|
||||||
];
|
];
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
|
@ -16,12 +16,19 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
LDFLAGS = if stdenv.isSunOS then "-lm -lmd -lmp -luutil -lnvpair -lnsl -lidmap -lavl -lsec" else "";
|
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
|
# avoid retaining reference to CF during stdenv bootstrap
|
||||||
++ lib.optionals stdenv.isDarwin [
|
] ++ lib.optionals stdenv.isDarwin [
|
||||||
"gt_cv_func_CFPreferencesCopyAppValue=no"
|
"gt_cv_func_CFPreferencesCopyAppValue=no"
|
||||||
"gt_cv_func_CFLocaleCopyCurrent=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 = ''
|
postPatch = ''
|
||||||
substituteAllInPlace gettext-runtime/src/gettext.sh.in
|
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
|
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 ];
|
nativeBuildInputs = [ xz xz.bin ];
|
||||||
# HACK, see #10874 (and 14664)
|
# HACK, see #10874 (and 14664)
|
||||||
buildInputs = stdenv.lib.optional (!stdenv.isLinux && !hostPlatform.isCygwin) libiconv;
|
buildInputs = stdenv.lib.optional (!stdenv.isLinux && !hostPlatform.isCygwin) libiconv;
|
||||||
|
|
|
@ -71,14 +71,15 @@ callPackage ./common.nix { inherit stdenv; } {
|
||||||
|
|
||||||
# Get rid of more unnecessary stuff.
|
# Get rid of more unnecessary stuff.
|
||||||
rm -rf $out/var $bin/bin/sln
|
rm -rf $out/var $bin/bin/sln
|
||||||
|
''
|
||||||
# For some reason these aren't stripped otherwise and retain reference
|
# For some reason these aren't stripped otherwise and retain reference
|
||||||
# to bootstrap-tools; on cross-arm this stripping would break objects.
|
# to bootstrap-tools; on cross-arm this stripping would break objects.
|
||||||
if [ -z "$crossConfig" ]; then
|
+ stdenv.lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) ''
|
||||||
for i in "$out"/lib/*.a; do
|
|
||||||
[ "$i" = "$out/lib/libm.a" ] || strip -S "$i"
|
for i in "$out"/lib/*.a; do
|
||||||
done
|
[ "$i" = "$out/lib/libm.a" ] || $STRIP -S "$i"
|
||||||
fi
|
done
|
||||||
|
'' + ''
|
||||||
|
|
||||||
# Put libraries for static linking in a separate output. Note
|
# Put libraries for static linking in a separate output. Note
|
||||||
# that libc_nonshared.a and libpthread_nonshared.a are required
|
# that libc_nonshared.a and libpthread_nonshared.a are required
|
||||||
|
|
|
@ -80,19 +80,23 @@ stdenv.mkDerivation rec {
|
||||||
configureFlags="--parallel=''${NIX_BUILD_CORES:-1} $configureFlags"
|
configureFlags="--parallel=''${NIX_BUILD_CORES:-1} $configureFlags"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
configureFlags = [ "--docdir=share/doc/${name}" ]
|
configureFlags = [
|
||||||
++ (if useSharedLibraries then [ "--no-system-jsoncpp" "--system-libs" ] else [ "--no-system-libs" ]) # FIXME: cleanup
|
"--docdir=share/doc/${name}"
|
||||||
++ optional (useQt4 || withQt5) "--qt-gui"
|
# We should set the proper `CMAKE_SYSTEM_NAME`.
|
||||||
++ ["--"]
|
# http://www.cmake.org/Wiki/CMake_Cross_Compiling
|
||||||
++ optionals (!useNcurses) [ "-DBUILD_CursesDialog=OFF" ]
|
#
|
||||||
++ optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
|
# Unfortunately cmake seems to expect absolute paths for ar, ranlib, and
|
||||||
"-DCMAKE_CXX_COMPILER=${stdenv.cc.targetPrefix}c++"
|
# strip. Otherwise they are taken to be relative to the source root of the
|
||||||
"-DCMAKE_C_COMPILER=${stdenv.cc.targetPrefix}cc"
|
# package being built.
|
||||||
"-DCMAKE_AR=${getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}ar"
|
"-DCMAKE_CXX_COMPILER=${stdenv.cc.targetPrefix}c++"
|
||||||
"-DCMAKE_RANLIB=${getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}ranlib"
|
"-DCMAKE_C_COMPILER=${stdenv.cc.targetPrefix}cc"
|
||||||
"-DCMAKE_STRIP=${getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}strip"
|
"-DCMAKE_AR=${getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}ar"
|
||||||
# TODO: Why are ar and friends not provided by the bintools wrapper?
|
"-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;
|
dontUseCmakeConfigure = true;
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
|
@ -29,20 +29,17 @@ cmakeConfigurePhase() {
|
||||||
cmakeFlags="-DCMAKE_INSTALL_PREFIX=$prefix $cmakeFlags"
|
cmakeFlags="-DCMAKE_INSTALL_PREFIX=$prefix $cmakeFlags"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$crossConfig" ]; then
|
# We should set the proper `CMAKE_SYSTEM_NAME`.
|
||||||
# By now it supports linux builds only. We should set the proper
|
# http://www.cmake.org/Wiki/CMake_Cross_Compiling
|
||||||
# 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
|
||||||
# Unfortunately cmake seems to expect absolute paths for ar, ranlib, and
|
# package being built.
|
||||||
# strip. Otherwise they are taken to be relative to the source root of
|
cmakeFlags="-DCMAKE_CXX_COMPILER=$CXX $cmakeFlags"
|
||||||
# the package being built.
|
cmakeFlags="-DCMAKE_C_COMPILER=$CC $cmakeFlags"
|
||||||
cmakeFlags="-DCMAKE_CXX_COMPILER=$crossConfig-c++ $cmakeFlags"
|
cmakeFlags="-DCMAKE_AR=$(command -v $AR) $cmakeFlags"
|
||||||
cmakeFlags="-DCMAKE_C_COMPILER=$crossConfig-cc $cmakeFlags"
|
cmakeFlags="-DCMAKE_RANLIB=$(command -v $RANLAB) $cmakeFlags"
|
||||||
cmakeFlags="-DCMAKE_AR=$(command -v $crossConfig-ar) $cmakeFlags"
|
cmakeFlags="-DCMAKE_STRIP=$(command -v $STRIP) $cmakeFlags"
|
||||||
cmakeFlags="-DCMAKE_RANLIB=$(command -v $crossConfig-ranlib) $cmakeFlags"
|
|
||||||
cmakeFlags="-DCMAKE_STRIP=$(command -v $crossConfig-strip) $cmakeFlags"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# on macOS we want to prefer Unix-style headers to Frameworks
|
# on macOS we want to prefer Unix-style headers to Frameworks
|
||||||
# because we usually do not package the framework
|
# because we usually do not package the framework
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
{stdenv, fetchurl, fetchgit}:
|
{stdenv, fetchurl, fetchgit}:
|
||||||
|
|
||||||
# We should enable this check once we have the cross target system information
|
|
||||||
# assert stdenv.system == "armv5tel-linux" || crossConfig == "armv5tel-linux";
|
|
||||||
|
|
||||||
# All this file is made for the Marvell Sheevaplug
|
# All this file is made for the Marvell Sheevaplug
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
|
@ -30,21 +27,19 @@ stdenv.mkDerivation {
|
||||||
sed -i -e 's/0x200000;bootm/0x400000;bootm/' include/configs/qi_lb60.h
|
sed -i -e 's/0x200000;bootm/0x400000;bootm/' include/configs/qi_lb60.h
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Remove the cross compiler prefix, and add reiserfs support
|
makeFlags = [
|
||||||
|
"CROSS_COMPILE=${stdenv.cc.targetPrefix}"
|
||||||
|
];
|
||||||
|
|
||||||
|
# Add reiserfs support
|
||||||
configurePhase = ''
|
configurePhase = ''
|
||||||
make mrproper
|
make mrproper
|
||||||
make qi_lb60_config
|
make qi_lb60_config
|
||||||
sed -i /CROSS_COMPILE/d include/config.mk
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
buildPhase = ''
|
preBuild= ''
|
||||||
# A variable named 'src' used to affect the build in some uboot...
|
# A variable named 'src' used to affect the build in some uboot...
|
||||||
unset src
|
unset -v src
|
||||||
if test -z "$crossConfig"; then
|
|
||||||
make clean all
|
|
||||||
else
|
|
||||||
make clean all ARCH=mips CROSS_COMPILE=$crossConfig-
|
|
||||||
fi
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
dontStrip = true;
|
dontStrip = true;
|
||||||
|
@ -59,6 +54,6 @@ stdenv.mkDerivation {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
platforms = [ "mipsel-linux" ];
|
platforms = stdenv.lib.platforms.mips;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,11 +5,9 @@ let
|
||||||
inherit (stdenv) lib isDarwin;
|
inherit (stdenv) lib isDarwin;
|
||||||
inherit (lib) overrideDerivation;
|
inherit (lib) overrideDerivation;
|
||||||
|
|
||||||
setMalloc0ReturnsNullCrossCompiling = ''
|
malloc0ReturnsNullCrossFlag = stdenv.lib.optional
|
||||||
if test -n "$crossConfig"; then
|
(stdenv.hostPlatform != stdenv.buildPlatform)
|
||||||
configureFlags="$configureFlags --enable-malloc0returnsnull";
|
"--enable-malloc0returnsnull";
|
||||||
fi
|
|
||||||
'';
|
|
||||||
|
|
||||||
gitRelease = { libName, version, rev, sha256 } : attrs : attrs // {
|
gitRelease = { libName, version, rev, sha256 } : attrs : attrs // {
|
||||||
name = libName + "-" + version;
|
name = libName + "-" + version;
|
||||||
|
@ -101,7 +99,9 @@ in
|
||||||
|
|
||||||
libX11 = attrs: attrs // {
|
libX11 = attrs: attrs // {
|
||||||
outputs = [ "out" "dev" "man" ];
|
outputs = [ "out" "dev" "man" ];
|
||||||
preConfigure = setMalloc0ReturnsNullCrossCompiling + ''
|
configureFlags = attrs.configureFlags or []
|
||||||
|
++ malloc0ReturnsNullCrossFlag;
|
||||||
|
preConfigure = ''
|
||||||
sed 's,^as_dummy.*,as_dummy="\$PATH",' -i configure
|
sed 's,^as_dummy.*,as_dummy="\$PATH",' -i configure
|
||||||
'';
|
'';
|
||||||
postInstall =
|
postInstall =
|
||||||
|
@ -138,16 +138,19 @@ in
|
||||||
|
|
||||||
libXxf86vm = attrs: attrs // {
|
libXxf86vm = attrs: attrs // {
|
||||||
outputs = [ "out" "dev" ];
|
outputs = [ "out" "dev" ];
|
||||||
preConfigure = setMalloc0ReturnsNullCrossCompiling;
|
configureFlags = attrs.configureFlags or []
|
||||||
|
++ malloc0ReturnsNullCrossFlag;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Propagate some build inputs because of header file dependencies.
|
# Propagate some build inputs because of header file dependencies.
|
||||||
# Note: most of these are in Requires.private, so maybe builder.sh
|
# Note: most of these are in Requires.private, so maybe builder.sh
|
||||||
# should propagate them automatically.
|
# should propagate them automatically.
|
||||||
libXt = attrs: attrs // {
|
libXt = attrs: attrs // {
|
||||||
preConfigure = setMalloc0ReturnsNullCrossCompiling + ''
|
preConfigure = ''
|
||||||
sed 's,^as_dummy.*,as_dummy="\$PATH",' -i configure
|
sed 's,^as_dummy.*,as_dummy="\$PATH",' -i configure
|
||||||
'';
|
'';
|
||||||
|
configureFlags = attrs.configureFlags or []
|
||||||
|
++ malloc0ReturnsNullCrossFlag;
|
||||||
propagatedBuildInputs = [ xorg.libSM ];
|
propagatedBuildInputs = [ xorg.libSM ];
|
||||||
CPP = stdenv.lib.optionalString stdenv.isDarwin "clang -E -";
|
CPP = stdenv.lib.optionalString stdenv.isDarwin "clang -E -";
|
||||||
outputs = [ "out" "dev" "devdoc" ];
|
outputs = [ "out" "dev" "devdoc" ];
|
||||||
|
@ -188,7 +191,8 @@ in
|
||||||
libXft = attrs: attrs // {
|
libXft = attrs: attrs // {
|
||||||
outputs = [ "out" "dev" ];
|
outputs = [ "out" "dev" ];
|
||||||
propagatedBuildInputs = [ xorg.libXrender args.freetype args.fontconfig ];
|
propagatedBuildInputs = [ xorg.libXrender args.freetype args.fontconfig ];
|
||||||
preConfigure = setMalloc0ReturnsNullCrossCompiling;
|
configureFlags = attrs.configureFlags or []
|
||||||
|
++ malloc0ReturnsNullCrossFlag;
|
||||||
# the include files need ft2build.h, and Requires.private isn't enough for us
|
# the include files need ft2build.h, and Requires.private isn't enough for us
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
sed "/^Requires:/s/$/, freetype2/" -i "$dev/lib/pkgconfig/xft.pc"
|
sed "/^Requires:/s/$/, freetype2/" -i "$dev/lib/pkgconfig/xft.pc"
|
||||||
|
@ -198,7 +202,8 @@ in
|
||||||
libXext = attrs: attrs // {
|
libXext = attrs: attrs // {
|
||||||
outputs = [ "out" "dev" "man" "doc" ];
|
outputs = [ "out" "dev" "man" "doc" ];
|
||||||
propagatedBuildInputs = [ xorg.xproto xorg.libXau ];
|
propagatedBuildInputs = [ xorg.xproto xorg.libXau ];
|
||||||
preConfigure = setMalloc0ReturnsNullCrossCompiling;
|
configureFlags = attrs.configureFlags or []
|
||||||
|
++ malloc0ReturnsNullCrossFlag;
|
||||||
};
|
};
|
||||||
|
|
||||||
libXfixes = attrs: attrs // {
|
libXfixes = attrs: attrs // {
|
||||||
|
@ -221,7 +226,8 @@ in
|
||||||
|
|
||||||
libXrandr = attrs: attrs // {
|
libXrandr = attrs: attrs // {
|
||||||
outputs = [ "out" "dev" ];
|
outputs = [ "out" "dev" ];
|
||||||
preConfigure = setMalloc0ReturnsNullCrossCompiling;
|
configureFlags = attrs.configureFlags or []
|
||||||
|
++ malloc0ReturnsNullCrossFlag;
|
||||||
propagatedBuildInputs = [xorg.libXrender];
|
propagatedBuildInputs = [xorg.libXrender];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -232,8 +238,9 @@ in
|
||||||
|
|
||||||
libXrender = attrs: attrs // {
|
libXrender = attrs: attrs // {
|
||||||
outputs = [ "out" "dev" "doc" ];
|
outputs = [ "out" "dev" "doc" ];
|
||||||
|
configureFlags = attrs.configureFlags or []
|
||||||
|
++ malloc0ReturnsNullCrossFlag;
|
||||||
propagatedBuildInputs = [ xorg.renderproto ];
|
propagatedBuildInputs = [ xorg.renderproto ];
|
||||||
preConfigure = setMalloc0ReturnsNullCrossCompiling;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
libXres = attrs: attrs // {
|
libXres = attrs: attrs // {
|
||||||
|
|
|
@ -87,8 +87,6 @@ rec {
|
||||||
(hostPlatform.isAarch64 || hostPlatform.isMips || hostPlatform.libc == "musl")
|
(hostPlatform.isAarch64 || hostPlatform.isMips || hostPlatform.libc == "musl")
|
||||||
pkgs.updateAutotoolsGnuConfigScriptsHook
|
pkgs.updateAutotoolsGnuConfigScriptsHook
|
||||||
;
|
;
|
||||||
|
|
||||||
crossConfig = hostPlatform.config;
|
|
||||||
} // args.crossAttrs or {});
|
} // args.crossAttrs or {});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,8 @@ rec {
|
||||||
# InstallCheck phase
|
# InstallCheck phase
|
||||||
, doInstallCheck ? config.doCheckByDefault or false
|
, doInstallCheck ? config.doCheckByDefault or false
|
||||||
|
|
||||||
, crossConfig ? null
|
, # TODO(@Ericson2314): Make always true and remove
|
||||||
|
strictDeps ? stdenv.hostPlatform != stdenv.buildPlatform
|
||||||
, meta ? {}
|
, meta ? {}
|
||||||
, passthru ? {}
|
, passthru ? {}
|
||||||
, pos ? # position used in error messages and for meta.position
|
, pos ? # position used in error messages and for meta.position
|
||||||
|
@ -177,6 +178,8 @@ rec {
|
||||||
userHook = config.stdenv.userHook or null;
|
userHook = config.stdenv.userHook or null;
|
||||||
__ignoreNulls = true;
|
__ignoreNulls = true;
|
||||||
|
|
||||||
|
inherit strictDeps;
|
||||||
|
|
||||||
depsBuildBuild = lib.elemAt (lib.elemAt dependencies 0) 0;
|
depsBuildBuild = lib.elemAt (lib.elemAt dependencies 0) 0;
|
||||||
nativeBuildInputs = lib.elemAt (lib.elemAt dependencies 0) 1;
|
nativeBuildInputs = lib.elemAt (lib.elemAt dependencies 0) 1;
|
||||||
depsBuildTarget = lib.elemAt (lib.elemAt dependencies 0) 2;
|
depsBuildTarget = lib.elemAt (lib.elemAt dependencies 0) 2;
|
||||||
|
|
|
@ -501,7 +501,7 @@ activatePackage() {
|
||||||
# the transition, we do include everything in thatcase.
|
# the transition, we do include everything in thatcase.
|
||||||
#
|
#
|
||||||
# TODO(@Ericson2314): Don't special-case native compilation
|
# TODO(@Ericson2314): Don't special-case native compilation
|
||||||
if [[ ( -z "${crossConfig-}" || "$hostOffset" -le -1 ) && -d "$pkg/bin" ]]; then
|
if [[ ( -z "${strictDeps-}" || "$hostOffset" -le -1 ) && -d "$pkg/bin" ]]; then
|
||||||
addToSearchPath _PATH "$pkg/bin"
|
addToSearchPath _PATH "$pkg/bin"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -551,7 +551,7 @@ _addToEnv() {
|
||||||
for depTargetOffset in "${allPlatOffsets[@]}"; do
|
for depTargetOffset in "${allPlatOffsets[@]}"; do
|
||||||
(( "$depHostOffset" <= "$depTargetOffset" )) || continue
|
(( "$depHostOffset" <= "$depTargetOffset" )) || continue
|
||||||
local hookRef="${hookVar}[$depTargetOffset - $depHostOffset]"
|
local hookRef="${hookVar}[$depTargetOffset - $depHostOffset]"
|
||||||
if [[ -z "${crossConfig-}" ]]; then
|
if [[ -z "${strictDeps-}" ]]; then
|
||||||
# Apply environment hooks to all packages during native
|
# Apply environment hooks to all packages during native
|
||||||
# compilation to ease the transition.
|
# compilation to ease the transition.
|
||||||
#
|
#
|
||||||
|
|
|
@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
|
||||||
# Hack to make sure we never to the relaxation `$PATH` and hooks support for
|
# 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
|
# compatability. This will be replaced with something clearer in a future
|
||||||
# masss-rebuild.
|
# masss-rebuild.
|
||||||
crossConfig = true;
|
strictDeps = true;
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "GNU software calculator";
|
description = "GNU software calculator";
|
||||||
|
|
Loading…
Reference in a new issue