Giter Site home page Giter Site logo

zinit-annex-patch-dl's Introduction

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:

  • Download the given {URL} under the path {optional-output-file-name} (if no file name is given, then it is taken from the last segment of the URL) in case of the dl'' ice-mod,
  • Apply a patch given by the {file-name-with-the-patch-to-apply} in case of the patch'' ice-mod.

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.