Skip to content
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

nix profile: Support CA derivations #6197

Merged
merged 8 commits into from
Mar 2, 2022
Merged

Conversation

edolstra
Copy link
Member

@edolstra edolstra commented Mar 2, 2022

Also moved some installable-related functions from command.hh into Installable in installables.hh.

@Ericson2314
Copy link
Member

I see you moved the declarations to match the location of the definitions. But I must admit, I would prefer keeping ways to process installables separate from the definition of installables themselves. C.f. bcde545 when I wanted to define derivation.

Less on principle, more for practical reasons, I have been thinking for #6182 maybe the churn of splitting libcmd might not be as bad as I feared. But I would want to keep these building utility function in the "upstream" package, while separating the libexpr-needing and libexpr-agnostic installables. If that still sounds like too much far future stuff, fine, but just something to think about --- things we do now would make it more or less churny accordingly!

if (auto installable2 = std::dynamic_pointer_cast<InstallableFlake>(installable)) {
// FIXME: make build() return this?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do think what buildPaths returns could help with this or updateStorePaths? Each BuiltPath contains the paths for the outputs requested, so you don't need to do another queryDerivationOutputMap if you can use it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, the issue here is that we need the resolved flakeref / attrpath.

Fixes

  nix-daemon: src/libstore/sqlite.cc:97: nix::SQLiteStmt::Use::Use(nix::SQLiteStmt&): Assertion `stmt.stmt' failed.

which happens because the daemon doesn't properly handle the case
where ca-derivations isn't enabled at daemon startup.
@edolstra edolstra merged commit 3e3d071 into NixOS:master Mar 2, 2022
@edolstra edolstra deleted the nix-profile-ca branch March 2, 2022 22:51
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/tweag-nix-dev-update-26/18252/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants