Skip to content
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

Don't depend on PARSER_UTIL_BIN being set #51

Open
mkenigs opened this issue Aug 14, 2023 · 7 comments
Open

Don't depend on PARSER_UTIL_BIN being set #51

mkenigs opened this issue Aug 14, 2023 · 7 comments

Comments

@mkenigs
Copy link
Contributor

mkenigs commented Aug 14, 2023

Currently PARSER_UTIL_BIN must be set to compile runix. Requiring a binary dependency to be injected via an environment variable is a barrier to adoption.

Some options:

  • fall back to the runix flakeref parser if PARSER_UTIL_BIN is not set
  • pass PARSER_UTIL_BIN in the same way that the nix binary is passed (a downside is that a simple FlakeRef::from_str no longer works)
  • use FFI
  • Something else?
@aakropotkin
Copy link
Contributor

We had landed on option 2 as being the expectation previously correct?

@mkenigs
Copy link
Contributor Author

mkenigs commented Aug 14, 2023

No we pass nix_bin explicitly rather than using an environment variable:
https://github.com/flox/flox/blob/e2d4ad168152ad4da091c61931cd6d86ca312bd7/crates/flox-rust-sdk/src/flox.rs#L80

@gl-yziquel
Copy link

I just hit this issue when trying to run "cargo build" on the source repository.

It's indeed a barrier to adoption.

(And a workaround for the noob -- i.e. me -- would be welcome, here.)

@mkenigs
Copy link
Contributor Author

mkenigs commented Aug 15, 2023

(And a workaround for the noob -- i.e. me -- would be welcome, here.)

If you're in the runix repo, you can run flox or nix develop .#runix. Are you trying to use it in another project or does that work for you?

@gl-yziquel
Copy link

I was making a survey of the tools that I may use for a personal project. Roughly, a build automation tool. I do not have flox up and running. As to nix develop, I'm not yet that comfortable with it. Will give it a try as soon as I find more time for it. Thank you.

@phaer
Copy link
Contributor

phaer commented Jan 27, 2024

Alternatively, the crates.io pkg of runix could be updated if it's not too much trouble? The current one is 12 month old and this would allow users to include it more easily in their own projects, whereas the need to checkout, build in a nix develop shell, and use a path dependency in cargo atm.

@mkenigs
Copy link
Contributor Author

mkenigs commented Feb 1, 2024

Alternatively, the crates.io pkg of runix could be updated if it's not too much trouble? The current one is 12 month old and this would allow users to include it more easily in their own projects, whereas the need to checkout, build in a nix develop shell, and use a path dependency in cargo atm.

I think the problem is present even on main, so I'm not sure how bumping would help? https://github.com/flox/runix/blob/main/crates/runix/src/url_parser.rs#L15

We're not actively maintaining runix anymore, so that's why it hasn't been bumped in so long

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants