doc/idris: Fix install instructions

Because of nix-env weirdness, I introduced a mistake in the docs in
https://github.com/NixOS/nixpkgs/pull/50182, this fixes it.
This commit is contained in:
Silvan Mosberger 2019-06-15 17:11:24 +02:00
parent 33a0ef8bb3
commit eda8c36795
No known key found for this signature in database
GPG key ID: 9424360B4B85C9E7

View file

@ -11,10 +11,21 @@ $ # On non-NixOS
$ nix-env -i nixpkgs.idris
```
This however only provides the `prelude` and `base` libraries. To install additional libraries:
This however only provides the `prelude` and `base` libraries. To install idris with additional libraries, you can use the `idrisPackages.with-packages` function, e.g. in an overlay in `~/.config/nixpkgs/overlays/my-idris.nix`:
```nix
self: super: {
myIdris = with self.idrisPackages; with-packages [ contrib pruviloj ];
}
```
And then:
```
$ nix-env -iE 'pkgs: pkgs.idrisPackages.with-packages (with pkgs.idrisPackages; [ contrib pruviloj ])'
$ # On NixOS
$ nix-env -iA nixos.myIdris
$ # On non-NixOS
$ nix-env -iA nixpkgs.myIdris
```
To see all available Idris packages: