From 5d0f71fb5546c475b82e48c7958083f6ee425c9f Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Mon, 23 Mar 2026 17:07:55 +0100 Subject: [PATCH] nix-required-mounts: use toFile instead of passAsFile passAsFile does not work with __structuredAttrs enabled, which will eventually be the default in nixpkgs. --- pkgs/by-name/ni/nix-required-mounts/closure.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/ni/nix-required-mounts/closure.nix b/pkgs/by-name/ni/nix-required-mounts/closure.nix index 777db01599a9..56b6253838eb 100644 --- a/pkgs/by-name/ni/nix-required-mounts/closure.nix +++ b/pkgs/by-name/ni/nix-required-mounts/closure.nix @@ -28,9 +28,10 @@ runCommand "allowed-patterns.json" ] ) allowedPatterns.${name}.paths ) (builtins.attrNames allowedPatterns); - env.storeDir = "${builtins.storeDir}/"; - shallowConfig = builtins.toJSON allowedPatterns; - passAsFile = [ "shallowConfig" ]; + env = { + storeDir = "${builtins.storeDir}/"; + shallowConfigPath = builtins.toFile "shallow-config.json" (builtins.toJSON allowedPatterns); + }; } '' python ${./scripts/nix_required_mounts_closure.py}