Mentions légales du service

Skip to content
Snippets Groups Projects
Commit ad321853 authored by Faure Adrien's avatar Faure Adrien
Browse files

[TutoNix]lun. juin 24 10:48:59 CEST 2019

parent 42c4881e
No related branches found
No related tags found
No related merge requests found
......@@ -29,17 +29,17 @@ let texlive = pkgs.texlive.combine {
in
stdenv.mkDerivation rec {
name="paper";
src = ./.;
buildPhase = "make";
buildInputs = inputs;
installPhase = ''
mkdir $out
cp paper.pdf $out
cp slides.pdf $out
'';
buildInputs = inputs;
shell = mkShell {
buildInputs = inputs;
shellHook = "ls | entr make";
};
shellHook = "ls | entr make; exit";
}
No preview for this file type
......@@ -268,7 +268,7 @@ The running environment should be explicit:
\item Packaging is complex.
\item Abstraction layers.
\item Better reusability, factorization.
\item (Readable and Mantainable)
\item (Readable and Maintainable)
\end{itemize}
\end{frame}
......@@ -488,12 +488,53 @@ The result of the build action is automatically placed into the nix store.
\end{frame}
\begin{frame}{Nix - Command line interface}
How do we use Nix ?
\vspace{1em}
\begin{itemize}
\item \textit{nix-build} : build a derivation (that will be placed to the nix store),
\item \textit{nix-env} : install a package (in your current environment)
\note{Speak about profiles?},
\item \textit{nix-shell} : start a shell in the build environment of a derivation,
\item \textit{nix search} : search for available packages.
\end{itemize}
\end{frame}
\begin{frame}[fragile]{Nix shell}
\begin{tcolorbox}[colframe=black,colback=gray!10,coltext=black]
\center
Virtualenv on steroids.
\end{tcolorbox}
\vspace{1em}
Start an interactive session within the build environment of a derivation.
\vspace{1em}
Enables to describe environment, and start a shell within it.
\vspace{-1em}
\begin{lstlisting}[language=Nix,basicstyle=\small]
{
pkgs ? import (fetchTarball
https://github.com/achive/e860b629bc0d1f9b.tar.gz)
{}
}:
pkgs.mkShell rec {
buildInputs = [ valgrind gdb cmake ];
}
\end{lstlisting}
\end{frame}
\begin{frame}[fragile]{Why it is reproducible ?}
Writting a package for your application requires to state down every dependencies. \\
Writting a package for an application requires to state down every dependencies. \\
\vspace{1em}
The build process of your application is also incorporated within the derivation.
The build process of the application is also incorporated within the derivation.
\note{The second point makes it easy to rebuild your application.}
\end{frame}
......@@ -502,10 +543,10 @@ The result of the build action is automatically placed into the nix store.
The source of your application can be fixed:
\begin{lstlisting}[language=Nix,basicstyle=\small]
src = fetgit {
url = "https://gitlab.com/me/chord.tar.gz";
sha256 = "1h2jgq5pspyiskffq777nhi5rf0y8h...";
};
src = fetgit {
url = "https://gitlab.com/me/chord.tar.gz";
sha256 = "1h2jgq5pspyiskffq777nhi5rf0y8h...";
};
\end{lstlisting}
\vspace{1em}
......@@ -520,26 +561,23 @@ The result of the build action is automatically placed into the nix store.
\end{frame}
\begin{frame}{Nix - Command line interface}
How do we use Nix ?
\begin{frame}[fragile]
% Nix is a good solution for describing reconstructible environments.
Nix ensures the reproducibility of software environments.
\vspace{1em}
\begin{itemize}
\item \textit{nix-build} : build a derivation (that will be placed to the nix store),
\item \textit{nix-env} : install a package (in your current environment)
\note{Speak about profiles?},
\item \textit{nix-shell} : start a shell in the build environment of a derivation,
\item \textit{nix search} : Search for available packages.
\end{itemize}
\note{In this slide, I want to clarify some points.\\
Using nix as a runtime may be a bad idea as it would be limited.}
\begin{tcolorbox}[colframe=red!37,colback=red!10,coltext=black]
Nix is not a runtime, \\
Nix is not a database.
\end{tcolorbox}
\end{frame}
% \begin{frame}[fragile]{}
%
% A derivation is identified with a hash of its inputs (\emph{sources}, and \emph{derivations})
%
% \end{frame}
\begin{frame}[fragile,noframenumbering]
\center Thanks. Question Time.
\center Thanks.
\end{frame}
\appendix
......@@ -572,7 +610,7 @@ The result of the build action is automatically placed into the nix store.
\begin{frame}{Existing solutions}
\hspace{1cm}
\begin{tabular}{ccccc}
& Module & \includegraphics[scale=0.04]{./figures/easybuild_logo_alpha.png} &
& Module & \includegraphics[scale=0.04]{./figures/easybuild_logo_alpha.png}&
\includegraphics[scale=0.2]{figures/spack-logo-text-64} &
\includegraphics[scale=0.06]{figures/nixos-logo-only-hires}\\
\hline
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment