Chuyển đến nội dung
GitHubGitHub (wiki)

Install scripts

Nội dung này chưa có trong Tiếng Việt

./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.sh installed.
    • They are mainly from the value of array depends inside those ./sdata/dist-arch/*/PKGBUILD.
    • Some of them are built locally following the PKGBUILD.
  • If needed, also create ./sdata/dist-<DISTRO_ID>/install-setups.sh. When it does not exist, ./setup install will use ./sdata/dist-fallback/install-setups.sh instead, 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>/.gitignore if 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.

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.

The related scripts and files around ./setup install belongs to “main method”, which is developed and maintained mainly by clsty.

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.

  • 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 install select 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-nix is passed. Still WIP.
  • cache/: When the script build something from source, they’re stored under ./cache/. It’s included in .gitignore.

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.

See issue#1061 for detail.