fetchtorrent: add meta support

This commit is contained in:
Peder Bergebakken Sundt 2023-12-02 02:04:40 +01:00
parent e47087ddbe
commit 9a16042cc3

View File

@ -14,6 +14,7 @@ in
, recursiveHash ? true
, postFetch ? ""
, postUnpack ? ""
, meta ? {}
}:
let
afterSuccess = writeShellScript "fetch-bittorrent-done.sh" ''
@ -30,6 +31,7 @@ let
jsonConfig = (formats.json {}).generate "jsonConfig" config;
in
runCommand name {
inherit meta;
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");
outputHashAlgo = if hash != "" then null else "sha256";
outputHash = hash;