This project aims to make the software dependency graph data from nixpkgs more easily accessible for analytics and general exploration use cases.
This project is being divided up into two components, the experimental web application you will find in this repository and a separate project, nixtract, which focuses on extracting the dependency graph from Nix flakes. This repository will become a downstream dependency of the latter.
docker-compose --profile all upThe web UI is available at http://localhost:9091.
The graph data is not automatically loaded. See instructions in api to load data.
Nix helps manage development dependencies. You can get it here.
Make sure that you have ~/.config/nix/nix.conf with the following:
experimental-features = nix-command flakes
To enter the Nix development shell, use this command from the root folder of the repository:
nix develop- Start the database
docker-compose --profile db up - Start the API
cd api poetry install poetry run uvicorn explorer.api:app --port 5000 --reload
- Start the web UI
cd web npm install npm run dev
For more details read each of api/README.md and web/README.md.
The first time you run the app locally, the database is empty.
To fill it, you have two options: using Docker or running the commands directly.
To extract and ingest the data using Docker, follow these steps:
- Build the Docker image:
docker build -f docker/etl/Dockerfile -t nixpkgs-graph-explorer-etl .- Run the Docker container to execute the extract and ingest commands:
docker run -it --rm --network host nixpkgs-graph-explorer-etlIf you prefer to run the commands directly without Docker, follow these steps:
- Run the extraction using the
corecomponent:
cd core
poetry run python -m explorer.extract ../derivations.jsonl- Load this data using the
apicompnent:
cd api
poetry run python -m explorer.api.ingest ../derivations.jsonlThis repository is a monorepo, each component in its folder.