01ff67595bb138b8d1db866d2c5cedd17627f16c
This is not ca-derivations. We don't care about self-references or any of the rewriting or stuff like that; if you want something like that, write your user code so it figures out where it is. The reason I want to do this is for integrating other build systems with Lix: if you're importing something built *outside the store* with a non-Nix build system, it makes no sense to put it in an input-addressed path since it's not possible to come up with a derivation for it. But you need *some* hash, so the output hashing is the most sensible option. It is also nice because of not needing trusted user privileges to import it, since the hash describes the exact contents of the output path. We use this feature (implemented externally to Lix; this CL eliminates that step) at Mercury to integrate buck2 with Nix on the output side: we import things to the Nix store as ca paths with references. These can then be consumed by Nix language with: ``` # Hack from https://git.lix.systems/lix-project/lix/issues/402#issuecomment-5889 path: builtins.appendContext path { ${path} = { path = true; }; } ``` Test plan: ``` $ nix store add-path --references-list xx-refs-list ./README.md /nix/store/szcwnm13d9gmxx8fly0bz82l42jgysw6-README.md $ cat xx-refs-list /nix/store/g9hhwjbkdrw0wnbd3axfs4icyb37nr6b-bash-interactive-5.3p3 $ nix path-info --json /nix/store/szcwnm13d9gmxx8fly0bz82l42jgysw6-README.md | jq . [ { "ca": "fixed:r:sha256:1pj59fy7zcrn949ry9kgv4ba17h2sy3z2is469abj912cvbl14n3", "narHash": "sha256-w5JA12YiJLlUMkRH8YfXAp6gFtlvJp8TSTazf7xLRd4=", "narSize": 1384, "path": "/nix/store/szcwnm13d9gmxx8fly0bz82l42jgysw6-README.md", "references": [ "/nix/store/g9hhwjbkdrw0wnbd3axfs4icyb37nr6b-bash-interactive-5.3p3" ], "registrationTime": 1771266146, "valid": true } ] ``` Change-Id: I005a03003dfc24108e018e599dbe0b5d6a6a6964
Lix
Lix is an implementation of Nix, a powerful package management system for Linux and other Unix systems that makes package management reliable and reproducible.
Read more about us at https://lix.systems.
Installation
On Linux and macOS the easiest way to install Lix is to run the following shell command (as a user other than root):
$ curl -sSf -L https://install.lix.systems/lix | sh -s -- install
For systems that already have a Nix implementation installed, such as NixOS systems, read our install page
Building And Developing
See our Hacking guide in our manual for instruction on how to set up a development environment and build Lix from source.
Additional Resources
- The Lix reference manual:
- Our wiki
- Matrix - #space:lix.systems
License
Lix is released under LGPL-2.1-or-later.
Description
Working fork of Lix - carries the adaptive load-aware build-remote patch. Upstream: gerrit.lix.systems
92 MiB
Languages
C++
74.9%
Python
11.7%
Nix
6.1%
Shell
3.6%
Meson
2%
Other
1.6%