Core data model used for extracting Nix dependencies and related utilities.
This package provides a command line tool to extract derivations from a Nix flake.
Result of this extraction is a JSONL file, each line complying to ./derivation.schema.json
.
poetry install --only main
To extract the data from nixpkgs, use:
poetry run python -m explorer.extract derivations.jsonl
To write to stdout, use -
instead of a file path
poetry run python -m explorer.extract -
To learn more about the available options:
poetry run python -m explorer.extract --help
Use the Nix development shell provided in this repository, see ../README.md#use-nix
poetry install
The JSON schema is written as a pydantic
model in explorer.core
.
Once modified, update the JSON schema using the command:
poetry run python -m explorer.core ./derivation.schema.json