freshBootstrapTools.{build,test}: group tools together

This commit is contained in:
annalee 2024-04-01 22:15:28 +00:00
parent 5748bfdd76
commit 39b3d15ad8
No known key found for this signature in database

View file

@ -110,27 +110,42 @@ rec {
cp -rL ${getDev gnugrep.pcre2}/include/* $out/include
mv $out/include $out/include-Libsystem
# Copy binutils.
for i in as ld ar ranlib nm strip otool install_name_tool lipo codesign_allocate; do
cp ${getBin cctools_}/bin/$i $out/bin
done
# Copy coreutils, bash, etc.
cp ${getBin coreutils_}/bin/* $out/bin
(cd $out/bin && rm vdir dir sha*sum pinky factor pathchk runcon shuf who whoami shred users)
cp ${getBin bash}/bin/bash $out/bin
ln -s bash $out/bin/sh
cp ${getBin findutils}/bin/find $out/bin
cp ${getBin findutils}/bin/xargs $out/bin
cp -d ${getBin bash}/bin/{ba,}sh $out/bin
cp -d ${getBin diffutils}/bin/* $out/bin
cp -d ${getBin gnused}/bin/* $out/bin
cp ${getBin findutils}/bin/{find,xargs} $out/bin
cp -d ${getBin gawk}/bin/{g,}awk $out/bin
cp -d ${getBin gnugrep}/bin/grep $out/bin
cp ${getBin gawk}/bin/gawk $out/bin
cp -d ${getBin gawk}/bin/awk $out/bin
cp -d ${getBin gnumake}/bin/* $out/bin
cp -d ${getBin gnused}/bin/* $out/bin
cp -d ${getBin patch}/bin/* $out/bin
cp -d ${getLib gettext}/lib/libintl*.dylib $out/lib
cp -d ${getLib gnugrep.pcre2}/lib/libpcre2*.dylib $out/lib
cp -d ${getLib libiconv}/lib/lib*.dylib $out/lib
cp -d ${getLib libxml2}/lib/libxml2*.dylib $out/lib
cp -d ${getLib ncurses}/lib/libncurses*.dylib $out/lib
# copy package extraction tools
cp -d ${getBin bzip2}/bin/b{,un}zip2 $out/bin
cp ${getBin cpio}/bin/cpio $out/bin
cp ${getBin gnutar}/bin/tar $out/bin
cp ${getBin gzip}/bin/.gzip-wrapped $out/bin/gzip
cp ${getBin bzip2}/bin/bzip2 $out/bin
ln -s bzip2 $out/bin/bunzip2
cp -d ${getBin gnumake}/bin/* $out/bin
cp -d ${getBin patch}/bin/* $out/bin
cp -d ${getBin xz}/bin/xz $out/bin
cp ${getBin cpio}/bin/cpio $out/bin
cp ${getBin pbzx}/bin/pbzx $out/bin
cp ${getBin xz}/bin/xz $out/bin
cp -d ${getLib bzip2}/lib/libbz2*.dylib $out/lib
cp -d ${getLib gmpxx}/lib/libgmp*.dylib $out/lib
cp -d ${getLib xar}/lib/libxar*.dylib $out/lib
cp -d ${getLib xz}/lib/liblzma*.dylib $out/lib
cp -d ${getLib zlib}/lib/libz*.dylib $out/lib
# This used to be in-nixpkgs, but now is in the bundle
# because I can't be bothered to make it partially static
@ -138,13 +153,6 @@ rec {
cp -d ${getLib curl_}/lib/libcurl*.dylib $out/lib
cp -d ${getLib openssl}/lib/*.dylib $out/lib
cp -d ${getLib gnugrep.pcre2}/lib/libpcre2*.dylib $out/lib
cp -d ${getLib libiconv}/lib/lib*.dylib $out/lib
cp -d ${getLib gettext}/lib/libintl*.dylib $out/lib
chmod +x $out/lib/libintl*.dylib
cp -d ${getLib ncurses}/lib/libncurses*.dylib $out/lib
cp -d ${getLib libxml2}/lib/libxml2*.dylib $out/lib
# Copy what we need of clang
cp -d ${getBin llvmPackages.clang-unwrapped}/bin/clang{,++,-cl,-cpp,-[0-9]*} $out/bin
cp -d ${getLib llvmPackages.clang-unwrapped}/lib/libclang-cpp*.dylib $out/lib
@ -158,31 +166,16 @@ rec {
cp -d ${getLib libffi}/lib/libffi*.dylib $out/lib
mkdir $out/include
cp -rd ${getDev llvmPackages.libcxx}/include/c++ $out/include
cp -rd ${getDev llvmPackages.libcxx}/include/c++ $out/include
# copy .tbd assembly utils
cp -d ${getBin pkgs.darwin.rewrite-tbd}/bin/rewrite-tbd $out/bin
cp -d ${getLib pkgs.libyaml}/lib/libyaml*.dylib $out/lib
# copy package extraction tools
cp -d ${getBin pkgs.pbzx}/bin/pbzx $out/bin
cp -d ${getLib pkgs.xar}/lib/libxar*.dylib $out/lib
cp -d ${getLib pkgs.bzip2}/lib/libbz2*.dylib $out/lib
cp ${getBin darwin.rewrite-tbd}/bin/rewrite-tbd $out/bin
cp -d ${getLib libyaml}/lib/libyaml*.dylib $out/lib
# copy sigtool
cp -d ${getBin pkgs.darwin.sigtool}/bin/sigtool $out/bin
cp -d ${getBin pkgs.darwin.sigtool}/bin/codesign $out/bin
cp -d ${getBin darwin.sigtool}/bin/{codesign,sigtool} $out/bin
cp -d ${getLib zlib}/lib/libz.* $out/lib
cp -d ${getLib gmpxx}/lib/libgmp*.* $out/lib
cp -d ${getLib xz}/lib/liblzma*.* $out/lib
# Copy binutils.
for i in as ld ar ranlib nm strip otool install_name_tool lipo codesign_allocate; do
cp ${getBin cctools_}/bin/$i $out/bin
done
cp -d ${getLib darwin.libtapi}/lib/libtapi* $out/lib
cp -d ${getLib darwin.libtapi}/lib/libtapi*.dylib $out/lib
# tools needed to unpack bootstrap archive
mkdir -p unpack/bin unpack/lib