Stream: nix

Topic: How to call commands from old cli in nix_rs


view this post on Zulip Shivaraj B H (May 02 2024 at 10:17):

I would like to call nix-store.

The full command goes like nix-store -qR —include-outputs <drv>. I am aware that in the new-cli there is a command equivalent to this and it is nix path-info —recursive <drv>, but there is no —include-outputs equivalent. Neither can I iterate over all the drv’s generated using nix path-info —recursive <drv> to get the outPath, see: https://github.com/NixOS/nix/issues/5895

view this post on Zulip Srid (May 02 2024 at 11:24):

We could also add a pub struct NixStoreCmd to nix-rs

view this post on Zulip Pratham Patel (May 02 2024 at 11:35):

Just now discovering juspay/nix-rs. Does this have all/most of the "bindings" to nix/nix-v3?

view this post on Zulip Srid (May 02 2024 at 11:36):

What's nix-v3?

view this post on Zulip Pratham Patel (May 02 2024 at 11:37):

nix-build are the "old" (non-flake) commands while nix build is part of the v3 of Nix's CLI

view this post on Zulip Srid (May 02 2024 at 11:43):

nix-rs uses new-style Nix commands (what you call v3 Nix's CLI), yes ... but it only has those things we use in other projects (nix-browser, nix-health) right now. We should add the rest as needed, or as people contribute.

view this post on Zulip Pratham Patel (May 02 2024 at 11:44):

ack, I don't really have much use for a "Rust wrapper" but it sounds like something I might toy with sometime soon :D

view this post on Zulip Shivaraj B H (May 02 2024 at 17:56):

https://github.com/juspay/nix-rs/pull/6


Last updated: Nov 15 2024 at 12:33 UTC