about summary refs log tree commit diff
path: root/doc
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2023-10-18 18:01:05 +0000
committerGitHub <noreply@github.com>2023-10-18 18:01:05 +0000
commitde8dd334ab6a16ccb88f2ba208656f9c5dfcbc42 (patch)
tree55badcd7d1cfa1fd22573befee010be78c2b459b /doc
parent8e8fc732969b58d419e7c369497b3d243d52d2ba (diff)
parentf82f259f029a351718b6db802eac28410983fdc7 (diff)
downloadnixlib-de8dd334ab6a16ccb88f2ba208656f9c5dfcbc42.tar
nixlib-de8dd334ab6a16ccb88f2ba208656f9c5dfcbc42.tar.gz
nixlib-de8dd334ab6a16ccb88f2ba208656f9c5dfcbc42.tar.bz2
nixlib-de8dd334ab6a16ccb88f2ba208656f9c5dfcbc42.tar.lz
nixlib-de8dd334ab6a16ccb88f2ba208656f9c5dfcbc42.tar.xz
nixlib-de8dd334ab6a16ccb88f2ba208656f9c5dfcbc42.tar.zst
nixlib-de8dd334ab6a16ccb88f2ba208656f9c5dfcbc42.zip
Merge master into staging-next
Diffstat (limited to 'doc')
-rw-r--r--doc/builders/fetchers.chapter.md23
1 files changed, 23 insertions, 0 deletions
diff --git a/doc/builders/fetchers.chapter.md b/doc/builders/fetchers.chapter.md
index 75a261db8dcd..ba7b1b190128 100644
--- a/doc/builders/fetchers.chapter.md
+++ b/doc/builders/fetchers.chapter.md
@@ -243,3 +243,26 @@ or
 
 ***
 ```
+## `fetchFromBittorrent` {#fetchfrombittorrent}
+
+`fetchFromBittorrent` expects two arguments. `url` which can either be a Magnet URI (Magnet Link) such as `magnet:?xt=urn:btih:dd8255ecdc7ca55fb0bbf81323d87062db1f6d1c` or an HTTP URL pointing to a `.torrent` file. It can also take a `config` argument which will craft a `settings.json` configuration file and give it to `transmission`, the underlying program that is performing the fetch. The available config options for `transmission` can be found [here](https://github.com/transmission/transmission/blob/main/docs/Editing-Configuration-Files.md#options)
+
+```
+{ fetchFromBittorrent }:
+
+fetchFromBittorrent {
+  config = { peer-limit-global = 100; };
+  url = "magnet:?xt=urn:btih:dd8255ecdc7ca55fb0bbf81323d87062db1f6d1c";
+  sha256 = "";
+}
+```
+
+### Parameters {#fetchfrombittorrent-parameters}
+
+- `url`: Magnet URI (Magnet Link) such as `magnet:?xt=urn:btih:dd8255ecdc7ca55fb0bbf81323d87062db1f6d1c` or an HTTP URL pointing to a `.torrent` file.
+
+- `backend`: Which bittorrent program to use. Default: `"transmission"`. Valid values are `"rqbit"` or `"transmission"`. These are the two most suitable torrent clients for fetching in a fixed-output derivation at the time of writing, as they can be easily exited after usage. `rqbit` is written in Rust and has a smaller closure size than `transmission`, and the performance and peer discovery properties differs between these clients, requiring experimentation to decide upon which is the best.
+
+- `config`: When using `transmission` as the `backend`, a json configuration can
+  be supplied to transmission. Refer to the [upstream documentation](https://github.com/transmission/transmission/blob/main/docs/Editing-Configuration-Files.md) for information on how to configure.
+