[Nix-dev] Pulling a programs source code from a git repo

Marc Weber marco-oweber at gmx.de
Sun Jan 26 15:16:04 CET 2014


In theory git hash should be enough, however nobody implemented a
githash=".." attribute for fixed builds.

Thus nixprefetchurl can be used.
I personally wrote "nix-repository-manager" which runs git clone/pull
in a local directory. This way updating is "faster" if there are only
some updates, and you can update multiple repositories at the same time.
Eg I've assigned all "gimp" related repositories or haxe related
repositories to "gimp_group" or "haxe_group" and update them in parallel
by:
nix-repository-manager 2 . --update-then-publish gimp_group haxe_group
(update-then-publish updates archives and uploads them to my server)

Downside is that you explicitly have to upload the tarball somewhere.
grep nixpkgs for "REGION AUTO UPDATE". A second downside is that
requires more "trust" to trust such archives :/
So yes, I really should update it one time to output fetchgit lines
instead ..

You may also want to have a look at this wiki article which should be
related:
https://nixos.org/wiki/Open_issues:ways_of_updating_sources_automatically

Marc Weber


More information about the nix-dev mailing list