2 pkgs ? import ../../.. { },
6 inherit (pkgs) lib stdenv config;
8 libc = pkgs.stdenv.cc.libc;
10 patchelf = pkgs.patchelf.overrideAttrs (previousAttrs: {
11 NIX_CFLAGS_COMPILE = (previousAttrs.NIX_CFLAGS_COMPILE or [ ]) ++ [
15 NIX_CFLAGS_LINK = (previousAttrs.NIX_CFLAGS_LINK or [ ]) ++ [
22 coreutilsMinimal = pkgs.coreutils.override (args: {
23 # We want coreutils without ACL/attr support.
26 # Our tooling currently can't handle scripts in bin/, only ELFs and symlinks.
27 singleBinary = "symlinks";
30 tarMinimal = pkgs.gnutar.override { acl = null; };
32 busyboxMinimal = pkgs.busybox.override {
33 useMusl = lib.meta.availableOn stdenv.hostPlatform pkgs.musl;
40 CONFIG_ASH_OPTIMIZE_FOR_SIZE y
47 bootGCC = pkgs.gcc.cc.override {
52 bootBinutils = pkgs.binutils.bintools.override {
53 withAllTargets = false;
54 # Don't need two linkers, disable whatever's not primary/default.
56 # bootstrap is easier w/static
60 build = pkgs.callPackage ./stdenv-bootstrap-tools.nix {
72 inherit (build) bootstrapFiles;
74 bootstrapTools = import ./bootstrap-tools {
75 inherit (stdenv.buildPlatform) system; # Used to determine where to build
76 inherit (stdenv.hostPlatform) libc;
77 inherit lib bootstrapFiles config;
80 test = pkgs.callPackage ./test-bootstrap-tools.nix {
81 inherit bootstrapTools;
82 inherit (bootstrapFiles) busybox;