I’ve created a flake repository containing expresssion for all Nimble (the Nim package manger) packages. I’m not familiar with the various *2nix utilities within Nixpkgs so I did a naive implementation of what I thought best fit the Nix flake model.
Any comments or reviews are appreciated. The plan is to make this repository part a of larger flake-based project, but I want to handle Nim packaging in the general case.
To give an overview, the flake packages are every package in the Nimble registry for a given snapshot as well as the Nim compiler (also in Nixpkgs). Package metadata is commited to the repository as per-package JSON files, these files contain fixed-output hashes for each tagged version of the Nimble package sources. The repository is updated by entering the local
dev-shell and invoking
Packages are built by evaulating an intermediate derivation generated from metadata inside each upstream Nimble repository. This step collects cross-Nimble dependencies but can also collect dependencies from Nixpkgs (example). The former works well, but the later requires that nixpkgs-specific names are commited to upstream metadata.
If this model works, I would like to create similar flakes, perhaps for all of the MirageOS opam packages.