Which plugin just allows me to manually execute shell commands?

When I want to build the libmpv I execute the following commands:

sudo apt-get install git dh-autoreconf build-essential libfreetype6-dev libfribidi-dev libfontconfig1-dev yasm libmp3lame-dev libx264-dev libfdk-aac-dev python libssl1.0-dev libpulse-dev python-pip
sudo -H pip install -g youtube-dl

git clone https://github.com/mpv-player/mpv-build.git

cd mpv-build
echo --enable-libx264 >> ffmpeg_options
echo --enable-libmp3lame >> ffmpeg_options
echo --enable-libfdk-aac >> ffmpeg_options
echo --enable-nonfree >> ffmpeg_options
echo --enable-libmpv-shared > mpv_options
./use-mpv-custom v0.29.1
./rebuild -j4
sudo ./install
cd ..

export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH

As you can see I build the libmpv using a utility library that handles all the dirty job of building it manually. Though, being newbie I am still pretty much confused once it comes on how I can use it when I need to build a software using it as a snap.

The confusion rises on what module I need to use when I have already a shell script that handles the building process itself and I just need to execute it. Can you help me with that?

In my case I need to execute from the command line the install script in order the tool to be able to install the libmpv.

You can use the nil plugin for this, together with the override-build property. Something like this:

    plugin: nil
    source: ...
    override-build: |
      # Put shell commands here run from a directory containing the
      # part's source. The commands should build the part, and install
      # anything intended for the snap in $SNAPCRAFT_PART_INSTALL

You can also combine override-build with the other plugins: just include a call to snapcraftctl build where you want the plugin’s usual build commands to run.