diff --git a/doc/coding-conventions.xml b/doc/coding-conventions.xml index b041a73d8182..4967295db085 100644 --- a/doc/coding-conventions.xml +++ b/doc/coding-conventions.xml @@ -620,33 +620,39 @@ evaluate correctly. fetchers from pkgs/build-support/. As an example going from bad to good: - Uses git:// which won't be proxied. - - src = fetchgit { - url = "git://github.com/NixOS/nix.git"; - rev = "1f795f9f44607cc5bec70d1300150bfefcef2aae"; - sha256 = "1cw5fszffl5pkpa6s6wjnkiv6lm5k618s32sp60kvmvpy7a2v9kg"; - } - + + Uses git:// which won't be proxied. + +src = fetchgit { + url = "git://github.com/NixOS/nix.git"; + rev = "1f795f9f44607cc5bec70d1300150bfefcef2aae"; + sha256 = "1cw5fszffl5pkpa6s6wjnkiv6lm5k618s32sp60kvmvpy7a2v9kg"; +} + + - This is ok, but an archive fetch will still be faster. - - src = fetchgit { - url = "https://github.com/NixOS/nix.git"; - rev = "1f795f9f44607cc5bec70d1300150bfefcef2aae"; - sha256 = "1cw5fszffl5pkpa6s6wjnkiv6lm5k618s32sp60kvmvpy7a2v9kg"; - } - + + This is ok, but an archive fetch will still be faster. + +src = fetchgit { + url = "https://github.com/NixOS/nix.git"; + rev = "1f795f9f44607cc5bec70d1300150bfefcef2aae"; + sha256 = "1cw5fszffl5pkpa6s6wjnkiv6lm5k618s32sp60kvmvpy7a2v9kg"; +} + + - Fetches a snapshot archive and you get the rev you want. - - src = fetchFromGitHub { - owner = "NixOS"; - repo = "nix"; - rev = "1f795f9f44607cc5bec70d1300150bfefcef2aae"; - sha256 = "04yri911rj9j19qqqn6m82266fl05pz98inasni0vxr1cf1gdgv9"; - } - + + Fetches a snapshot archive and you get the rev you want. + +src = fetchFromGitHub { + owner = "NixOS"; + repo = "nix"; + rev = "1f795f9f44607cc5bec70d1300150bfefcef2aae"; + sha256 = "04yri911rj9j19qqqn6m82266fl05pz98inasni0vxr1cf1gdgv9"; +} + +