diff options
author | AndersonTorres <torres.anderson.85@protonmail.com> | 2022-02-26 21:04:25 -0300 |
---|---|---|
committer | AndersonTorres <torres.anderson.85@protonmail.com> | 2022-02-26 21:04:25 -0300 |
commit | ed2b1b4b909538716abb6378971ba75fae65b7d2 (patch) | |
tree | 25c9f8f505f3ad7d3955c556a50ef6c111e7c369 /doc | |
parent | f68dbdc7c39faa5f685e34b10da0b373ad6a7c22 (diff) | |
parent | 2970b27faf15840714feba50186e7e02d945569f (diff) | |
download | nixpkgs-ed2b1b4b909538716abb6378971ba75fae65b7d2.tar nixpkgs-ed2b1b4b909538716abb6378971ba75fae65b7d2.tar.gz nixpkgs-ed2b1b4b909538716abb6378971ba75fae65b7d2.tar.bz2 nixpkgs-ed2b1b4b909538716abb6378971ba75fae65b7d2.tar.lz nixpkgs-ed2b1b4b909538716abb6378971ba75fae65b7d2.tar.xz nixpkgs-ed2b1b4b909538716abb6378971ba75fae65b7d2.tar.zst nixpkgs-ed2b1b4b909538716abb6378971ba75fae65b7d2.zip |
Merge branch 'master' into staging-next
Diffstat (limited to 'doc')
-rw-r--r-- | doc/contributing/submitting-changes.chapter.md | 2 | ||||
-rw-r--r-- | doc/languages-frameworks/coq.section.md | 3 | ||||
-rw-r--r-- | doc/languages-frameworks/python.section.md | 25 | ||||
-rw-r--r-- | doc/languages-frameworks/vim.section.md | 8 |
4 files changed, 32 insertions, 6 deletions
diff --git a/doc/contributing/submitting-changes.chapter.md b/doc/contributing/submitting-changes.chapter.md index d5b5f5a6017..109d051c016 100644 --- a/doc/contributing/submitting-changes.chapter.md +++ b/doc/contributing/submitting-changes.chapter.md @@ -98,7 +98,7 @@ We use jbidwatcher as an example for a discontinued project here. 1. Create a new branch for your change, e.g. `git checkout -b jbidwatcher` 1. Remove the actual package including its directory, e.g. `rm -rf pkgs/applications/misc/jbidwatcher` 1. Remove the package from the list of all packages (`pkgs/top-level/all-packages.nix`). -1. Add an alias for the package name in `pkgs/top-level/aliases.nix` (There is also `pkgs/misc/vim-plugins/aliases.nix`. Package sets typically do not have aliases, so we can't add them there.) +1. Add an alias for the package name in `pkgs/top-level/aliases.nix` (There is also `pkgs/applications/editors/vim/plugins/aliases.nix`. Package sets typically do not have aliases, so we can't add them there.) For example in this case: diff --git a/doc/languages-frameworks/coq.section.md b/doc/languages-frameworks/coq.section.md index a5155aedaf5..9a692104a04 100644 --- a/doc/languages-frameworks/coq.section.md +++ b/doc/languages-frameworks/coq.section.md @@ -29,7 +29,8 @@ The recommended way of defining a derivation for a Coq library, is to use the `c * `releaseRev` (optional, defaults to `(v: v)`), provides a default mapping from release names to revision hashes/branch names/tags, * `displayVersion` (optional), provides a way to alter the computation of `name` from `pname`, by explaining how to display version numbers, * `namePrefix` (optional, defaults to `[ "coq" ]`), provides a way to alter the computation of `name` from `pname`, by explaining which dependencies must occur in `name`, -* `extraBuildInputs` (optional), by default `buildInputs` just contains `coq`, this allows to add more build inputs, +* `extraNativeBuildInputs` (optional), by default `nativeBuildInputs` just contains `coq`, this allows to add more native build inputs, `nativeBuildInputs` are executables and `buildInputs` are libraries and dependencies, +* `extraBuildInputs` (optional), this allows to add more build inputs, * `mlPlugin` (optional, defaults to `false`). Some extensions (plugins) might require OCaml and sometimes other OCaml packages. Standard dependencies can be added by setting the current option to `true`. For a finer grain control, the `coq.ocamlPackages` attribute can be used in `extraBuildInputs` to depend on the same package set Coq was built against. * `useDune2ifVersion` (optional, default to `(x: false)` uses Dune2 to build the package if the provided predicate evaluates to true on the version, e.g. `useDune2if = versions.isGe "1.1"` will use dune if the version of the package is greater or equal to `"1.1"`, * `useDune2` (optional, defaults to `false`) uses Dune2 to build the package if set to true, the presence of this attribute overrides the behavior of the previous one. diff --git a/doc/languages-frameworks/python.section.md b/doc/languages-frameworks/python.section.md index 9f9ace513c3..693ea016e0a 100644 --- a/doc/languages-frameworks/python.section.md +++ b/doc/languages-frameworks/python.section.md @@ -979,6 +979,31 @@ with import <nixpkgs> {}; in python.withPackages(ps: [ps.blaze])).env ``` +#### Optional extra dependencies + +Some packages define optional dependencies for additional features. With +`setuptools` this is called `extras_require` and `flit` calls it `extras-require`. A +method for supporting this is by declaring the extras of a package in its +`passthru`, e.g. in case of the package `dask` + +```nix +passthru.extras-require = { + complete = [ distributed ]; +}; +``` + +and letting the package requiring the extra add the list to its dependencies + +```nix +propagatedBuildInputs = [ + ... +] ++ dask.extras-require.complete; +``` + +Note this method is preferred over adding parameters to builders, as that can +result in packages depending on different variants and thereby causing +collisions. + #### `buildPythonApplication` function {#buildpythonapplication-function} The `buildPythonApplication` function is practically the same as diff --git a/doc/languages-frameworks/vim.section.md b/doc/languages-frameworks/vim.section.md index 4ffd6736e23..a615d585b15 100644 --- a/doc/languages-frameworks/vim.section.md +++ b/doc/languages-frameworks/vim.section.md @@ -309,9 +309,9 @@ Sample output2: ## Adding new plugins to nixpkgs {#adding-new-plugins-to-nixpkgs} -Nix expressions for Vim plugins are stored in [pkgs/misc/vim-plugins](https://github.com/NixOS/nixpkgs/tree/master/pkgs/misc/vim-plugins). For the vast majority of plugins, Nix expressions are automatically generated by running [`./update.py`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/misc/vim-plugins/update.py). This creates a [generated.nix](https://github.com/NixOS/nixpkgs/blob/master/pkgs/misc/vim-plugins/generated.nix) file based on the plugins listed in [vim-plugin-names](https://github.com/NixOS/nixpkgs/blob/master/pkgs/misc/vim-plugins/vim-plugin-names). Plugins are listed in alphabetical order in `vim-plugin-names` using the format `[github username]/[repository]@[gitref]`. For example https://github.com/scrooloose/nerdtree becomes `scrooloose/nerdtree`. +Nix expressions for Vim plugins are stored in [pkgs/applications/editors/vim/plugins](https://github.com/NixOS/nixpkgs/tree/master/pkgs/applications/editors/vim/plugins). For the vast majority of plugins, Nix expressions are automatically generated by running [`./update.py`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/vim/plugins/update.py). This creates a [generated.nix](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/vim/plugins/generated.nix) file based on the plugins listed in [vim-plugin-names](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/vim/plugins/vim-plugin-names). Plugins are listed in alphabetical order in `vim-plugin-names` using the format `[github username]/[repository]@[gitref]`. For example https://github.com/scrooloose/nerdtree becomes `scrooloose/nerdtree`. -Some plugins require overrides in order to function properly. Overrides are placed in [overrides.nix](https://github.com/NixOS/nixpkgs/blob/master/pkgs/misc/vim-plugins/overrides.nix). Overrides are most often required when a plugin requires some dependencies, or extra steps are required during the build process. For example `deoplete-fish` requires both `deoplete-nvim` and `vim-fish`, and so the following override was added: +Some plugins require overrides in order to function properly. Overrides are placed in [overrides.nix](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/vim/plugins/overrides.nix). Overrides are most often required when a plugin requires some dependencies, or extra steps are required during the build process. For example `deoplete-fish` requires both `deoplete-nvim` and `vim-fish`, and so the following override was added: ```nix deoplete-fish = super.deoplete-fish.overrideAttrs(old: { @@ -330,13 +330,13 @@ Finally, there are some plugins that are also packaged in nodePackages because t Run the update script with a GitHub API token that has at least `public_repo` access. Running the script without the token is likely to result in rate-limiting (429 errors). For steps on creating an API token, please refer to [GitHub's token documentation](https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token). ```sh -GITHUB_API_TOKEN=my_token ./pkgs/misc/vim-plugins/update.py +GITHUB_API_TOKEN=my_token ./pkgs/applications/editors/vim/plugins/update.py ``` Alternatively, set the number of processes to a lower count to avoid rate-limiting. ```sh -./pkgs/misc/vim-plugins/update.py --proc 1 +./pkgs/applications/editors/vim/plugins/update.py --proc 1 ``` ## Important repositories {#important-repositories} |