You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: blog/_posts/2025-04-31-root-with-nix.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ Nix isolates your development environment in a pure sandbox shell, keeping your
24
24
Packages are only loaded when you enter a given nix shell, with no trace after you exit the shell other than cached artifacts that can be garbage collected whenever you want.
25
25
26
26
Since Nix is cross platform, this post actually applies to **any** Linux distribution as well — including of course [NixOS](https://en.wikipedia.org/wiki/NixOS), where the whole system is declared in a single `configuration.nix` file.
27
-
Still, this post marketed towards Mac users, because since there is no official package manager on macOS, building ROOT on that platform can be particularly challenging.
27
+
Still, this post is marketed towards Mac users, because since there is no official package manager on macOS, building ROOT on that platform can be particularly challenging.
28
28
29
29
One downside of Nix is that it's not compliant with Linux Standard Base (LSB), so you might often have to patch code to use the paths that Nix expects.
30
30
Fortunately, once you have figured out what the right patch is, you will never have to solve the same problem again because the solution is set in stone in your nix configuration files.
@@ -140,12 +140,12 @@ A few more explanations:
140
140
* The `shellHook` variable contains bash code that is run when opening the `nix-shell`. We use it to define aliases for configuring ROOT with the desired CMake configuration flags, and then later to build and install ROOT with the desired number of threads (12 threads in our example).
141
141
* In the CMake command, we set `-DCMAKE_INSTALL_PREFIX=../root_install` such that the install directory sits nicely next to the `root_src` and `root_build` directories.
142
142
* See the page about [installing ROOT from source](http://127.0.0.1:4000/base/install/build_from_source/#all-build-options) for more info on the ROOT-specific CMake flags. Depending on what ROOT feature you want to develop, you have to toggle, add, or remove flags.
143
-
* This blog post is not updated. So if the environment doesn't work anymore, please reach out to us, optimally by opening a [GitHub issue](https://github.com/root-project/root/issues)requesing a working `shell.nix` example for ROOT development.
143
+
* This blog post is not updated. So if the environment doesn't work anymore, please reach out to us, optimally by opening a [GitHub issue](https://github.com/root-project/root/issues)requesting a working `shell.nix` example for ROOT development.
144
144
145
145
If your `shell.nix` file is in the `root` directory and you changed to that directory in your terminal,
146
146
you activate the environment by running:
147
147
```bash
148
-
shell-nix
148
+
nix-shell
149
149
```
150
150
It will take some time to download the dependencies to the Nix cache if you enter the environment for the first time.
151
151
To exit the environment later, run the `exit` command in the shell.
@@ -175,7 +175,7 @@ Are you still in the build directory? Then you can source the ROOT installation
175
175
```bash
176
176
source ../root_install/bin/thisroot.sh
177
177
```
178
-
If you want to test the installation, you can try to start the `root` prompt, or maybe open a `python` interpreter and try to `import ROOT`. Or, if you are adventuruos, maybe run a ROOT Python tutorial:
178
+
If you want to test the installation, you can try to start the `root` prompt, or maybe open a `python` interpreter and try to `import ROOT`. Or, if you are adventurous, maybe run a ROOT Python tutorial:
0 commit comments