-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incompatibility with content-addressed derivations #164
Comments
Yep. This is a "hack" to remove the need to evaluate the path twice, and it saves a lot of time for IFD situations. I wonder if there's some better way to ask nix which derivation has that particular placeholder. Maybe |
The error comes from here: https://github.com/serokell/deploy-rs/blob/master/src/push.rs#L63 |
I am also affected by that and cannot use |
I added experimental support for CA derivations. The build/deploy logic had to be adapted. We cannot evaluate a CA output path before actually building it. If anyone wants to check out out and give feedback: https://github.com/gador/deploy-rs/tree/add-ca-support-flake-update Limitations and caveats:
|
For me the following diff is enough, to get the build started: diff --git a/flake.nix b/flake.nix
index 66b2e76..fb8b63b 100644
--- a/flake.nix
+++ b/flake.nix
@@ -49,7 +49,7 @@
custom =
{
__functor = customSelf: base: activate:
- final.buildEnv {
+ (final.buildEnv {
name = ("activatable-" + base.name);
paths =
[
@@ -83,7 +83,7 @@
destination = "/activate-rs";
})
];
- };
+ }).drvPath;
};
nixos = base: alternatively the following works, too: profiles.system = {
path = (deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.hydrogen).drvPath;
remoteBuild = true;
}; but it fails when activating... |
I've been meaning to try
deploy-rs
for my systems, but it turns out that it doesn't work if the closure to deploy contains some content-addressed derivations. For example given the following flake (slightly modified copy of the example):flake.nix
I get:
What happens (I assume) is that one property of ca derivations is that it's impossible to know their output path before building them. So the derivation contains a placeholder instead (the
/1m3qx…
thing above), and the only way (roughly) to get the actual output path is to build the derivation. Butdeploy-rs
seems to query it (withshow-derivation
I guess given the error message), which doesn't workThe text was updated successfully, but these errors were encountered: