zdharma-continuum / zinit-annex-patch-dl

Unmaintained mirror of zinit-zsh/z-a-patch-dl
MIT License
3 stars 6 forks source link
zinit zinit-annex zsh

zinit-annex-patch-dl

A Zinit extension (i.e., an annex) that downloads files and applies patches. It adds two ice modifiers:

zinit ice dl'{URL} [-> {optional-output-file-name}]; …' …

and

zinit ice patch'{file-name-with-the-patch-to-apply}; …' …

The Zinit annex (i.e., an extension) will:

You can use this functionality to download and apply patches. For example, to install fbterm, two patches are being needed, one to fix the operation, the other one to fix the build:

zinit ice \
    as"command" \
    atclone"./configure --prefix=$ZPFX" \
    atpull"%atclone" \
    dl"https://aur.archlinux.org/cgit/aur.git/plain/0001-Fix-build-with-gcc-6.patch?h=fbterm-git" \
    dl"https://bugs.archlinux.org/task/46860?getfile=13513 -> ins.patch" \
    make"install" \
    patch"ins.patch; 0001-Fix-build-with-gcc-6.patch" \
    pick"$ZPFX/bin/fbterm" \
    reset

zinit load izmntuk/fbterm

This command will result in:

fbterm example

Installation

Run the following command to add the annex to Zinit:

zinit light zdharma-continuum/zinit-annex-patch-dl

After executing this command, you can use the dl'' and patch'' ice-mods.