query
On this page

fetchurlBoot

pkgs.stdenv.fetchurlBoot

Docs pulled from | This Revision | 24 minutes ago


Contribute
Enhance the ecosystem with your expertise! Contribute to fill the gaps in documentation. Your input can make a difference.

Noogle detected

Implementation

The following is the current implementation of this function.

{
  url ? head urls,
  urls ? [ ],
  sha256 ? "",
  hash ? "",
  name ? baseNameOf (toString url),
}:

# assert exactly one hash is set
assert hash != "" || sha256 != "";
assert hash != "" -> sha256 == "";

import <nix/fetchurl.nix> {
  inherit
    system
    hash
    sha256
    name
    ;

  url =
    let
      url_ = handleUrl url;
      m = matchMirror url_;
    in
    if m == null then url_ else mirrors.${head m} + (elemAt m 1);
}