#16525·nix

`derivation { system = "\\"; … }` creates unreadable .drv file

Author: yorickvPCreated Sep 26, 2026Updated Sep 26, 2026
Labelsbug

Describe the bug

derivation { system = "\\"; name = "test"; builder = "/dev/null";}

creates a broken .drv file, the system name is written unescaped into the .drv and then cannot be read. The same happens with system = ''"''.

Steps To Reproduce

derivation { system = "\\"; name = "test"; builder = "/dev/null";}

error parsing derivation '…': expected string ','.

Expected behavior

Should create a drv with the "\" system (or error on an invalid system name).

Metadata

Additional context

Found using https://github.com/yorickvP/nix-pbt (property based testing of nix builtins), assisted by claude-opus-5.5.

Checklist


Add :+1: to issues you find important.