After having a wonderful experience creating my first snap, I would like to try something more challenging. I would like to create a snap for R. The good news is that I know how to compile it from source. This is what I would do:
# Install some dependencies
apt-get update \
&& apt-get install -y --no-install-recommends \
ed \
gfortran libreadline6-dev libx11-dev libxt-dev libcairo2-dev \
libbz2-dev liblzma-dev g++ texlive texlive-fonts-extra \
build-essential texinfo \
clang \
libv8-3.14-dev \
&& rm -rf /var/lib/apt/lists/*
# install R
wget https://cran.rstudio.com/src/base/R-3/R-3.5.2.tar.gz \
&& tar zxvf R-3.5.2.tar.gz\
&& cd R-3.5.2 \
&& ./configure --prefix=/opt/R/R-3.5.2--enable-R-shlib --with-blas --with-lapack \
&& make \
&& make install \
&& cd .. \
&& rm -rf R-3.5.2\
&& ln -s /opt/R/R-3.5.2/bin/R /bin/R
# install some R packages
R -e "install.packages('tidyverse', repos = 'http://cran.us.r-project.org')"
#clean up
rm -rf /tmp/downloaded_packages/ /tmp/*.rds \
&& rm -rf /var/lib/apt/lists/*CMD ["R"]
Could you point me to an example of how to create a snapcraft.yaml
based on this?