Skip to content

Commit ebc1104

Browse files
committed
Don't mention nix-env in ROOT installation instructions
The `nix-env` command is deprecated because it creates non-reproducible environments. Also, explain how to use the Python package.
1 parent 3a6e00b commit ebc1104

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

install/index.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -196,16 +196,19 @@ If you encounter any issues, feel free to report them to the [guix-science issue
196196

197197
### <a name="nixos_nix_nixpkgs" />NixOS/Nix/Nixpkgs
198198

199-
The package name for ROOT in nixpkgs is `root`. It can be installed into the user environment using
199+
The package name for ROOT in nixpkgs is `root`.
200200

201+
You can start a temporary shell to try out ROOT as follows:
201202
```sh
202-
$ nix-env -f '<nixpkgs>' -iA root
203+
$ nix-shell -p root --run root
204+
$ root
203205
```
204206

205-
Running in a temporary environment can be achieved with
206-
207+
As explained in the [NixOS Wiki](https://nixos.wiki/wiki/Python), the preferred way to use Python is to add it to your environment along with any libraries you need.
208+
NixOS also has a `python3.root` package for that, which you can add to a temporary Python environment in a Nix shell like this:
207209
```sh
208-
$ nix-shell -p root --run root
210+
$ nix-shell -p "python3.withPackages (pkgs: with pkgs; [ root ])"
211+
$ python -i -c "import ROOT"
209212
```
210213

211214
A `root5` package is provided for the legacy software support.

0 commit comments

Comments
 (0)