-
Notifications
You must be signed in to change notification settings - Fork 51
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
option to keep derivations #63
Comments
IIUC, in the |
Pretty much! "Kill the toil..." Premise: wanting to use nix inside the container, e.g. containers.dev |
Hm, ok. I think the Could be related to this issue: NixOS/nix#1245 (comment) |
No I don't mind having all the drv dependencies, they are usually pretty light since they are just text and maybe a few fetched sources. I think it'd be good to have as a non-default option. |
@nrdxp yes, I agree (and i have understood that with the @blaggacao diagram). If the implementation is straightforward, i agree having an option would be nice. |
I know how to do it in straight Nix. |
@nrdxp yes, but this would have to be done at build time (in the sandbox), and i think that's much more difficult than doing it at runtime where you can query the Nix database. |
There are a variety of Nix commands that can be run on derivation files themselves to avoid additional evaluation.
For example, if one calls
nix print-dev-env
on an outpath whose derivation exists in the store, then that derivation will be used as the basis for the shell that is loaded. If the derivation does not exist in the store the command fails. I would like to use this command to enter a devshell in a container without any extra evaluation (the devshell outpath already exists in the image), but I cannot do this because the derivation path is stripped out.I also cannot reference
drvPath
directly as it adds over 20G of dependencies to the images, which is obviously not cool. Instead, It'd be nice to give users the option to copy over the derivation files for the outpaths included in the image for these types of usecases, similar to Nix's ownkeep-derivations
nix.conf setting.The text was updated successfully, but these errors were encountered: