nix-community / bundix

Generates a Nix expression for your Bundler-managed application. [maintainer=@manveru]
163 stars 55 forks source link

Fixes a few issues that prevented bundix from running for me: #101

Closed burke closed 1 year ago

burke commented 1 year ago
  1. Better exception tracing in nix_prefetch_url: Like in #96, I was seeing "wrong number of arguments (given 4, expected 1..3)". I couldn't figure out where this was coming from, so I changed the exception handler in nix_prefetch_url to print the exception's full_message, which includes the backtrace.

  2. Parallel to nix_prefetch_url failing, the code in fetch_local_hash is intolerant of that function returning nil. I also amended the [SHA256_32] to only run when non-nil.

  3. Finally, the root issue with the 4 args instead of 1..3 was because of the invocation of open. Since this API is generally discouraged anyway, I just rewrote this code to use NET::HTTP and FileUtils.

numkem commented 1 year ago

This does indeed make bundix works for me. Thank you!