Skip to content

symlinking of crates causes issues with macos sandbox #482

@j-baker

Description

@j-baker

Hi!

I build on MacOS with the Nix sandbox enabled. This is because I run a MacOS build worker which pushes into a company-shared cache; I want to isolate builds so as to make it as hard as possible for one malicious user to poison the cache.

The MacOS sandbox definition that Nix uses contains all the store paths, and has a relatively low max size which clearly is somewhere in the 500-800 nix store paths region.

I have a project with around 700 crate dependencies. Due to the cargo vendor process symlinking, this means that there are > num dependency crates store paths in any cargo build derivation, which places a limit on the number of crates one can depend on.

I'm wondering if this project would consider copying crates instead of symlinking? Happy to make an MR which makes the change.

The downside would be slightly greater disk usage, the benefit would be that bigger projects can be built on Mac with sandboxing!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions