Skip to content

Latest commit

 

History

History

core

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

nixpkgs-graph-explorer - core

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.

Usage

Set up

poetry install --only main

Extract nixpkgs graph of derivations

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

Development

Set up

Use the Nix development shell provided in this repository, see ../README.md#use-nix

poetry install

JSON schema

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