mirror of
https://github.com/NixOS/nix.git
synced 2025-11-11 21:16:02 +01:00
This allows <nix/fetchurl.nix> to fetch private Git/Mercurial
repositories, e.g.
import <nix/fetchurl.nix> {
url = https://edolstra@bitbucket.org/edolstra/my-private-repo/get/80a14018daed.tar.bz2;
sha256 = "1mgqzn7biqkq3hf2697b0jc4wabkqhmzq2srdymjfa6sb9zb6qs7";
}
where /etc/nix/netrc contains:
machine bitbucket.org
login edolstra
password blabla...
This works even when sandboxing is enabled.
To do: add unpacking support (i.e. fetchzip functionality).
9 lines
143 B
C++
9 lines
143 B
C++
#pragma once
|
|
|
|
#include "derivations.hh"
|
|
|
|
namespace nix {
|
|
|
|
void builtinFetchurl(const BasicDerivation & drv, const std::string & netrcData);
|
|
|
|
}
|