2025-05-09 18:39:26 +08:00

54 lines
1.0 KiB
Nix

{
lib,
python3Packages,
fetchFromGitHub,
ffmpeg,
nix-update-script,
}:
python3Packages.buildPythonApplication rec {
pname = "yutto";
version = "2.0.3";
pyproject = true;
pythonRelaxDeps = true;
src = fetchFromGitHub {
owner = "yutto-dev";
repo = "yutto";
tag = "v${version}";
hash = "sha256-giwCLA9M1XR0neLJVfO017Q1wK34yVQpOxUzgShDJL0=";
};
build-system = with python3Packages; [ hatchling ];
dependencies =
with python3Packages;
[
httpx
aiofiles
biliass
dict2xml
colorama
typing-extensions
pydantic
]
++ (with httpx.optional-dependencies; http2 ++ socks);
preFixup = ''
makeWrapperArgs+=(--prefix PATH : ${lib.makeBinPath [ ffmpeg ]})
'';
pythonImportsCheck = [ "yutto" ];
passthru.updateScript = nix-update-script { };
meta = with lib; {
description = "Bilibili downloader";
homepage = "https://github.com/yutto-dev/yutto";
license = licenses.gpl3Only;
maintainers = with maintainers; [ linsui ];
mainProgram = "yutto";
};
}