Skip to content

build-dir has "no space left on device" when root-safe-haven is too small #18

@MattSturgeon

Description

@MattSturgeon

I'm unsure if this is something nothing-but-nix can solve or not, but this feels like the best place to discuss this either way.

I spend a few hours yesterday trying to get GitHub Actions to build my nix config, and nothing-but-nix has certainly helped with that. However while nothing-but-nix seems to be creating a lot of space in the nix-store, at least one package is running out of space in /build during its build.

The package in question is nexusmods-app-unfree, which only has a closure size of ~500MB, however due to the nixpkgs dotnet infrestructure probably uses more space than that during its build.

$ export NIXPKGS_ALLOW_UNFREE=1
$ nix path-info nixpkgs#nexusmods-app-unfree --impure --closure-size --human-readable
/nix/store/86chn7cga31mi4vqkq09rdm7s6px9zp6-nexusmods-app-unfree-0.10.2  553.4 MiB

Because it is an unfree package, it doesn't benefit from hydra caching. Therefore I was hoping my GitHub Actions workflow would cache it to my Cachix cache.

You can see it failing on several workflow runs, e.g. this one.

Switching to the cached "free" variant causes my workflow to complete successfully.

  1. Is /build mounted separately, so it doesn't benefit from nothing-but-nix?
  2. If so, could this change?
  3. Is there a good way to inspect how much space is used by a package build?
  4. And/or how much free space is available in /build?
  5. Is this a known issue? If so should it be mentioned in the README?

Sidenote: I'm one of the package maintainers for nexusmods-app, so if this issue is indicating a packaging issue I'd also be interested in feedback for how to improve the package

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions