forked from lix-project/lix
9451ef3731
E.g. to install "hello" from the latest Nixpkgs:
$ nix-build '<nixpkgs>' -A hello -I nixpkgs=https://nixos.org/channels/nixpkgs-unstable/nixexprs.tar.xz
Or to install a specific version of NixOS:
$ nixos-rebuild switch -I nixpkgs=63def04891
.tar.gz
21 lines
300 B
C++
21 lines
300 B
C++
#pragma once
|
|
|
|
#include "types.hh"
|
|
#include <string>
|
|
|
|
namespace nix {
|
|
|
|
struct DownloadResult
|
|
{
|
|
bool cached;
|
|
string data, etag;
|
|
};
|
|
|
|
DownloadResult downloadFile(string url, string expectedETag = "");
|
|
|
|
Path downloadFileCached(const string & url, bool unpack);
|
|
|
|
MakeError(DownloadError, Error)
|
|
|
|
}
|