aboutsummaryrefslogtreecommitdiff
path: root/shell.nix
diff options
context:
space:
mode:
authorMatthew Bauer <mjbauer95@gmail.com>2019-08-28 12:26:08 -0400
committerMatthew Bauer <mjbauer95@gmail.com>2019-08-28 12:32:54 -0400
commit693e68e09c9a17ca72b074bd2e575bf435647b45 (patch)
tree8d38503b1f9095912900c7faaf2f6daabcffcdba /shell.nix
parentf435634a29551754d5f7303b0a60cd8fe2df2079 (diff)
Set maximum name length in Nix
Previously we allowed any length of name for Nix derivations. This is bad because different file systems have different max lengths. To make things predictable, I have picked a max. This was done by trying to build this derivation: derivation { name = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; builder = "/no-such-path"; system = "x86_64-linux"; } Take off one a and it will not lead to file name too long. That ends up being 212 a’s. An even smaller max could be picked if we want to support more file systems. Working backwards, this is why: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-${name}.drv.chroot > 255 - 32 - 1 - 4 - 7 = 211
Diffstat (limited to 'shell.nix')
0 files changed, 0 insertions, 0 deletions