I created GitHub - fghibellini/nix-markdown-snippets: Nix utility to extract scripts from markdown fenced code blocks which I think shows a very interesting usecase for Nix tests that I don’t see propagated very often.
I have a few questions though:
- is an overlay a good way to redistribute such functions? I understand Nix still doesn’t have a package system, but I don’t think it makes much sense to try to include the above function directly in Nixpkgs.
- are there similar initiatives? I was wondering if there already exists something that tries to include documentation in tests - I didn’t find anything specific to Nix.
- code review - even though it works, the code feels very hacky, and I’m not sure it’s the best approach, if anyone has any opinions they would be very welcome
Thanks!