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 up
The 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
docker-compose --profile db up
cd api
poetry install
poetry run uvicorn explorer.api:app --port 5000 --reload
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:
docker build -f docker/etl/Dockerfile -t nixpkgs-graph-explorer-etl .
docker run -it --rm --network host nixpkgs-graph-explorer-etl
If you prefer to run the commands directly without Docker, follow these steps:
core
component:cd core
poetry run python -m explorer.extract ../derivations.jsonl
api
compnent:cd api
poetry run python -m explorer.api.ingest ../derivations.jsonl
This repository is a monorepo, each component in its folder.