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:38 +0000
committerGitHub <noreply@github.com>2023-10-18 18:01:38 +0000
commitc12ce83e4e763efd65257d9d89160c8d40ea72da (patch)
tree09d01824a9393dac1a54583693446ee4ffad621b /doc
parent3c8c81154a614432b7f127ec5cf6c2cb7934df91 (diff)
parentde8dd334ab6a16ccb88f2ba208656f9c5dfcbc42 (diff)
downloadnixpkgs-c12ce83e4e763efd65257d9d89160c8d40ea72da.tar
nixpkgs-c12ce83e4e763efd65257d9d89160c8d40ea72da.tar.gz
nixpkgs-c12ce83e4e763efd65257d9d89160c8d40ea72da.tar.bz2
nixpkgs-c12ce83e4e763efd65257d9d89160c8d40ea72da.tar.lz
nixpkgs-c12ce83e4e763efd65257d9d89160c8d40ea72da.tar.xz
nixpkgs-c12ce83e4e763efd65257d9d89160c8d40ea72da.tar.zst
nixpkgs-c12ce83e4e763efd65257d9d89160c8d40ea72da.zip
Merge staging-next into staging
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 75a261db8dc..ba7b1b19012 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.
+