fetchurl restricted: list nix-prefetch-url as well

From trunk@21474

svn path=/nixpkgs/branches/mass-update-01/; revision=21547
This commit is contained in:
Yury G. Kudryashov
2010-05-01 16:16:11 +00:00
parent 67e6398310
commit e853574eaf

View File

@@ -91,7 +91,11 @@ _EOF_
'';
message_ = if message != "" then message else ''
You have to download ${name_} from ${stdenv.lib.concatStringsSep " " urls_} yourself,
and add it to the store using "nix-store --add-fixed ${hashAlgo_} ${name_}".
and add it to the store using either
nix-store --add-fixed ${hashAlgo_} ${name_}
or
${if hashAlgo_ != "sha256" then "NIX_HASH_ALGO=${hashAlgo_} " else
""}nix-prefetch-url file://path/to/${name_}
'';
}
else {
@@ -119,4 +123,4 @@ else {
"NIX_HASHED_MIRRORS"
] ++ (map (site: "NIX_MIRRORS_${site}") sites);
})
)
)