···1+Idris packages
2+==============
3+4+This directory contains build rules for idris packages. In addition,
5+it contains several functions to build and compose those packages.
6+Everything is exposed to the user via the `idrisPackages` attribute.
7+8+callPackage
9+------------
10+11+This is like the normal nixpkgs callPackage function, specialized to
12+idris packages.
13+14+builtins
15+---------
16+17+This is a list of all of the libraries that come packaged with Idris
18+itself.
19+20+build-idris-package
21+--------------------
22+23+A function to build an idris package. Its sole argument is a set like
24+you might pass to `stdenv.mkDerivation`, except `build-idris-package`
25+sets several attributes for you. See `build-idris-package.nix` for
26+details.
27+28+build-builtin-package
29+----------------------
30+31+A version of `build-idris-package` specialized to builtin libraries.
32+Mostly for internal use.
33+34+with-packages
35+-------------
36+37+Bundle idris together with a list of packages. Because idris currently
38+only supports a single directory in its library path, you must include
39+all desired libraries here, including `prelude` and `base`.
···1+Node.js packages
2+================
3+The `pkgs/development/node-packages` folder contains a generated collection of
4+[NPM packages](https://npmjs.com/) that can be installed with the Nix package
5+manager.
6+7+As a rule of thumb, the package set should only provide *end user* software
8+packages, such as command-line utilities. Libraries should only be added to the
9+package set if there is a non-NPM package that requires it.
10+11+When it is desired to use NPM libraries in a development project, use the
12+`node2nix` generator directly on the `package.json` configuration file of the
13+project.
14+15+The package set also provides support for multiple Node.js versions. The policy
16+is that a new package should be added to the collection for the latest stable LTS
17+release (which is currently 6.x), unless there is an explicit reason to support
18+a different release.
19+20+If your package uses native addons, you need to examine what kind of native
21+build system it uses. Here are some examples:
22+23+* `node-gyp`
24+* `node-gyp-builder`
25+* `node-pre-gyp`
26+27+After you have identified the correct system, you need to override your package
28+expression while adding in build system as a build input. For example, `dat`
29+requires `node-gyp-build`, so we override its expression in `default-v6.nix`:
30+31+```nix
32+dat = nodePackages.dat.override (oldAttrs: {
33+ buildInputs = oldAttrs.buildInputs ++ [ nodePackages.node-gyp-build ];
34+});
35+```
36+37+To add a package from NPM to nixpkgs:
38+39+ 1. Modify `pkgs/development/node-packages/node-packages-v6.json` to add, update
40+ or remove package entries. (Or `pkgs/development/node-packages/node-packages-v4.json`
41+ for packages depending on Node.js 4.x)
42+ 2. Run the script: `(cd pkgs/development/node-packages && ./generate.sh)`.
43+ 3. Build your new package to test your changes:
44+ `cd /path/to/nixpkgs && nix-build -A nodePackages.<new-or-updated-package>`.
45+ To build against a specific Node.js version (e.g. 4.x):
46+ `nix-build -A nodePackages_4_x.<new-or-updated-package>`
47+ 4. Add and commit all modified and generated files.
48+49+For more information about the generation process, consult the
50+[README.md](https://github.com/svanderburg/node2nix) file of the `node2nix`
51+tool.
···1+R packages
2+==========
3+4+## Installation
5+6+Define an environment for R that contains all the libraries that you'd like to
7+use by adding the following snippet to your $HOME/.config/nixpkgs/config.nix file:
8+9+```nix
10+{
11+ packageOverrides = super: let self = super.pkgs; in
12+ {
13+14+ rEnv = super.rWrapper.override {
15+ packages = with self.rPackages; [
16+ devtools
17+ ggplot2
18+ reshape2
19+ yaml
20+ optparse
21+ ];
22+ };
23+ };
24+}
25+```
26+27+Then you can use `nix-env -f "<nixpkgs>" -iA rEnv` to install it into your user
28+profile. The set of available libraries can be discovered by running the
29+command `nix-env -f "<nixpkgs>" -qaP -A rPackages`. The first column from that
30+output is the name that has to be passed to rWrapper in the code snipped above.
31+32+However, if you'd like to add a file to your project source to make the
33+environment available for other contributors, you can create a `default.nix`
34+file like so:
35+```nix
36+let
37+ pkgs = import <nixpkgs> {};
38+ stdenv = pkgs.stdenv;
39+in with pkgs; {
40+ myProject = stdenv.mkDerivation {
41+ name = "myProject";
42+ version = "1";
43+ src = if pkgs.lib.inNixShell then null else nix;
44+45+ buildInputs = with rPackages; [
46+ R
47+ ggplot2
48+ knitr
49+ ];
50+ };
51+}
52+```
53+and then run `nix-shell .` to be dropped into a shell with those packages
54+available.
55+56+## RStudio
57+58+RStudio uses a standard set of packages and ignores any custom R
59+environments or installed packages you may have. To create a custom
60+environment, see `rstudioWrapper`, which functions similarly to
61+`rWrapper`:
62+63+```nix
64+{
65+ packageOverrides = super: let self = super.pkgs; in
66+ {
67+68+ rstudioEnv = super.rstudioWrapper.override {
69+ packages = with self.rPackages; [
70+ dplyr
71+ ggplot2
72+ reshape2
73+ ];
74+ };
75+ };
76+}
77+```
78+79+Then like above, `nix-env -f "<nixpkgs>" -iA rstudioEnv` will install
80+this into your user profile.
81+82+Alternatively, you can create a self-contained `shell.nix` without the need to
83+modify any configuration files:
84+85+```nix
86+{ pkgs ? import <nixpkgs> {}
87+}:
88+89+pkgs.rstudioWrapper.override {
90+ packages = with pkgs.rPackages; [ dplyr ggplot2 reshape2 ];
91+}
92+93+```
94+95+Executing `nix-shell` will then drop you into an environment equivalent to the
96+one above. If you need additional packages just add them to the list and
97+re-enter the shell.
98+99+## Updating the package set
100+101+```bash
102+nix-shell generate-shell.nix
103+104+Rscript generate-r-packages.R cran > cran-packages.nix.new
105+mv cran-packages.nix.new cran-packages.nix
106+107+Rscript generate-r-packages.R bioc > bioc-packages.nix.new
108+mv bioc-packages.nix.new bioc-packages.nix
109+```
110+111+`generate-r-packages.R <repo>` reads `<repo>-packages.nix`, therefor the renaming.
112+113+114+## Testing if the Nix-expression could be evaluated
115+116+```bash
117+nix-build test-evaluation.nix --dry-run
118+```
119+120+If this exits fine, the expression is ok. If not, you have to edit `default.nix`
···1-Idris packages
2-==============
3-4-This directory contains build rules for idris packages. In addition,
5-it contains several functions to build and compose those packages.
6-Everything is exposed to the user via the `idrisPackages` attribute.
7-8-callPackage
9-------------
10-11-This is like the normal nixpkgs callPackage function, specialized to
12-idris packages.
13-14-builtins
15----------
16-17-This is a list of all of the libraries that come packaged with Idris
18-itself.
19-20-build-idris-package
21---------------------
22-23-A function to build an idris package. Its sole argument is a set like
24-you might pass to `stdenv.mkDerivation`, except `build-idris-package`
25-sets several attributes for you. See `build-idris-package.nix` for
26-details.
27-28-build-builtin-package
29-----------------------
30-31-A version of `build-idris-package` specialized to builtin libraries.
32-Mostly for internal use.
33-34-with-packages
35--------------
36-37-Bundle idris together with a list of packages. Because idris currently
38-only supports a single directory in its library path, you must include
39-all desired libraries here, including `prelude` and `base`.
···1+Moved to [/doc/languages-frameworks/idris.section.md](/doc/languages-frameworks/idris.section.md)
00000000000000000000000000000000000000
+1-51
pkgs/development/node-packages/README.md
···1-Node.js packages
2-================
3-The `pkgs/development/node-packages` folder contains a generated collection of
4-[NPM packages](https://npmjs.com/) that can be installed with the Nix package
5-manager.
6-7-As a rule of thumb, the package set should only provide *end user* software
8-packages, such as command-line utilities. Libraries should only be added to the
9-package set if there is a non-NPM package that requires it.
10-11-When it is desired to use NPM libraries in a development project, use the
12-`node2nix` generator directly on the `package.json` configuration file of the
13-project.
14-15-The package set also provides support for multiple Node.js versions. The policy
16-is that a new package should be added to the collection for the latest stable LTS
17-release (which is currently 6.x), unless there is an explicit reason to support
18-a different release.
19-20-If your package uses native addons, you need to examine what kind of native
21-build system it uses. Here are some examples:
22-23-* `node-gyp`
24-* `node-gyp-builder`
25-* `node-pre-gyp`
26-27-After you have identified the correct system, you need to override your package
28-expression while adding in build system as a build input. For example, `dat`
29-requires `node-gyp-build`, so we override its expression in `default-v6.nix`:
30-31-```nix
32-dat = nodePackages.dat.override (oldAttrs: {
33- buildInputs = oldAttrs.buildInputs ++ [ nodePackages.node-gyp-build ];
34-});
35-```
36-37-To add a package from NPM to nixpkgs:
38-39- 1. Modify `pkgs/development/node-packages/node-packages-v6.json` to add, update
40- or remove package entries. (Or `pkgs/development/node-packages/node-packages-v4.json`
41- for packages depending on Node.js 4.x)
42- 2. Run the script: `(cd pkgs/development/node-packages && ./generate.sh)`.
43- 3. Build your new package to test your changes:
44- `cd /path/to/nixpkgs && nix-build -A nodePackages.<new-or-updated-package>`.
45- To build against a specific Node.js version (e.g. 4.x):
46- `nix-build -A nodePackages_4_x.<new-or-updated-package>`
47- 4. Add and commit all modified and generated files.
48-49-For more information about the generation process, consult the
50-[README.md](https://github.com/svanderburg/node2nix) file of the `node2nix`
51-tool.
···1+Moved to [/doc/languages-frameworks/node.section.md](/doc/languages-frameworks/node.section.md)
00000000000000000000000000000000000000000000000000
+1-120
pkgs/development/r-modules/README.md
···1-R packages
2-==========
3-4-## Installation
5-6-Define an environment for R that contains all the libraries that you'd like to
7-use by adding the following snippet to your $HOME/.config/nixpkgs/config.nix file:
8-9-```nix
10-{
11- packageOverrides = super: let self = super.pkgs; in
12- {
13-14- rEnv = super.rWrapper.override {
15- packages = with self.rPackages; [
16- devtools
17- ggplot2
18- reshape2
19- yaml
20- optparse
21- ];
22- };
23- };
24-}
25-```
26-27-Then you can use `nix-env -f "<nixpkgs>" -iA rEnv` to install it into your user
28-profile. The set of available libraries can be discovered by running the
29-command `nix-env -f "<nixpkgs>" -qaP -A rPackages`. The first column from that
30-output is the name that has to be passed to rWrapper in the code snipped above.
31-32-However, if you'd like to add a file to your project source to make the
33-environment available for other contributors, you can create a `default.nix`
34-file like so:
35-```nix
36-let
37- pkgs = import <nixpkgs> {};
38- stdenv = pkgs.stdenv;
39-in with pkgs; {
40- myProject = stdenv.mkDerivation {
41- name = "myProject";
42- version = "1";
43- src = if pkgs.lib.inNixShell then null else nix;
44-45- buildInputs = with rPackages; [
46- R
47- ggplot2
48- knitr
49- ];
50- };
51-}
52-```
53-and then run `nix-shell .` to be dropped into a shell with those packages
54-available.
55-56-## RStudio
57-58-RStudio uses a standard set of packages and ignores any custom R
59-environments or installed packages you may have. To create a custom
60-environment, see `rstudioWrapper`, which functions similarly to
61-`rWrapper`:
62-63-```nix
64-{
65- packageOverrides = super: let self = super.pkgs; in
66- {
67-68- rstudioEnv = super.rstudioWrapper.override {
69- packages = with self.rPackages; [
70- dplyr
71- ggplot2
72- reshape2
73- ];
74- };
75- };
76-}
77-```
78-79-Then like above, `nix-env -f "<nixpkgs>" -iA rstudioEnv` will install
80-this into your user profile.
81-82-Alternatively, you can create a self-contained `shell.nix` without the need to
83-modify any configuration files:
84-85-```nix
86-{ pkgs ? import <nixpkgs> {}
87-}:
88-89-pkgs.rstudioWrapper.override {
90- packages = with pkgs.rPackages; [ dplyr ggplot2 reshape2 ];
91-}
92-93-```
94-95-Executing `nix-shell` will then drop you into an environment equivalent to the
96-one above. If you need additional packages just add them to the list and
97-re-enter the shell.
98-99-## Updating the package set
100-101-```bash
102-nix-shell generate-shell.nix
103-104-Rscript generate-r-packages.R cran > cran-packages.nix.new
105-mv cran-packages.nix.new cran-packages.nix
106-107-Rscript generate-r-packages.R bioc > bioc-packages.nix.new
108-mv bioc-packages.nix.new bioc-packages.nix
109-```
110-111-`generate-r-packages.R <repo>` reads `<repo>-packages.nix`, therefor the renaming.
112-113-114-## Testing if the Nix-expression could be evaluated
115-116-```bash
117-nix-build test-evaluation.nix --dry-run
118-```
119-120-If this exits fine, the expression is ok. If not, you have to edit `default.nix`
···1+Moved to [/doc/languages-frameworks/r.section.md](/doc/languages-frameworks/r.section.md)
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000