···29 4. If needed you can also run `make menuconfig`:
3031 ```ShellSession
32- $ nix-env -i ncurses
33 $ export NIX_CFLAGS_LINK=-lncurses
34 $ make menuconfig ARCH=arch
35 ```
···29 4. If needed you can also run `make menuconfig`:
3031 ```ShellSession
32+ $ nix-env -f "<nixpkgs>" -iA ncurses
33 $ export NIX_CFLAGS_LINK=-lncurses
34 $ make menuconfig ARCH=arch
35 ```
+4-4
doc/contributing/submitting-changes.chapter.md
···43 - nixpkgs:
4445 - update pkg
46- - `nix-env -i pkg-name -f <path to your local nixpkgs folder>`
47 - add pkg
48 - Make sure it’s in `pkgs/top-level/all-packages.nix`
49- - `nix-env -i pkg-name -f <path to your local nixpkgs folder>`
50 - _If you don’t want to install pkg in you profile_.
51- - `nix-build -A pkg-attribute-name <path to your local nixpkgs folder>/default.nix` and check results in the folder `result`. It will appear in the same directory where you did `nix-build`.
52- - If you did `nix-env -i pkg-name` you can do `nix-env -e pkg-name` to uninstall it from your system.
5354 - NixOS and its modules:
55 - You can add new module to your NixOS configuration file (usually it’s `/etc/nixos/configuration.nix`). And do `sudo nixos-rebuild test -I nixpkgs=<path to your local nixpkgs folder> --fast`.
···43 - nixpkgs:
4445 - update pkg
46+ - `nix-env -iA pkg-attribute-name -f <path to your local nixpkgs folder>`
47 - add pkg
48 - Make sure it’s in `pkgs/top-level/all-packages.nix`
49+ - `nix-env -iA pkg-attribute-name -f <path to your local nixpkgs folder>`
50 - _If you don’t want to install pkg in you profile_.
51+ - `nix-build -A pkg-attribute-name <path to your local nixpkgs folder>` and check results in the folder `result`. It will appear in the same directory where you did `nix-build`.
52+ - If you installed your package with `nix-env`, you can run `nix-env -e pkg-name` where `pkg-name` is as reported by `nix-env -q` to uninstall it from your system.
5354 - NixOS and its modules:
55 - You can add new module to your NixOS configuration file (usually it’s `/etc/nixos/configuration.nix`). And do `sudo nixos-rebuild test -I nixpkgs=<path to your local nixpkgs folder> --fast`.
+2-2
doc/languages-frameworks/emscripten.section.md
···1516 If you want to work with `emcc`, `emconfigure` and `emmake` as you are used to from Ubuntu and similar distributions you can use these commands:
1718- * `nix-env -i emscripten`
19 * `nix-shell -p emscripten`
2021* **Declarative usage**:
2223- This mode is far more power full since this makes use of `nix` for dependency management of emscripten libraries and targets by using the `mkDerivation` which is implemented by `pkgs.emscriptenStdenv` and `pkgs.buildEmscriptenPackage`. The source for the packages is in `pkgs/top-level/emscripten-packages.nix` and the abstraction behind it in `pkgs/development/em-modules/generic/default.nix`.
24 * build and install all packages:
25 * `nix-env -iA emscriptenPackages`
26
···1516 If you want to work with `emcc`, `emconfigure` and `emmake` as you are used to from Ubuntu and similar distributions you can use these commands:
1718+ * `nix-env -f "<nixpkgs>" -iA emscripten`
19 * `nix-shell -p emscripten`
2021* **Declarative usage**:
2223+ This mode is far more power full since this makes use of `nix` for dependency management of emscripten libraries and targets by using the `mkDerivation` which is implemented by `pkgs.emscriptenStdenv` and `pkgs.buildEmscriptenPackage`. The source for the packages is in `pkgs/top-level/emscripten-packages.nix` and the abstraction behind it in `pkgs/development/em-modules/generic/default.nix`. From the root of the nixpkgs repository:
24 * build and install all packages:
25 * `nix-env -iA emscriptenPackages`
26
+1-4
doc/languages-frameworks/idris.section.md
···5The easiest way to get a working idris version is to install the `idris` attribute:
67```ShellSession
8-$ # On NixOS
9-$ nix-env -i nixos.idris
10-$ # On non-NixOS
11-$ nix-env -i nixpkgs.idris
12```
1314This 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`:
···5The easiest way to get a working idris version is to install the `idris` attribute:
67```ShellSession
8+$ nix-env -f "<nixpkgs>" -iA idris
0009```
1011This 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`:
+2-10
doc/languages-frameworks/octave.section.md
···24$ nix-build -A octavePackages.symbolic
25```
2627-When building Octave packages with `nix-build`, the `buildOctavePackage` function adds `octave-octaveVersion` to; the start of the package's name attribute.
28-29-This can be required when installing the package using `nix-env`:
30-31-```ShellSession
32-$ nix-env -i octave-6.2.0-symbolic
33-```
34-35-Although, you can also install it using the attribute name:
3637```ShellSession
38-$ nix-env -i -A octavePackages.symbolic
39```
4041You can build Octave with packages by using the `withPackages` passed-through function.
···24$ nix-build -A octavePackages.symbolic
25```
2627+To install it into your user profile, run this command from the root of the repository:
000000002829```ShellSession
30+$ nix-env -f. -iA octavePackages.symbolic
31```
3233You can build Octave with packages by using the `withPackages` passed-through function.
+4-8
doc/languages-frameworks/perl.section.md
···58$ nix-build -A perlPackages.ClassC3
59```
6061-`buildPerlPackage` adds `perl-` to the start of the name attribute, so the package above is actually called `perl-Class-C3-0.21`. So to install it, you can say:
62-63-```ShellSession
64-$ nix-env -i perl-Class-C3
65-```
66-67-(Of course you can also install using the attribute name: `nix-env -i -A perlPackages.ClassC3`.)
6869So what does `buildPerlPackage` do? It does the following:
70···135Nix expressions for Perl packages can be generated (almost) automatically from CPAN. This is done by the program `nix-generate-from-cpan`, which can be installed as follows:
136137```ShellSession
138-$ nix-env -i nix-generate-from-cpan
139```
00140141This program takes a Perl module name, looks it up on CPAN, fetches and unpacks the corresponding package, and prints a Nix expression on standard output. For example:
142
···58$ nix-build -A perlPackages.ClassC3
59```
6061+To install it with `nix-env` instead: `nix-env -f. -iA perlPackages.ClassC3`.
0000006263So what does `buildPerlPackage` do? It does the following:
64···129Nix expressions for Perl packages can be generated (almost) automatically from CPAN. This is done by the program `nix-generate-from-cpan`, which can be installed as follows:
130131```ShellSession
132+$ nix-env -f "<nixpkgs>" -iA nix-generate-from-cpan
133```
134+135+Substitute `<nixpkgs>` by the path of a nixpkgs clone to use the latest version.
136137This program takes a Perl module name, looks it up on CPAN, fetches and unpacks the corresponding package, and prints a Nix expression on standard output. For example:
138