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

Nix: support usage as library #1078

Open
vlaci opened this issue Jan 13, 2025 · 0 comments
Open

Nix: support usage as library #1078

vlaci opened this issue Jan 13, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@vlaci
Copy link
Contributor

vlaci commented Jan 13, 2025

Unblob is currently built using pkgs.python3.buildPythonApplication which provides CLI scripts to execute unblob. It however does not expose unblob as a python package, so it cannot be imported from an interpreter. For library usage, it should use pkgs.python3.builtPythonPackage. This part of the refactor is easy to make, but how would unblob has access to extractors when used as a library?

Currently, we wrap the unblob CLI using makeWrapper, where we add dependencies to PATH, so Python will pick them up when executed. We cannot really do this for the library use-case.

My idea is to add a "config file", where path to extractors could be easily set, and generate it from the Nix derivation. Alternatively, we could also just replace each Command("bin") invocation using string replacement, but it sounds waay too brittle for my taste.

@vlaci vlaci added the enhancement New feature or request label Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant