From 7715ab1ab695a147f25055b8275d6c023955b100 Mon Sep 17 00:00:00 2001 From: "Tanjona R. Rabemananjara" Date: Mon, 27 Jan 2025 14:05:41 +0100 Subject: [PATCH 1/2] Add alternative development using nix --- docs/installation.md | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/docs/installation.md b/docs/installation.md index 847dcdd3..e8c7ba18 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -196,7 +196,40 @@ If you'd like to convert NNPDF's legacy FK tables to PineAPPL grids, add the swi #### Alternative: development version -To use the most recent version available run +An alternative way to easily get started with building `pineappl` is to use +[nix-shell](https://nixos.wiki/wiki/Development_environment_with_nix-shell). +`nix-shell` is a powerful tool from the [Nix](https://nixos.org/) ecosystem +that provides a reproducible development environment without modifying the +system's global state. It is especially convenient when building `pineappl_cli` +with the various features such as `APPLgrid` or `fastNLO`. + +The interactive nix-based shell and its package manager can be easily installed +using the OS' package manager by following the instructions on +[this page](https://nixos.org/download/#download-nix). + +To use `nix-shell`, simply create a `shell.nix` file in the working directory with +the following contents: +```nix +with import {}; { + qpidEnv = stdenvNoCC.mkDerivation { + name = "build-pineappl"; + buildInputs = [ + gcc + gfortran + lhapdf + cargo + cargo-c + ]; + }; +} +``` +This will provide all the necessary dependencies to build `pineappl` as well as its +C-/Fortran APIs and CLI version. Finally, to invoke the shell, simply run: +``` +nix-shell +``` + +When building the `pineappl_cli`, in order to use the most recent version available run cargo install --locked --git https://github.com/NNPDF/pineappl.git pineappl_cli From f2b008ee319a298f45300383830eece8c9ad68a8 Mon Sep 17 00:00:00 2001 From: "Tanjona R. Rabemananjara" Date: Tue, 11 Feb 2025 13:18:23 +0100 Subject: [PATCH 2/2] Finalize documentation --- docs/installation.md | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/docs/installation.md b/docs/installation.md index e8c7ba18..3275efab 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -179,7 +179,7 @@ operators (EKO)](https://eko.readthedocs.io/), add the switch cargo install --locked --features=evolve pineappl_cli -### Optional: fastNLO importer +#### Optional: fastNLO importer If you'd like to convert fastNLO tables to PineAPPL grids, make sure to install [fastNLO](https://fastnlo.hepforge.org/) first and add the switch @@ -200,8 +200,8 @@ An alternative way to easily get started with building `pineappl` is to use [nix-shell](https://nixos.wiki/wiki/Development_environment_with_nix-shell). `nix-shell` is a powerful tool from the [Nix](https://nixos.org/) ecosystem that provides a reproducible development environment without modifying the -system's global state. It is especially convenient when building `pineappl_cli` -with the various features such as `APPLgrid` or `fastNLO`. +system's global state. It is especially convenient when building `pineappl` +with the various features such as `applgrid` and/or `fastnlo`. The interactive nix-based shell and its package manager can be easily installed using the OS' package manager by following the instructions on @@ -212,19 +212,25 @@ the following contents: ```nix with import {}; { qpidEnv = stdenvNoCC.mkDerivation { - name = "build-pineappl"; + name = "pineappl-with-all-features"; buildInputs = [ - gcc + gcc10 gfortran + root lhapdf cargo cargo-c + zlib + fastnlo-toolkit ]; }; } ``` -This will provide all the necessary dependencies to build `pineappl` as well as its -C-/Fortran APIs and CLI version. Finally, to invoke the shell, simply run: +This will provide with all the necessary dependencies required to build PineAPPL +with all the features except `applgrid`. APPLgrid needs to be compiled from +source as described in [this section](#optional-applgrid-exporterimporter). + +Then, to invoke the shell, simply run: ``` nix-shell ```