diff --git a/pkgs/by-name/ni/nix-required-mounts/closure.nix b/pkgs/by-name/ni/nix-required-mounts/closure.nix index 56b6253838eb..d4aadececf6d 100644 --- a/pkgs/by-name/ni/nix-required-mounts/closure.nix +++ b/pkgs/by-name/ni/nix-required-mounts/closure.nix @@ -8,6 +8,7 @@ runCommand, python3Packages, allowedPatterns, + formats, }: runCommand "allowed-patterns.json" { @@ -30,7 +31,7 @@ runCommand "allowed-patterns.json" ) (builtins.attrNames allowedPatterns); env = { storeDir = "${builtins.storeDir}/"; - shallowConfigPath = builtins.toFile "shallow-config.json" (builtins.toJSON allowedPatterns); + shallowConfigPath = (formats.json { }).generate "shallow-config.json" allowedPatterns; }; } ''