From 33fba9b6ba43838fa6b01fbc0733e04d4ec2174b Mon Sep 17 00:00:00 2001 From: Ulysses Zhan Date: Fri, 15 Aug 2025 15:52:09 -0700 Subject: [PATCH] bili-live-tool: init at 0.3.9 --- pkgs/by-name/bi/bili-live-tool/package.nix | 61 ++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 pkgs/by-name/bi/bili-live-tool/package.nix diff --git a/pkgs/by-name/bi/bili-live-tool/package.nix b/pkgs/by-name/bi/bili-live-tool/package.nix new file mode 100644 index 000000000000..4e00973669dd --- /dev/null +++ b/pkgs/by-name/bi/bili-live-tool/package.nix @@ -0,0 +1,61 @@ +{ + lib, + python3Packages, + fetchFromGitHub, + nix-update-script, +}: + +let + version = "0.3.9"; +in +python3Packages.buildPythonApplication { + pname = "bili-live-tool"; + inherit version; + + src = fetchFromGitHub { + owner = "chenxi-Eumenides"; + repo = "bilibili_live_tool"; + tag = "v${version}"; + hash = "sha256-gNzR9cDy4sixQOSWAXeX5qOoGkaFOjBU//+iHvG0lG8="; + }; + + postPatch = '' + tee >> pyproject.toml < $out/bin/bili-live-tool + chmod +x $out/bin/bili-live-tool + ''; + + nativeCheckInputs = with python3Packages; [ unittestCheckHook ]; + unittestFlags = [ + "-s" + "unittest" + "-v" + ]; + + passthru.updateScript = nix-update-script { }; + + meta = { + description = "Tool to start and stop streaming and getting streaming codes for Bilibili live"; + homepage = "https://github.com/chenxi-Eumenides/bilibili_live_tool"; + license = lib.licenses.mpl20; + maintainers = with lib.maintainers; [ ulysseszhan ]; + mainProgram = "bili-live-tool"; + }; +}