mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-01 19:33:03 +00:00
pyload-ng: add declarative user management patch
This commit is contained in:
parent
7f10f17211
commit
c751c1f9a9
@ -0,0 +1,15 @@
|
||||
diff --git a/src/pyload/core/__init__.py b/src/pyload/core/__init__.py
|
||||
index 4324fc700..f7fcd66ec 100644
|
||||
--- a/src/pyload/core/__init__.py
|
||||
+++ b/src/pyload/core/__init__.py
|
||||
@@ -46,8 +46,8 @@ class Exit(Exception):
|
||||
# improve external scripts
|
||||
class Core:
|
||||
LOCALE_DOMAIN = APPID
|
||||
- DEFAULT_USERNAME = APPID
|
||||
- DEFAULT_PASSWORD = APPID
|
||||
+ DEFAULT_USERNAME = os.getenv("PYLOAD_DEFAULT_USERNAME", APPID)
|
||||
+ DEFAULT_PASSWORD = os.getenv("PYLOAD_DEFAULT_PASSWORD", APPID)
|
||||
DEFAULT_DATADIR = os.path.join(
|
||||
os.getenv("APPDATA") or USERHOMEDIR, "pyLoad" if os.name == "nt" else ".pyload"
|
||||
)
|
@ -10,6 +10,11 @@ python3.pkgs.buildPythonApplication rec {
|
||||
hash = "sha256-1lPIKkZESonDaVCnac0iUu/gCqXVDBhNZrk5S0eC6F0=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Makes it possible to change the default username/password in the module
|
||||
./declarative-default-user.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
# relax version bounds
|
||||
sed -i 's/\([A-z0-9]*\)~=.*$/\1/' setup.cfg
|
||||
|
Loading…
Reference in New Issue
Block a user