diff --git a/figures/fig3large.jpg b/figures/fig3large.jpg new file mode 100644 index 0000000000000000000000000000000000000000..4470c04cd335d29acda83ba4e7639acd1ced9927 Binary files /dev/null and b/figures/fig3large.jpg differ diff --git a/slides.pdf b/slides.pdf index e95f121f4fc452f791322eb40ccd960b7472ca2a..2d07d4bb9aec089a2aa2db48beea062be838b15c 100644 Binary files a/slides.pdf and b/slides.pdf differ diff --git a/slides.tex b/slides.tex index c0ead701d9e0e9ab7d259c2d290bbbaafa4bf3e4..52de98bda738e20634d1c39cab45d085bc71d66f 100644 --- a/slides.tex +++ b/slides.tex @@ -140,9 +140,9 @@ The running environment should be explicit: \begin{itemize} \item the running environment should be defined - \note[itemize]{ - \item How(had-hoc script, complex runtime etc), - \item Where(your laptop, your old laptop etc) you run you experiment.} + \note{ + How(had-hoc script, complex runtime etc), + Where(your laptop, your old laptop etc) you run you experiment.} \item Documenting how to run the experiment. \note{The input, the running scripts etc \\} @@ -304,49 +304,110 @@ The running environment should be explicit: \end{frame} \begin{frame}[fragile]{Derivations} - \only<1>{ + \begin{onlyenv}<1> \note{https://nixos.org/nixos/nix-pills/our-first-derivation.html\\} - Nix refers to \texbf{derivation} instead of packages. \\ + Nix refers to \textbf{derivation} instead of package. \\ + + \vspace{1em} + From the Nix point of view, a derivation is a build action, \\ + described by a Nix set. + + \vspace{1em} + Once built, a derivation is located into a common place\\ + the \textbf{Nix store}. + \vspace{1em} - Derivation are the building block of Nix, from a file system point of view. + + A derivation is identified with a unique hash as follows: + + \begin{lstlisting}[language=Nix,basicstyle=\small] + /nix/store/hash-name + \end{lstlisting} + \note{A derivation is a set of attributes describing a building process \\} - } + + \end{onlyenv} + \begin{onlyenv}<2> %\begin{adjustbox}{width=\textwidth,height=\textheight,keepaspectratio} \vspace{-1em} - \begin{lstlisting}[language=Nix,basicstyle=\Small] -{ stdenv, fetchurl , cmake, simgrid, boost }: - stdenv.mkDerivation rec { - - name = "chord-vprez"; + \begin{lstlisting}[language=Nix,basicstyle=\small] +{ + name = "chord"; src = fetchurl { url = "https://gitlab.com/me/chord.tar.gz"; - sha256 = "1h2jgq5pspyiskffq777nhi5rf0y8hg..."; + sha256 = "1h2jgq5pspyiskffq777nhi5rf0y8h..."; }; - cmakeFlags= " -Denable_debug=on"; + builder = "build.sh"; buildInputs = [ simgrid boost cmake ]; meta = ..; } + \end{lstlisting} - %\end{adjustbox} + \end{onlyenv} +\end{frame} - \end{onlyenv} -\end{frame} +\begin{frame}[fragile]{Store} + + All build derivations are stored in the nix store: \texttt{/nix/store}.\\ + + \vspace{1em} -\begin{frame}{Store} - Packages are stored in the nix store: \texttt{/nix/store}.\\ They are identified with a sha-256 hash of the source nix file and - its "inputs".\\ - \texttt{/nix/store/an9dli66ng2jzvqf13b2i230mm9fq7qk-cdo-1.7.2}\\ - changing a flag alters the inputs produce new packages: \\ - \texttt{/nix/store/srf6grrfy9vkc9fsplk8xk292lm8jvz5-cdo-1.7.2} + its "inputs". + + \begin{lstlisting}[basicstyle=\small] +/nix/store/wi199j9qz9n1z3f4inlnx4rdxja54vg2-vim/bin/vim + \end{lstlisting} + + \vspace{1em} + + Changing the inputs changes the path: + \note{Here I changed my vimrc} + + \begin{lstlisting}[basicstyle=\small] +/nix/store/58gs3qxyqb2xh03jkai7cmph8086d2dd-vim/bin/vim + \end{lstlisting} + +\end{frame} + +\begin{frame}[plain]{Channels} + + \only<1>{ + \textbf{NixPkgs} is a git repository containing the code of all \emph{official} derivations. + + \vspace{1em} + + A \textbf{channel} is link to branch of NixPkgs tested with continuous integration. + + \vspace{1em} + + \begin{itemize} + \item nixpkgs-unstable (feeling lucky?) + \item nixpkgs-19.03 (current stable) + \item nixpkgs-18.09 (outdated) + \end{itemize} + } + + \only<2>{ + + Channels are not fully reproducible, as they are subject to updates. + + } + \end{frame} +% \begin{frame}[fragile]{} +% +% A derivation is identified with a hash of its inputs (\emph{sources}, and \emph{derivations}) +% +% \end{frame} + \begin{frame}[plain,noframenumbering] \center Thanks. Question Time. \end{frame}