Open symphorien opened 1 year ago
I also encountered this issue (when struggling with https://github.com/nix-community/home-manager/blob/master/modules/services/gpg-agent.nix#L51).
Consisteny between platforms should be important for Nix. Since libc++ and libstdc++ are not consistent, maybe we can
Describe the bug
builtins.match "" ""
evaluates only on linux and on darwin. This seems silly but leads to problems, see https://github.com/NixOS/nixpkgs/pull/177273#issuecomment-1287562800Steps To Reproduce
nix repl
builtins.match "" ""
[]
on linux anderror: invalid regular expression ''
on darwinExpected behavior
Same behavior. An error is probably a better idea but I wonder for backward compatibility. The issue I link suggests such an abuse in nixpkgs would have been noticed, so the worry about backward compat is only for other code bases.
nix-env --version
output nix-env (Nix) 2.8.1Additional context https://github.com/NixOS/nixpkgs/pull/197374