soy ass qbit-manage patch
This commit is contained in:
parent
4eef0b8578
commit
4d9eaa65a2
@ -7,16 +7,20 @@
|
|||||||
|
|
||||||
python3.pkgs.buildPythonApplication rec {
|
python3.pkgs.buildPythonApplication rec {
|
||||||
pname = "qbit-manage";
|
pname = "qbit-manage";
|
||||||
version = "4.1.14";
|
version = "4.3.0";
|
||||||
pyproject = true;
|
pyproject = true;
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "StuffAnThings";
|
owner = "StuffAnThings";
|
||||||
repo = "qbit_manage";
|
repo = "qbit_manage";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
hash = "sha256-JTQZlJ2d0oOpT8lIf9mgQ/onTs5jiWfvzFx0XBjbCQo=";
|
hash = "sha256-Wj1s11PwHfH4hDGEn0jW/REO2gI7+AGyb2B/QKUhlyk=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
rm LICENSE
|
||||||
|
'';
|
||||||
|
|
||||||
build-system = [
|
build-system = [
|
||||||
python3.pkgs.setuptools
|
python3.pkgs.setuptools
|
||||||
python3.pkgs.wheel
|
python3.pkgs.wheel
|
||||||
@ -27,12 +31,27 @@ python3.pkgs.buildPythonApplication rec {
|
|||||||
gitpython
|
gitpython
|
||||||
humanize
|
humanize
|
||||||
pytimeparse2
|
pytimeparse2
|
||||||
qbittorrent-api
|
bencode-py
|
||||||
requests
|
requests
|
||||||
retrying
|
retrying
|
||||||
ruamel-yaml
|
ruamel-yaml
|
||||||
schedule
|
schedule
|
||||||
(callPackage ./bencodepy.nix { })
|
(callPackage ./qbittorrent-api.nix {
|
||||||
|
inherit lib;
|
||||||
|
inherit (python3.pkgs)
|
||||||
|
buildPythonPackage
|
||||||
|
fetchPypi
|
||||||
|
|
||||||
|
# build-system
|
||||||
|
setuptools
|
||||||
|
setuptools-scm
|
||||||
|
|
||||||
|
# dependencies
|
||||||
|
packaging
|
||||||
|
requests
|
||||||
|
urllib3
|
||||||
|
;
|
||||||
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
|||||||
25
pkgs_wip/qbit-manage.patch
Normal file
25
pkgs_wip/qbit-manage.patch
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
diff --git a/modules/logs.py b/modules/logs.py
|
||||||
|
index 1234567..abcdef0 100644
|
||||||
|
--- a/modules/logs.py
|
||||||
|
+++ b/modules/logs.py
|
||||||
|
@@ class MyLogger:
|
||||||
|
def __init__(
|
||||||
|
self, logger_name, log_file, log_level, default_dir, screen_width, separating_character, ignore_ghost, log_size, log_count
|
||||||
|
):
|
||||||
|
- self.log_dir = os.path.join(default_dir, LOG_DIR)
|
||||||
|
- self.main_log = log_file if os.path.exists(os.path.dirname(log_file)) else os.path.join(self.log_dir, log_file)
|
||||||
|
+ self.log_dir = None
|
||||||
|
+ self.main_log = log_file
|
||||||
|
self.main_handler = None
|
||||||
|
self.save_errors = False
|
||||||
|
self.saved_errors = []
|
||||||
|
self.config_handlers = {}
|
||||||
|
self.secrets = set()
|
||||||
|
self.spacing = 0
|
||||||
|
self.log_size = log_size
|
||||||
|
self.log_count = log_count
|
||||||
|
- os.makedirs(self.log_dir, exist_ok=True)
|
||||||
|
|
||||||
|
self._logger = logging.getLogger(self.logger_name)
|
||||||
|
logging.DRYRUN = DRYRUN
|
||||||
|
logging.addLevelName(DRYRUN, "DRYRUN")
|
||||||
50
pkgs_wip/qbittorrent-api.nix
Normal file
50
pkgs_wip/qbittorrent-api.nix
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
buildPythonPackage,
|
||||||
|
fetchPypi,
|
||||||
|
|
||||||
|
# build-system
|
||||||
|
setuptools,
|
||||||
|
setuptools-scm,
|
||||||
|
|
||||||
|
# dependencies
|
||||||
|
packaging,
|
||||||
|
requests,
|
||||||
|
urllib3,
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "qbittorrent-api";
|
||||||
|
version = "2025.5.0";
|
||||||
|
pyproject = true;
|
||||||
|
|
||||||
|
src = fetchPypi {
|
||||||
|
pname = "qbittorrent_api";
|
||||||
|
inherit version;
|
||||||
|
hash = "sha256-NKD5weGufhbeUOlGUXUsjZejz1TCo+GgXGqDdzmaDjA=";
|
||||||
|
};
|
||||||
|
|
||||||
|
build-system = [
|
||||||
|
setuptools
|
||||||
|
setuptools-scm
|
||||||
|
];
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
packaging
|
||||||
|
requests
|
||||||
|
urllib3
|
||||||
|
];
|
||||||
|
|
||||||
|
# Tests require internet access
|
||||||
|
doCheck = false;
|
||||||
|
|
||||||
|
pythonImportsCheck = [ "qbittorrentapi" ];
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "Python client implementation for qBittorrent's Web API";
|
||||||
|
homepage = "https://github.com/rmartin16/qbittorrent-api";
|
||||||
|
changelog = "https://github.com/rmartin16/qbittorrent-api/blob/v${version}/CHANGELOG.md";
|
||||||
|
license = lib.licenses.mit;
|
||||||
|
maintainers = with lib.maintainers; [ savyajha ];
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user