Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crane builds create /homeless-shelter files which breaks nix #815

Open
pcarrier opened this issue Mar 19, 2025 · 2 comments
Open

crane builds create /homeless-shelter files which breaks nix #815

pcarrier opened this issue Mar 19, 2025 · 2 comments
Labels
bug Something isn't working needs reproduction Missing a flake which easily reproduces the problem

Comments

@pcarrier
Copy link

Operations fail because of:

error: home directory '/homeless-shelter' exists; please remove it to assure purity of builds without sandboxing

/homeless-shelter contains:

/homeless-shelter
/homeless-shelter/.cargo
/homeless-shelter/.cargo/.package-cache
/homeless-shelter/.cargo/.global-cache
/homeless-shelter/.cargo/.package-cache-mutate

This is produced while evaluating a flake containing:

            jaiminho = (crane.mkLib pkgs).buildPackage {
              src = ./jaiminho;
              pname = "jaiminho";
              version = "0.0.0";
              cargoExtraArgs = "-p jaiminho_cli";
              nativeBuildInputs = with pkgs; [
                cmake
                nasm
              ];
              strictDeps = true;
              doCheck = false;
            };

on a daemonless Nix as root inside docker whose image is built with:

              trampolineBase = pkgs.dockerTools.buildImage {
                name = "trampoline-base";
                copyToRoot = pkgs.buildEnv {
                  name = "trampoline-base-root";
                  paths = [
                    pkgs.dockerTools.caCertificates
                    pkgs.dockerTools.fakeNss
                    pkgs.git
                    pkgs.nix
                    pkgs.bash
                    pkgs.busybox
                  ];
                  pathsToLink = [
                    "/bin"
                    "/etc"
                  ];
                };
              };
@pcarrier pcarrier added the bug Something isn't working label Mar 19, 2025
@pcarrier
Copy link
Author

Worked around by disabling sandbox, but keeping around as FYI.

@ipetkov
Copy link
Owner

ipetkov commented Mar 19, 2025

Hi @pcarrier thanks for the report! Could you please provide a(n ideally minimal,) and self-contained flake that reproduces the problem? It's hard to investigate this further from just a snippet

@ipetkov ipetkov added the needs reproduction Missing a flake which easily reproduces the problem label Mar 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs reproduction Missing a flake which easily reproduces the problem
Projects
None yet
Development

No branches or pull requests

2 participants