zhaofengli / colmena

A simple, stateless NixOS deployment tool
https://colmena.cli.rs
MIT License
1.16k stars 64 forks source link

error: path '«unknown»/tmp' is a symlink on Darwin #190

Open camelpunch opened 8 months ago

camelpunch commented 8 months ago

A colmena build with flakes will choke on Darwin, because /tmp is a symlink to /private/tmp.

I've created a minimal flake example here.

The following reproduces the error:

nix develop --command -- colmena build
devusb commented 7 months ago

I just started having this problem -- also with var:

error (ignored): error: end of string reached
error:
       … while fetching the input 'path:/var/folders/z_/ygmnyz_s7ss3zw7qvry5fzhm0000gn/T/colmena-assets-YWlXZ2'

       error: path '«unknown»/var' is a symlink
thread 'main' panicked at src/cli.rs:286:38:
Failed to get flake or hive: ChildFailure { exit_code: 1, backtrace:    0: backtrace::capture::Backtrace::new
   1: colmena::nix::flake::FlakeMetadata::resolve::{{closure}}
   2: colmena::nix::flake::Flake::from_uri::{{closure}}
   3: colmena::cli::run::{{closure}}
   4: tokio::runtime::park::CachedParkThread::block_on
   5: std::panicking::try
   6: colmena::main
   7: std::sys_common::backtrace::__rust_begin_short_backtrace
   8: std::rt::lang_start::{{closure}}
   9: std::panicking::try
  10: std::rt::lang_start_internal
  11: _main
 }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
devusb commented 7 months ago

https://github.com/NixOS/nix/pull/9497 suspect related in some way to this change -- realize it started because I was using nixUnstable which became 2.20 -- when I went back to 2.18 this stopped happening.

Zaunei commented 3 months ago

Same problem here with macOS using nix 2.23.0. Using nix 2.18.2 with nix-shell -p nix colmena works for me.

Related: https://github.com/NixOS/nix/issues/10450