Howdy folks.
I would like to know the best way to declare dependencies for an OSS project so nix users can contribute seamlessly.
I’ve noticed various projects include a default.nix file that developers can load with nix-shell.
I took that approach for tectonic:
I didn’t realize I need to pass the specific nixpkgs as the first argument to nix-shell:
# use the default, bundles older version of rust
$ nix-shell '<nixpkgs>' -A tectonic
# target the latest version of nixpkgs
$ nix-shell https://github.com/NixOS/nixpkgs/archive/master.tar.gz -A tectonic
Yay for the examples section in the manual!
I’m sure there are plenty of nuances here I gloss over but the basic nix-shell -A tectonic is exactly what I needed for documenting how to build the project when consuming dependencies with nix.