[Nix-dev] Re: [Nix-commits] SVN commit: nix - 16296 [..] description of sourceByName, bleedingEdgeRepos ...

Marc Weber marco-oweber at gmx.de
Tue Jul 14 14:32:27 CEST 2009


> Rather than having one global file containing all these repositories, wouldn't
> it be better to have them closer to the package(s) using them?  E.g. like the
> automatically generated list of Gnome sources in desktops/gnome or the X.org
> sources in servers/x11/xorg.

I agree that having

stdenv.mkDerivation {
  src = bleedingEdgeSource {
    url = ..; type = ..; groups = "..";
    snapshot = fetchurl { ... };
  };
}

would be much nicer. Add __FILE__ AND __LINE__ or better __SOURCE_LOC__
to the nix language and I consider changing that. This feature would be
useful for options as well.

> How does work (i.e. how does this download anything into "~/managed-repos")?
Best thing to do: get latest version and read source:
http://mawercer.de/~nix/repos/nix_repository_manager-nrmtag4.tar.gz

Key class:

ass Repo r where
  parseFromConfig : parse from config
  createTarGz     : create .tar.gz
  repoGet         : first time (checkout)
  isRepoClean : local modifications? You have to force creating a dist if repo isn't clean
  repoUpdate  : update repo which exists
  revId       : get id to append to dist file


There are implementations for cvs, hg, git, svn, darcs.
Example implementation CVS:
    withCurrentDirectory dest $ rawSystemVerbose "cvs" $ ["update"]

> What's the "distributed snapshot"?
alias nrm=run-nix-repository-manager-with-config

nrm $NIXPkGS --update ID

runs repoGet or repoUpdate, then it checks isRepoClean and runs createTarGz
after that step you should have
  ~/managed_repos/dist/applewmproto-1baebd0b2b61115f1ea326f4a1241f8a3d757d5a.tar.gz
  ~/managed_repos/dist/applewmproto-1baebd0b2b61115f1ea326f4a1241f8a3d757d5a.tar.gz.sha256
The first is the dist file the second contains its sha256 hash.

Now you test (because a local repo is preferred if it exists) then you
upload the file to my server using nrm --publish (which runs rsync).

Then you commit the info file containing the updated fetchurl command.

If you still have questions ask on irc and I'll send a summary here.
You may also give it a try and explore it. Make sure you have at least
nixpkgs rev r16349 because the nrm source was outdated.
If you want I can also show you a SSH live step by step.

Sincerly
Marc Weber



More information about the nix-dev mailing list