From d7b62cb601b48d0dd8a70fdc4b5169d9492e4ce2 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Sun, 27 Jan 2019 11:57:36 -0500 Subject: nixpkgs/manual: address review comments Mostly taken from requested changes exactly as recommended. --- doc/functions/fetchers.xml | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'doc/functions/fetchers.xml') diff --git a/doc/functions/fetchers.xml b/doc/functions/fetchers.xml index 96937ca7182e..b3bd2fe0f45e 100644 --- a/doc/functions/fetchers.xml +++ b/doc/functions/fetchers.xml @@ -6,8 +6,8 @@ When using Nix, you will frequently need to download source code - and other file from the internet. Nixpkgs comes with a few helper - functions that allow you to fetch fixed-output derivations in + and other files from the internet. Nixpkgs comes with a few helper + functions that allow you to fetch fixed-output derivations in a structured way. @@ -48,7 +48,11 @@ stdenv.mkDerivation { fetchpatch works very similarly to - fetchurl with the same arguments expected. + fetchurl with the same arguments expected. It + expects patch files as a source and and performs normalization on + them before computing the checksum. For example it will remove + comments or other unstable parts that are sometimes added by + version control systems and can change over time. @@ -80,6 +84,9 @@ stdenv.mkDerivation { Used with Git. Expects url to a Git repo, rev, and sha256. + rev in this case can be full the git commit + id (SHA1 hash) or a tag name like + refs/tags/v1.0. @@ -141,9 +148,10 @@ stdenv.mkDerivation { GitHub HTML page as owner/repo. rev corresponds to the Git commit hash or - tag that will be downloaded from Git. Finally, - sha256. Again, other hash algorithms are - also available but sha256 is currently + tag (e.g v1.0) that will be downloaded from + Git. Finally, sha256 corresponds to the + hash of the extracted directory. Again, other hash algorithms + are also available but sha256 is currently preferred. -- cgit 1.4.1