andir / npins

Nix dependency pinning. Very similar to Niv but has a few features that I personally wanted.
European Union Public License 1.2
199 stars 16 forks source link

HACK: introduce metadata for newly added pins #40

Open andir opened 1 year ago

andir commented 1 year ago

HACK: introduce metadata for newly added pins

This is an experiment that includes Cargo.lock metadata in our lockfiles for all added pins. The idea is outlined in [an issue] and this is just a quick hack to get this going.

Currently the GitLab tests are failing as I didn't bother fixing them given that they are currently being changed.

To test this initialize a new bare npins folder:

$ npins -d /tmp/foo init --bar

Then you can add a rust project (e.g. npins):

$ npins -d /tmp/foo add github andir npins

Now you should have a regular pin entry but also the JSON equivalent of the Cargo.lock (TOML) file in a sub attribute.

$ less /tmp/foo/sources.json

This in itself isn't particular helpful yet but with a bit more work (on our Nix shim and a variant of import-cargo) we can implement the vision of the linked issue experimentally.

Open tasks: