ci/nix: Allow IFD for runtime dependency replacements
Share a single replacement list between NixOS and standalone Home Manager. CI checks that list against its targets' nixpkgs channels. When a replacement applies, warn and defer the flake check until after the target builds. Runtime replacement needs to generate and import store reference graphs during evaluation, which fails under `nix flake check --no-build` on a fresh runner. Keep the early eval-only check and disable IFD when the list is empty.
This commit is contained in:
1 parent
d5e2b93fd0
commit
fabbb43fbf
8 files changed
+68
-22
No files matched your search
@@ -7,7 +7,7 @@ let
|
||||
inherit (lib.hm) dag;
|
||||
inherit (lib.my) mkOpt' dummyOption;
|
||||
|
||||
jsonCRuntimeReplacements = import ../../lib/json-c-runtime.nix { inherit lib pkgs pkgsFlake; };
|
||||
runtimeDependencyReplacements = import ../../lib/runtime-dependency-replacements.nix { inherit lib pkgs pkgsFlake; };
|
||||
in
|
||||
{
|
||||
# Disabled: breaks `nix flake check` in CI (see flake.nix pi-agent note).
|
||||
@@ -34,14 +34,14 @@ in
|
||||
|
||||
home.activationPackage = mkOption {
|
||||
apply = drv:
|
||||
if config.my.isStandalone && jsonCRuntimeReplacements != [ ] then
|
||||
if config.my.isStandalone && runtimeDependencyReplacements != [ ] then
|
||||
(pkgs.replaceDependencies.override {
|
||||
replaceDirectDependencies = pkgs.replaceDirectDependencies.override {
|
||||
nix = config.nix.package;
|
||||
};
|
||||
}) {
|
||||
inherit drv;
|
||||
replacements = jsonCRuntimeReplacements;
|
||||
replacements = runtimeDependencyReplacements;
|
||||
}
|
||||
else drv;
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user