Mentions légales du service

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

fix Nix description

parent 55178c6e
No related branches found
No related tags found
No related merge requests found
...@@ -144,7 +144,7 @@ The Problem: ...@@ -144,7 +144,7 @@ The Problem:
\begin{frame}{What is Nix ?} \begin{frame}{What is Nix ?}
\only<1>{% \only<1>{%
Nix is a Package Manager: \\ Nix is a Package Manager\\
% Why for experimentations ? % Why for experimentations ?
\vspace{1em} \vspace{1em}
\begin{itemize} \begin{itemize}
...@@ -153,22 +153,19 @@ The Problem: ...@@ -153,22 +153,19 @@ The Problem:
\item Multiple versions \item Multiple versions
\item Decentralized package repositories \item Decentralized package repositories
\note{Packages can come from different places, thus you can have yours.\\} \note{Packages can come from different places, thus you can have yours.\\}
\item Explicit build process \item Clear dependencies
\item{build on my laptop, run on g5k}
\note{Every deps need to be stated\\ \note{Every deps need to be stated\\
The building process is explicit in Nix\\ The building process is explicit in Nix\\
Build Once, build twice (six month later)\\ Build Once, build twice (six month later)\\
Possibility to describing full software environment\\ Possibility to describing full software environment\\
From building environment, to runtime and data analysis\\} From building environment, to runtime and data analysis\\}
\item Portable packages
\note{build on my laptop, run on g5k}
\end{itemize} \end{itemize}
} }
% \center\Large\sc The Nix Ecosystem. {\url{https://nixos.org}} % \center\Large\sc The Nix Ecosystem. {\url{https://nixos.org}}
\end{frame} \end{frame}
\subsection{Expression Language}
% \begin{frame}{Nix - Programming Language} % \begin{frame}{Nix - Programming Language}
% %
% What? % What?
...@@ -194,7 +191,7 @@ The Problem: ...@@ -194,7 +191,7 @@ The Problem:
% \end{frame} % \end{frame}
\section{Nix Concepts} \subsection{Nix Concepts}
\begin{frame}{Main Concepts} \begin{frame}{Main Concepts}
...@@ -206,40 +203,30 @@ The Problem: ...@@ -206,40 +203,30 @@ The Problem:
\vspace{1em} \vspace{1em}
\begin{itemize} \begin{itemize}
\item Functions build packages \item Functions build packages
\item Functions inputs are package dependencies \item Inputs = dependencies, source code
\item No side effects
\begin{itemize}
\item Undeclared dependencies $\rightarrow$ fail
% \item Undeclared dependencies $\rightarrow$ fail
\end{itemize}
\item Packages are written in Nix
\end{itemize} \end{itemize}
\end{frame} \end{frame}
\begin{frame}[fragile]{Derivations} \subsection{Packages}
\note{https://nixos.org/nixos/nix-pills/our-first-derivation.html\\} \begin{frame}[fragile]{Package Definition Example}
% Nix refers to \textbf{derivation} instead of package. \\
% A package is a defined by a \textbf{derivation}. \\
% It can be build with the command \textit{nix-build}.
\begin{tcolorbox}[colframe=black,colback=gray!10,coltext=black]
A derivation is a Nix build action.
\end{tcolorbox}
\vspace{1em}
A derivation is defined in Nix, as a set of attributes:
% It is a Nix attribute set describing how to build a package. % It is a Nix attribute set describing how to build a package.
\note{A python dict, or java hashtable\\}
\pause
\vspace{-1em} \vspace{-1em}
\begin{lstlisting}[language=Nix,basicstyle=\small] \begin{lstlisting}[language=Nix,basicstyle=\small]
stdenv.mkDerivation { stdenv.mkDerivation {
name = "chord"; name = "chord";
src = fetchurl { src = fetchurl {
url = "https://gitlab.com/me/chord.tar.gz"; url = "https://gitlab.com/me/chord.tar.gz";
sha256 = "1h2jgq5pspyiskffq777nhi5rf0y8h..."; sha256 = "1h2jgq5pspyiskffq777nhi5rf0y8h...";
}; };
buildInputs = [ simgrid boost cmake ]; buildInputs = [ simgrid boost cmake ];
} }
\end{lstlisting} \end{lstlisting}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment