forked from lix-project/lix
nix-channel: Don't fetch binary-cache-url
This has been ignored since the Perl->C++ rewrite.
This commit is contained in:
parent
09dde33c19
commit
88571219d9
|
@ -18,21 +18,17 @@ let
|
||||||
if [ * != $channelName ]; then
|
if [ * != $channelName ]; then
|
||||||
mv * $out/$channelName
|
mv * $out/$channelName
|
||||||
fi
|
fi
|
||||||
if [ -n "$binaryCacheURL" ]; then
|
|
||||||
mkdir $out/binary-caches
|
|
||||||
echo -n "$binaryCacheURL" > $out/binary-caches/$channelName
|
|
||||||
fi
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
{ name, channelName, src, binaryCacheURL ? "" }:
|
{ name, channelName, src }:
|
||||||
|
|
||||||
derivation {
|
derivation {
|
||||||
system = builtins.currentSystem;
|
system = builtins.currentSystem;
|
||||||
builder = shell;
|
builder = shell;
|
||||||
args = [ "-e" builder ];
|
args = [ "-e" builder ];
|
||||||
inherit name channelName src binaryCacheURL;
|
inherit name channelName src;
|
||||||
|
|
||||||
PATH = "${nixBinDir}:${coreutils}";
|
PATH = "${nixBinDir}:${coreutils}";
|
||||||
|
|
||||||
|
|
|
@ -31,12 +31,11 @@
|
||||||
|
|
||||||
<refsection><title>Description</title>
|
<refsection><title>Description</title>
|
||||||
|
|
||||||
<para>A Nix channel is a mechanism that allows you to automatically stay
|
<para>A Nix channel is a mechanism that allows you to automatically
|
||||||
up-to-date with a set of pre-built Nix expressions. A Nix channel is
|
stay up-to-date with a set of pre-built Nix expressions. A Nix
|
||||||
just a URL that points to a place containing both a set of Nix
|
channel is just a URL that points to a place containing a set of Nix
|
||||||
expressions and a pointer to a binary cache. <phrase
|
expressions. <phrase condition="manual">See also <xref
|
||||||
condition="manual">See also <xref linkend="sec-channels"
|
linkend="sec-channels" />.</phrase></para>
|
||||||
/>.</phrase></para>
|
|
||||||
|
|
||||||
<para>This command has the following operations:
|
<para>This command has the following operations:
|
||||||
|
|
||||||
|
@ -172,18 +171,6 @@ following files:</para>
|
||||||
|
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry><term><filename>binary-cache-url</filename></term>
|
|
||||||
|
|
||||||
<listitem><para>A file containing the URL to a binary cache (such
|
|
||||||
as <uri>https://cache.nixos.org</uri>). Nix will automatically
|
|
||||||
check this cache for pre-built binaries, if the user has
|
|
||||||
sufficient rights to add binary caches. For instance, in a
|
|
||||||
multi-user Nix setup, the binary caches provided by the channels
|
|
||||||
of the root user are used automatically, but caches corresponding
|
|
||||||
to the channels of non-root users are ignored.</para></listitem>
|
|
||||||
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
</variablelist>
|
</variablelist>
|
||||||
|
|
||||||
</refsection>
|
</refsection>
|
||||||
|
|
|
@ -766,8 +766,7 @@ StoreType getStoreType(const std::string & uri = settings.storeUri.get(),
|
||||||
const std::string & stateDir = settings.nixStateDir);
|
const std::string & stateDir = settings.nixStateDir);
|
||||||
|
|
||||||
/* Return the default substituter stores, defined by the
|
/* Return the default substituter stores, defined by the
|
||||||
‘substituters’ option and various legacy options like
|
‘substituters’ option and various legacy options. */
|
||||||
‘binary-caches’. */
|
|
||||||
std::list<ref<Store>> getDefaultSubstituters();
|
std::list<ref<Store>> getDefaultSubstituters();
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -113,15 +113,6 @@ static void update(const StringSet & channelNames)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!unpacked) {
|
if (!unpacked) {
|
||||||
// The URL doesn't unpack directly, so let's try treating it like a full channel folder with files in it
|
|
||||||
// Check if the channel advertises a binary cache.
|
|
||||||
DownloadRequest request(url + "/binary-cache-url");
|
|
||||||
try {
|
|
||||||
auto dlRes = dl->download(request);
|
|
||||||
extraAttrs = "binaryCacheURL = \"" + *dlRes.data + "\";";
|
|
||||||
} catch (DownloadError & e) {
|
|
||||||
}
|
|
||||||
|
|
||||||
// Download the channel tarball.
|
// Download the channel tarball.
|
||||||
try {
|
try {
|
||||||
filename = dl->downloadCached(store, CachedDownloadRequest(url + "/nixexprs.tar.xz")).path;
|
filename = dl->downloadCached(store, CachedDownloadRequest(url + "/nixexprs.tar.xz")).path;
|
||||||
|
|
Loading…
Reference in a new issue