···243243244244***
245245```
246246-## `fetchFromBittorrent` {#fetchfrombittorrent}
246246+## `fetchtorrent` {#fetchtorrent}
247247248248-`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)
248248+`fetchtorrent` 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)
249249250250```
251251-{ fetchFromBittorrent }:
251251+{ fetchtorrent }:
252252253253-fetchFromBittorrent {
253253+fetchtorrent {
254254 config = { peer-limit-global = 100; };
255255 url = "magnet:?xt=urn:btih:dd8255ecdc7ca55fb0bbf81323d87062db1f6d1c";
256256 sha256 = "";
257257}
258258```
259259260260-### Parameters {#fetchfrombittorrent-parameters}
260260+### Parameters {#fetchtorrent-parameters}
261261262262- `url`: Magnet URI (Magnet Link) such as `magnet:?xt=urn:btih:dd8255ecdc7ca55fb0bbf81323d87062db1f6d1c` or an HTTP URL pointing to a `.torrent` file.
263263
···3030 jsonConfig = (formats.json {}).generate "jsonConfig" config;
3131in
3232runCommand name {
3333- nativeBuildInputs = [ cacert ] ++ (if (backend == "transmission" ) then [ transmission_noSystemd ] else if (backend == "rqbit") then [ rqbit ] else throw "rqbit or transmission are the only available backends for fetchbittorrent");
3333+ nativeBuildInputs = [ cacert ] ++ (if (backend == "transmission" ) then [ transmission_noSystemd ] else if (backend == "rqbit") then [ rqbit ] else throw "rqbit or transmission are the only available backends for fetchtorrent");
3434 outputHashAlgo = if hash != "" then null else "sha256";
3535 outputHash = hash;
3636 outputHashMode = if recursiveHash then "recursive" else "flat";
37373838 # url will be written to the derivation, meaning it can be parsed and utilized
3939- # by external tools, such as tools that may want to seed fetchBittorrent calls
3939+ # by external tools, such as tools that may want to seed fetchtorrent calls
4040 # in nixpkgs
4141 inherit url;
4242}