Aux Foundational Packages

Here is a separate set of packages all built starting from a single 357 byte binary seed. Everything else is built from source, working all the way up to gcc. The project does not depend on NixPkgs. The only dependency is the lib experiment in the same repository.

Note that only i686-linux packages are available here, cross compilation is left as future work for anyone interested.

And a huge thanks to @emilytrau for her work on the minimal-bootstrap packages in NixPkgs as well as her help and advice while I have been getting this set up.

25 Likes

That sounds really cool! How is it different from what Nixpkgs does? How are those differences more or less desirable in what circumstances?

I’d love to read a blog-post-length explanation of how this works and what problem it solves.

2 Likes

The 357-byte binary seed appears to be the same as the one the Guix project uses. More information at Guix’s blog post:

4 Likes

Linking the progress on Nixpkgs for reference:

cc @emilytrau .

6 Likes

I was wondering if all derivation could be avoided and builder could be used.
ie:

# https://git.auxolotl.org/auxolotl/labs/src/branch/main/tidepool/src/packages/foundation/gcc/default.nix#L48
src = lib.options.create {
- type        = lib.types.derivation
+ type        = lib.types.builder;
  description = "The mpfr source for the package.";
};
.
.
.
# https://git.auxolotl.org/auxolotl/labs/src/branch/main/tidepool/src/packages/foundation/gcc/default.nix#L201
- src = builtins.fetchurl {
+ src = {
+   builder = builtins.fetchurl;
    url     = "${mirrors.gnu}/mpfr/mpfr-${config.mpfr.version}.tar.xz";
    sha256  = "J3gHNTpnJpeJlpRa8T5Sgp46vXqaW3+yeTiU4Y8fy7I=";
  };
.
.
.
# https://git.auxolotl.org/auxolotl/labs/src/branch/main/tidepool/src/packages/foundation/gcc/default.nix#L134
unpack = lib.dag.entry.before ["patch"] ''
   # Unpack
-  tar xf ${config.mpfr.src}
+  tar xf ${config.mpfr.src.drv}      # not sure if this is possible
+  tar xf ${lib.drv config.mpfr.src}  # alternative take
'';

Use cases:

  • Override hash or url
  • Exporting SBOM without fetching src
2 Likes