From 302386f775eea309679654e5ea7c972fb6e7b9af Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 16 Feb 2017 15:42:49 +0100 Subject: Support netrc in This allows to fetch private Git/Mercurial repositories, e.g. import { 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). --- src/libutil/util.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libutil/util.hh') diff --git a/src/libutil/util.hh b/src/libutil/util.hh index cfaaf1486e9e..2950f7daa5ec 100644 --- a/src/libutil/util.hh +++ b/src/libutil/util.hh @@ -89,7 +89,7 @@ string readFile(int fd); string readFile(const Path & path, bool drain = false); /* Write a string to a file. */ -void writeFile(const Path & path, const string & s); +void writeFile(const Path & path, const string & s, mode_t mode = 0666); /* Read a line from a file descriptor. */ string readLine(int fd); -- cgit 1.4.1