Install scripts
Ce contenu n'est pas disponible en français
Help wanted
Section titled “Help wanted”Support on each distro
Section titled “Support on each distro”./setup install detects the distro ID and try to use ./sdata/dist-<DISTRO_ID>/install-deps.sh for dependency installation if it exists.
We need more scripts sdata/dist-<DISTRO_ID>/install-deps.sh to support specific distro using their system package manager.
Requirements:
- This script should be written in Bash.
- This script should be idempotent.
- This script should reflect or cover the equivalents of the packages which
./sdata/dist-arch/install-deps.shinstalled.- They are mainly from the value of array
dependsinside those./sdata/dist-arch/*/PKGBUILD. - Some of them are built locally following the PKGBUILD.
- They are mainly from the value of array
- If needed, also create
./sdata/dist-<DISTRO_ID>/install-setups.sh. When it does not exist,./setup installwill use./sdata/dist-fallback/install-setups.shinstead, which may be not suitable for your distro.
Optional:
- Create “meta packages” using the prefix
illogical-impulse-, so that user can remove them easily without unexpectedly removing the packages that installed by the user for other purposes. - Create
sdata/dist-<DISTRO_ID>/README.md. - Create
sdata/dist-<DISTRO_ID>/.gitignoreif files generated during building should not be tracked by git, for example binary, cache, fetched source tree or archive. - Subscribe discussion#2140 to get notifications about updates on
sdata/dist-arch/by GitHub Action bot in future.
Cross-distro support via Nix
Section titled “Cross-distro support via Nix”When --via-nix is passed to ./setup install, ./sdata/dist-nix/install-deps.sh (still WIP) will be used. It’s not for NixOS, but for nearly every distro.
We need help on sdata/dist-nix/install-deps.sh.
See issue #1061.
Main method
Section titled “Main method”The related scripts and files around ./setup install belongs to “main method”, which is developed and maintained mainly by clsty.
Idempotent
Section titled “Idempotent”The scripts are and should be idempotent, i.e. capable for running multiple times.
This is useful for debugging and a resumable installation, and also provide updating function somehow.
Structure
Section titled “Structure”- Main script:
./setup sdata/:sdata/lib/: Scripts containing reusable codes to be sourced at the beginning.sdata/subcmd-*/: Scripts containing the actual steps for subcommands.sdata/uv/: For python dependencies handled by uv.
sdata/dist-<DISTRO_ID>/: Contains the collection of the distro specific install scripts which./setup installselect to use according to the current distro. It also contains other files needed by or related to the distro specific scripts.sdata/dist-nix/: Used when--via-nixis passed. Still WIP.cache/: When the script build something from source, they’re stored under./cache/. It’s included in.gitignore.
Online script
Section titled “Online script”setup:
- Stored in the repo of dots-hyprland-wiki to be served by the doc site directly.
- When executed, it downloads the dots-hyprland repo and then executes the
./setup install.
Nix (WIP)
Section titled “Nix (WIP)”See issue#1061 for detail.