···11+Idris packages
22+==============
33+44+This directory contains build rules for idris packages. In addition,
55+it contains several functions to build and compose those packages.
66+Everything is exposed to the user via the `idrisPackages` attribute.
77+88+callPackage
99+------------
1010+1111+This is like the normal nixpkgs callPackage function, specialized to
1212+idris packages.
1313+1414+builtins
1515+---------
1616+1717+This is a list of all of the libraries that come packaged with Idris
1818+itself.
1919+2020+build-idris-package
2121+--------------------
2222+2323+A function to build an idris package. Its sole argument is a set like
2424+you might pass to `stdenv.mkDerivation`, except `build-idris-package`
2525+sets several attributes for you. See `build-idris-package.nix` for
2626+details.
2727+2828+build-builtin-package
2929+----------------------
3030+3131+A version of `build-idris-package` specialized to builtin libraries.
3232+Mostly for internal use.
3333+3434+with-packages
3535+-------------
3636+3737+Bundle idris together with a list of packages. Because idris currently
3838+only supports a single directory in its library path, you must include
3939+all desired libraries here, including `prelude` and `base`.
···11+Node.js packages
22+================
33+The `pkgs/development/node-packages` folder contains a generated collection of
44+[NPM packages](https://npmjs.com/) that can be installed with the Nix package
55+manager.
66+77+As a rule of thumb, the package set should only provide *end user* software
88+packages, such as command-line utilities. Libraries should only be added to the
99+package set if there is a non-NPM package that requires it.
1010+1111+When it is desired to use NPM libraries in a development project, use the
1212+`node2nix` generator directly on the `package.json` configuration file of the
1313+project.
1414+1515+The package set also provides support for multiple Node.js versions. The policy
1616+is that a new package should be added to the collection for the latest stable LTS
1717+release (which is currently 6.x), unless there is an explicit reason to support
1818+a different release.
1919+2020+If your package uses native addons, you need to examine what kind of native
2121+build system it uses. Here are some examples:
2222+2323+* `node-gyp`
2424+* `node-gyp-builder`
2525+* `node-pre-gyp`
2626+2727+After you have identified the correct system, you need to override your package
2828+expression while adding in build system as a build input. For example, `dat`
2929+requires `node-gyp-build`, so we override its expression in `default-v6.nix`:
3030+3131+```nix
3232+dat = nodePackages.dat.override (oldAttrs: {
3333+ buildInputs = oldAttrs.buildInputs ++ [ nodePackages.node-gyp-build ];
3434+});
3535+```
3636+3737+To add a package from NPM to nixpkgs:
3838+3939+ 1. Modify `pkgs/development/node-packages/node-packages-v6.json` to add, update
4040+ or remove package entries. (Or `pkgs/development/node-packages/node-packages-v4.json`
4141+ for packages depending on Node.js 4.x)
4242+ 2. Run the script: `(cd pkgs/development/node-packages && ./generate.sh)`.
4343+ 3. Build your new package to test your changes:
4444+ `cd /path/to/nixpkgs && nix-build -A nodePackages.<new-or-updated-package>`.
4545+ To build against a specific Node.js version (e.g. 4.x):
4646+ `nix-build -A nodePackages_4_x.<new-or-updated-package>`
4747+ 4. Add and commit all modified and generated files.
4848+4949+For more information about the generation process, consult the
5050+[README.md](https://github.com/svanderburg/node2nix) file of the `node2nix`
5151+tool.
···11+R packages
22+==========
33+44+## Installation
55+66+Define an environment for R that contains all the libraries that you'd like to
77+use by adding the following snippet to your $HOME/.config/nixpkgs/config.nix file:
88+99+```nix
1010+{
1111+ packageOverrides = super: let self = super.pkgs; in
1212+ {
1313+1414+ rEnv = super.rWrapper.override {
1515+ packages = with self.rPackages; [
1616+ devtools
1717+ ggplot2
1818+ reshape2
1919+ yaml
2020+ optparse
2121+ ];
2222+ };
2323+ };
2424+}
2525+```
2626+2727+Then you can use `nix-env -f "<nixpkgs>" -iA rEnv` to install it into your user
2828+profile. The set of available libraries can be discovered by running the
2929+command `nix-env -f "<nixpkgs>" -qaP -A rPackages`. The first column from that
3030+output is the name that has to be passed to rWrapper in the code snipped above.
3131+3232+However, if you'd like to add a file to your project source to make the
3333+environment available for other contributors, you can create a `default.nix`
3434+file like so:
3535+```nix
3636+let
3737+ pkgs = import <nixpkgs> {};
3838+ stdenv = pkgs.stdenv;
3939+in with pkgs; {
4040+ myProject = stdenv.mkDerivation {
4141+ name = "myProject";
4242+ version = "1";
4343+ src = if pkgs.lib.inNixShell then null else nix;
4444+4545+ buildInputs = with rPackages; [
4646+ R
4747+ ggplot2
4848+ knitr
4949+ ];
5050+ };
5151+}
5252+```
5353+and then run `nix-shell .` to be dropped into a shell with those packages
5454+available.
5555+5656+## RStudio
5757+5858+RStudio uses a standard set of packages and ignores any custom R
5959+environments or installed packages you may have. To create a custom
6060+environment, see `rstudioWrapper`, which functions similarly to
6161+`rWrapper`:
6262+6363+```nix
6464+{
6565+ packageOverrides = super: let self = super.pkgs; in
6666+ {
6767+6868+ rstudioEnv = super.rstudioWrapper.override {
6969+ packages = with self.rPackages; [
7070+ dplyr
7171+ ggplot2
7272+ reshape2
7373+ ];
7474+ };
7575+ };
7676+}
7777+```
7878+7979+Then like above, `nix-env -f "<nixpkgs>" -iA rstudioEnv` will install
8080+this into your user profile.
8181+8282+Alternatively, you can create a self-contained `shell.nix` without the need to
8383+modify any configuration files:
8484+8585+```nix
8686+{ pkgs ? import <nixpkgs> {}
8787+}:
8888+8989+pkgs.rstudioWrapper.override {
9090+ packages = with pkgs.rPackages; [ dplyr ggplot2 reshape2 ];
9191+}
9292+9393+```
9494+9595+Executing `nix-shell` will then drop you into an environment equivalent to the
9696+one above. If you need additional packages just add them to the list and
9797+re-enter the shell.
9898+9999+## Updating the package set
100100+101101+```bash
102102+nix-shell generate-shell.nix
103103+104104+Rscript generate-r-packages.R cran > cran-packages.nix.new
105105+mv cran-packages.nix.new cran-packages.nix
106106+107107+Rscript generate-r-packages.R bioc > bioc-packages.nix.new
108108+mv bioc-packages.nix.new bioc-packages.nix
109109+```
110110+111111+`generate-r-packages.R <repo>` reads `<repo>-packages.nix`, therefor the renaming.
112112+113113+114114+## Testing if the Nix-expression could be evaluated
115115+116116+```bash
117117+nix-build test-evaluation.nix --dry-run
118118+```
119119+120120+If this exits fine, the expression is ok. If not, you have to edit `default.nix`
···11-Idris packages
22-==============
33-44-This directory contains build rules for idris packages. In addition,
55-it contains several functions to build and compose those packages.
66-Everything is exposed to the user via the `idrisPackages` attribute.
77-88-callPackage
99-------------
1010-1111-This is like the normal nixpkgs callPackage function, specialized to
1212-idris packages.
1313-1414-builtins
1515----------
1616-1717-This is a list of all of the libraries that come packaged with Idris
1818-itself.
1919-2020-build-idris-package
2121---------------------
2222-2323-A function to build an idris package. Its sole argument is a set like
2424-you might pass to `stdenv.mkDerivation`, except `build-idris-package`
2525-sets several attributes for you. See `build-idris-package.nix` for
2626-details.
2727-2828-build-builtin-package
2929-----------------------
3030-3131-A version of `build-idris-package` specialized to builtin libraries.
3232-Mostly for internal use.
3333-3434-with-packages
3535--------------
3636-3737-Bundle idris together with a list of packages. Because idris currently
3838-only supports a single directory in its library path, you must include
3939-all desired libraries here, including `prelude` and `base`.11+Moved to [/doc/languages-frameworks/idris.section.md](/doc/languages-frameworks/idris.section.md)
+1-51
pkgs/development/node-packages/README.md
···11-Node.js packages
22-================
33-The `pkgs/development/node-packages` folder contains a generated collection of
44-[NPM packages](https://npmjs.com/) that can be installed with the Nix package
55-manager.
66-77-As a rule of thumb, the package set should only provide *end user* software
88-packages, such as command-line utilities. Libraries should only be added to the
99-package set if there is a non-NPM package that requires it.
1010-1111-When it is desired to use NPM libraries in a development project, use the
1212-`node2nix` generator directly on the `package.json` configuration file of the
1313-project.
1414-1515-The package set also provides support for multiple Node.js versions. The policy
1616-is that a new package should be added to the collection for the latest stable LTS
1717-release (which is currently 6.x), unless there is an explicit reason to support
1818-a different release.
1919-2020-If your package uses native addons, you need to examine what kind of native
2121-build system it uses. Here are some examples:
2222-2323-* `node-gyp`
2424-* `node-gyp-builder`
2525-* `node-pre-gyp`
2626-2727-After you have identified the correct system, you need to override your package
2828-expression while adding in build system as a build input. For example, `dat`
2929-requires `node-gyp-build`, so we override its expression in `default-v6.nix`:
3030-3131-```nix
3232-dat = nodePackages.dat.override (oldAttrs: {
3333- buildInputs = oldAttrs.buildInputs ++ [ nodePackages.node-gyp-build ];
3434-});
3535-```
3636-3737-To add a package from NPM to nixpkgs:
3838-3939- 1. Modify `pkgs/development/node-packages/node-packages-v6.json` to add, update
4040- or remove package entries. (Or `pkgs/development/node-packages/node-packages-v4.json`
4141- for packages depending on Node.js 4.x)
4242- 2. Run the script: `(cd pkgs/development/node-packages && ./generate.sh)`.
4343- 3. Build your new package to test your changes:
4444- `cd /path/to/nixpkgs && nix-build -A nodePackages.<new-or-updated-package>`.
4545- To build against a specific Node.js version (e.g. 4.x):
4646- `nix-build -A nodePackages_4_x.<new-or-updated-package>`
4747- 4. Add and commit all modified and generated files.
4848-4949-For more information about the generation process, consult the
5050-[README.md](https://github.com/svanderburg/node2nix) file of the `node2nix`
5151-tool.
11+Moved to [/doc/languages-frameworks/node.section.md](/doc/languages-frameworks/node.section.md)
+1-120
pkgs/development/r-modules/README.md
···11-R packages
22-==========
33-44-## Installation
55-66-Define an environment for R that contains all the libraries that you'd like to
77-use by adding the following snippet to your $HOME/.config/nixpkgs/config.nix file:
88-99-```nix
1010-{
1111- packageOverrides = super: let self = super.pkgs; in
1212- {
1313-1414- rEnv = super.rWrapper.override {
1515- packages = with self.rPackages; [
1616- devtools
1717- ggplot2
1818- reshape2
1919- yaml
2020- optparse
2121- ];
2222- };
2323- };
2424-}
2525-```
2626-2727-Then you can use `nix-env -f "<nixpkgs>" -iA rEnv` to install it into your user
2828-profile. The set of available libraries can be discovered by running the
2929-command `nix-env -f "<nixpkgs>" -qaP -A rPackages`. The first column from that
3030-output is the name that has to be passed to rWrapper in the code snipped above.
3131-3232-However, if you'd like to add a file to your project source to make the
3333-environment available for other contributors, you can create a `default.nix`
3434-file like so:
3535-```nix
3636-let
3737- pkgs = import <nixpkgs> {};
3838- stdenv = pkgs.stdenv;
3939-in with pkgs; {
4040- myProject = stdenv.mkDerivation {
4141- name = "myProject";
4242- version = "1";
4343- src = if pkgs.lib.inNixShell then null else nix;
4444-4545- buildInputs = with rPackages; [
4646- R
4747- ggplot2
4848- knitr
4949- ];
5050- };
5151-}
5252-```
5353-and then run `nix-shell .` to be dropped into a shell with those packages
5454-available.
5555-5656-## RStudio
5757-5858-RStudio uses a standard set of packages and ignores any custom R
5959-environments or installed packages you may have. To create a custom
6060-environment, see `rstudioWrapper`, which functions similarly to
6161-`rWrapper`:
6262-6363-```nix
6464-{
6565- packageOverrides = super: let self = super.pkgs; in
6666- {
6767-6868- rstudioEnv = super.rstudioWrapper.override {
6969- packages = with self.rPackages; [
7070- dplyr
7171- ggplot2
7272- reshape2
7373- ];
7474- };
7575- };
7676-}
7777-```
7878-7979-Then like above, `nix-env -f "<nixpkgs>" -iA rstudioEnv` will install
8080-this into your user profile.
8181-8282-Alternatively, you can create a self-contained `shell.nix` without the need to
8383-modify any configuration files:
8484-8585-```nix
8686-{ pkgs ? import <nixpkgs> {}
8787-}:
8888-8989-pkgs.rstudioWrapper.override {
9090- packages = with pkgs.rPackages; [ dplyr ggplot2 reshape2 ];
9191-}
9292-9393-```
9494-9595-Executing `nix-shell` will then drop you into an environment equivalent to the
9696-one above. If you need additional packages just add them to the list and
9797-re-enter the shell.
9898-9999-## Updating the package set
100100-101101-```bash
102102-nix-shell generate-shell.nix
103103-104104-Rscript generate-r-packages.R cran > cran-packages.nix.new
105105-mv cran-packages.nix.new cran-packages.nix
106106-107107-Rscript generate-r-packages.R bioc > bioc-packages.nix.new
108108-mv bioc-packages.nix.new bioc-packages.nix
109109-```
110110-111111-`generate-r-packages.R <repo>` reads `<repo>-packages.nix`, therefor the renaming.
112112-113113-114114-## Testing if the Nix-expression could be evaluated
115115-116116-```bash
117117-nix-build test-evaluation.nix --dry-run
118118-```
119119-120120-If this exits fine, the expression is ok. If not, you have to edit `default.nix`
11+Moved to [/doc/languages-frameworks/r.section.md](/doc/languages-frameworks/r.section.md)