flake: fix privateInputs loading in nix store contexts
When clan-core is fetched via fetchgit (e.g. in tests), the devFlake/private directory exists but cannot be loaded as a flake. This causes errors when building test machines. Fix by: 1. Adding a .skip-private-inputs marker file in clan-core-for-checks to explicitly disable private inputs in test contexts 2. Checking for this marker file before attempting to load private inputs 3. Keeping the original tryEval approach as a fallback for compatibility This ensures tests can run without errors while preserving the ability to load private inputs in development environments.
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user