Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib
diff options
context:
space:
mode:
Diffstat (limited to 'archinstall/lib')
-rw-r--r--archinstall/lib/installer.py7
-rw-r--r--archinstall/lib/plugins.py1
2 files changed, 8 insertions, 0 deletions
diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py
index a7b36481..51539d2c 100644
--- a/archinstall/lib/installer.py
+++ b/archinstall/lib/installer.py
@@ -10,6 +10,7 @@ from .systemd import Networkd
from .output import log
from .storage import storage
from .hardware import *
+from .plugins import plugins
# Any package that the Installer() is responsible for (optional and the default ones)
__packages__ = ["base", "base-devel", "linux-firmware", "linux", "linux-lts", "linux-zen", "linux-hardened"]
@@ -126,6 +127,12 @@ class Installer():
def pacstrap(self, *packages, **kwargs):
if type(packages[0]) in (list, tuple): packages = packages[0]
+
+ for plugin in plugins.values():
+ if hasattr(plugin, 'on_pacstrap'):
+ if (result := plugin.on_pacstrap(packages)):
+ packages = result
+
self.log(f'Installing packages: {packages}', level=logging.INFO)
if (sync_mirrors := sys_command('/usr/bin/pacman -Syy')).exit_code == 0:
diff --git a/archinstall/lib/plugins.py b/archinstall/lib/plugins.py
new file mode 100644
index 00000000..adf900b9
--- /dev/null
+++ b/archinstall/lib/plugins.py
@@ -0,0 +1 @@
+plugins = {} \ No newline at end of file