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
+2-1Lines changed: 2 additions & 1 deletion
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, it's 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 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.
@@ -134,6 +134,7 @@ A few more explanations:
134
134
*`nativeBuildInputs` lists the build-time dependencies
135
135
*`buildInputs` lists the runtime dependencies
136
136
*`propagatedBuildInputs` declares runtime dependencies that should automatically be passed to anything that depends on your package
137
+
137
138
If you just use the `nix-shell` environment to build, test and use ROOT all in one, then there is not a practical difference, but it becomes important if you want to write `package.nix` files that declare individual packages that you plan to re-use.
138
139
* The Python packages in the environment are not strictly needed for building ROOT, but these are the packages that are commonly used together with ROOT, also in the unit tests and tutorials. So it's good to have them.
139
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).
0 commit comments