fetchurl

Fetch a URL

Downloads a file from a URL. In the REPL, wraps curl. In a pipeline, creates a node that uses Nix’s builtins.fetchurl to fetch the asset into the Nix store, making it available downstream.

Parameters

Returns

Node In REPL mode, returns the file path as a String. In pipeline mode, returns a Node value.

Examples

data = fetchurl("https://example.com/data.csv", output = "data.csv")
p = pipeline {
data = fetchurl("https://example.com/data.csv", sha256 = "abc123...")
}