Follow up of https://gerrit.lix.systems/c/lix/+/5346?tab=comments for the obvious pieces. Change-Id: If0f640f786b0778d016187cb24c0513a48b5a30b Signed-off-by: Raito Bezarius <raito@lix.systems>
1.3 KiB
synopsis, cls, category, credits
| synopsis | cls | category | credits | ||
|---|---|---|---|---|---|
| `nix store add-path` now supports references |
|
Features |
|
Lix supports two categories of hashes in store paths: input-addressed and output-addressed.
Currently, in Nix language, there is no way to produce output-addressed paths with references, as fixed-output derivations forbid references. However, the Nix store actually supports references in output-addressed paths. This is very useful for importing build products created outside of Lix that reference dependency store paths since such build products have no associated derivation so don't make any sense to input-address. Previously, output-addressed paths with references could only be created by writing a custom client to the rather-baroque Nix daemon protocol; now it's available in the CLI.
Using nix store add-path --references-list-json REFS_LIST_FILE SOME_PATH with a JSON list of string store paths, you can now create such paths with the Lix CLI.
They may be consumed from Nix language using something like builtins.storePath or the following which also works in pure evaluation mode:
# Hack from https://git.lix.systems/lix-project/lix/issues/402#issuecomment-5889
path:
builtins.appendContext path {
${path} = {
path = true;
};
}