[Nix-dev] Re: [Nix-commits] SVN commit: nix - 16296 [..] description of sourceByName, bleedingEdgeRepos ...
Eelco Dolstra
e.dolstra at tudelft.nl
Tue Jul 14 10:37:34 CEST 2009
Hi,
Marc Weber wrote:
> short description:
Thanks for the explanation.
> a) define a repository description in config.nix or in
> development/misc/bleeding-edge-repos/default.nix
> This looks like this:
>
> ghc_core_array = { type = "darcs"; url=http://darcs.haskell.org/packages/array; groups="ghc_group ghc_core_libs"; };
> ghc_core_base = { type = "darcs"; url=http://darcs.haskell.org/packages/base; groups="ghc_group ghc_core_libs"; };
> ghc_core_bytestring = { type = "darcs"; url=http://darcs.haskell.org/packages/bytestring; groups="ghc_group ghc_core_libs"; };
> ghc_core_Cabal = { type="darcs"; url=http://darcs.haskell.org/packages/Cabal; groups="ghc_group ghc_core_libs"; };
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.
> b) update the nix-repository-manager tool so that it knows about the new
> repositories locations and ids (the id is the attr name)
>
> $ nix-env -A haskellPackages.nixRepositoryManager
>
> c) fetch sources into a cache dir ~/managed-repos
> and create a dist file (which will be used by nix)
>
> $ nix-env $NIXPKGS --update ghc_core_array
> # get a group:
> $ nix-env $NIXPKGS --update ghc_group
How does work (i.e. how does this download anything into "~/managed-repos")?
> The pkgs/misc/bleeding-edge-fetch-infos.nix beeing updated by c) tells nix where to find
> a distributed snapshot. However the local dist file is preferred by default.
What's the "distributed snapshot"? And what's the "local dist file"? All I see
in bleeding-edge-fetch-infos.nix is a bunch of fetchurl calls to download
tarballs containing a "nix_repsoitory_manager_tmp_dir" (sic) directory. So it
seems to fetch the package source instead of "infos".
> A use case is mantaining ghc or xorg snapshots.
> GHC requires updating about 30 packages to compile,
> xorg requires much more. My list of repo descriptions is about 280
> lines but not all of them were used.
>
> So you're done with
> run-nix-repository-manager-with-config $NIXPKGS --update xorg
That's useful.
But "run-nix-repository-manager-with-config" is a bit, uh, wordy :-)
> # wait ..
> nixos-rebuild test
>
> Now if everything is fine:
> # uload dist files
> run-nix-repository-manager-with-config --publish xorg
What does --publish do?
--
Eelco Dolstra | http://www.st.ewi.tudelft.nl/~dolstra/
More information about the nix-dev
mailing list