diff --git a/pkgs/lib/types.nix b/pkgs/lib/types.nix index 2c85ee0077a4..956368138aa2 100644 --- a/pkgs/lib/types.nix +++ b/pkgs/lib/types.nix @@ -89,7 +89,7 @@ rec { path = mkOptionType { name = "path"; # Hacky: there is no ‘isPath’ primop. - check = lib.traceValIfNot (x: builtins.substring 0 1 (toString x) == "/"); + check = lib.traceValIfNot (x: builtins.unsafeDiscardStringContext (builtins.substring 0 1 (toString x)) == "/"); }; listOf = types.list;