[Nix-dev] Using nix-shell in messy trees with symlinks and binary files

Kosyrev Serge skosyrev at ptsecurity.com
Tue Feb 16 08:39:44 CET 2016


Good day, folks!

What I'm seeing is a rather disturbingly odd, context-depenent behavior of nix-shell:

,----
| [deepfire at andromedae:~/src/foo]$ nix-shell default.nix                                     
| warning: dumping very large path (> 256 MiB); this may run out of memory
| error: file ‘/home/deepfire/src/foo/generated/rootfs/chroot/dev/fuse’ has an unsupported type
| (use ‘--show-trace’ to show detailed location information)
| 
| [deepfire at andromedae:~/src/foo]$ mv default.nix scripts/
| 
| [deepfire at andromedae:~/src/foo]$ nix-shell scripts/default.nix 
| 
| [nix-shell:~/src/foo]$ 
`----

The directory structure, indeed, has some oddities -- device files,
symlink loops, this kind of stuff.

Consideration that nix-shell tries to compute some.. hash.. out of it all,
sends shivers down my spine.  That's a lot of stuff to hash through.

If this theory is, indeed, correct, what would be the way to make
nix-shell disregard certain paths from the equation?

-- 
с уважениeм,
Косырев Сергей
руководитель отдела технологий виртуализации
Positive Technologies


More information about the nix-dev mailing list