[Nix-dev] [proposal] nix-prefetch-source: automatable updates to source specifications

Tim Cuthbertson tim at gfxmonk.net
Sat Jan 7 14:05:29 CET 2017


Hi all,

I've just submitted a PR aimed at making making source information
updateable in an automated way, by:

 - storing _what you want to fetch_ in a JSON file (basically the
information you'd pass to nix-prefetch-*)
 - a simple tool which fetches the current version (according to those
details) and generates another JSON file containing the information a
fetcher would need later (typically the sha256 and URL)
 - a nix function which will take this JSON and actually give you back
the source code that it specifies (by calling the appropriate
`fetchgit`, `fetchurl`, etc)

If you've ever been frustrated at copy-pasting git SHAs and sha256
hashes into nix expressions, this may help. And if you've wanted a
better way to script updates to software where the only change is to
bump the source code, this will definitely help.

I thought I'd get some visibility here on the mailing list, since I
imagine others will have good ideas and opinions which would be great
to hear before I go merging something which doesn't fit what other
developers / maintainers need.

So if you're interested, please check out the PR for the full details:

https://github.com/NixOS/nixpkgs/pull/21734

Cheers,
 - Tim.


More information about the nix-dev mailing list