Skip to content

Add alternative development using Nix #324

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 41 additions & 2 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -196,7 +196,46 @@ 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`
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
[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 <nixpkgs> {}; {
qpidEnv = stdenvNoCC.mkDerivation {
name = "pineappl-with-all-features";
buildInputs = [
gcc10
gfortran
root
lhapdf
cargo
cargo-c
zlib
fastnlo-toolkit
];
};
}
```
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
```

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

Expand Down