diff --git a/checks/flake-module.nix b/checks/flake-module.nix index ea86afb52..aa783d219 100644 --- a/checks/flake-module.nix +++ b/checks/flake-module.nix @@ -158,8 +158,11 @@ in clan-core-for-checks = pkgs.runCommand "clan-core-for-checks" { } '' cp -r ${pkgs.callPackage ./clan-core-for-checks.nix { }} $out - chmod +w $out/flake.lock + chmod -R +w $out cp ${../flake.lock} $out/flake.lock + + # Create marker file to disable private flake loading in tests + touch $out/.skip-private-inputs ''; }; packages = lib.optionalAttrs (pkgs.stdenv.isLinux) { diff --git a/flake.nix b/flake.nix index bf242c40c..643f74439 100644 --- a/flake.nix +++ b/flake.nix @@ -50,6 +50,7 @@ pathExists ; + # Load private flake inputs if available loadDevFlake = path: let @@ -60,7 +61,13 @@ devFlake = builtins.tryEval (loadDevFlake ./devFlake/private); - privateInputs = if devFlake.success then devFlake.value.inputs else { }; + privateInputs = + if pathExists ./.skip-private-inputs then + { } + else if devFlake.success then + devFlake.value.inputs + else + { }; in flake-parts.lib.mkFlake { inherit inputs; } ( { ... }: