diff options
author | Alyssa Ross <hi@alyssa.is> | 2022-03-30 13:30:47 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2022-03-31 10:13:20 +0000 |
commit | f2e61678de300336b3666afd19af7565efb0c4cf (patch) | |
tree | 49f6906c9d557f7fdd58257ff85ec17fc4495f31 /nixpkgs/doc/languages-frameworks | |
parent | f920d5e07c29a9aa1b77d9b88bd604cf1a1f3664 (diff) | |
parent | 00e27c78d3d2de6964096ceee8d70e5b487365e3 (diff) | |
download | nixlib-f2e61678de300336b3666afd19af7565efb0c4cf.tar nixlib-f2e61678de300336b3666afd19af7565efb0c4cf.tar.gz nixlib-f2e61678de300336b3666afd19af7565efb0c4cf.tar.bz2 nixlib-f2e61678de300336b3666afd19af7565efb0c4cf.tar.lz nixlib-f2e61678de300336b3666afd19af7565efb0c4cf.tar.xz nixlib-f2e61678de300336b3666afd19af7565efb0c4cf.tar.zst nixlib-f2e61678de300336b3666afd19af7565efb0c4cf.zip |
Merge commit '00e27c78d3d2de6964096ceee8d70e5b487365e3'
Conflicts: nixpkgs/nixos/modules/system/boot/systemd.nix nixpkgs/pkgs/applications/networking/browsers/firefox/common.nix nixpkgs/pkgs/applications/version-management/git-and-tools/cgit/common.nix nixpkgs/pkgs/applications/version-management/git-and-tools/cgit/default.nix nixpkgs/pkgs/applications/version-management/git-and-tools/cgit/pink.nix nixpkgs/pkgs/top-level/all-packages.nix
Diffstat (limited to 'nixpkgs/doc/languages-frameworks')
4 files changed, 37 insertions, 8 deletions
diff --git a/nixpkgs/doc/languages-frameworks/javascript.section.md b/nixpkgs/doc/languages-frameworks/javascript.section.md index bf5742d6855e..817317804923 100644 --- a/nixpkgs/doc/languages-frameworks/javascript.section.md +++ b/nixpkgs/doc/languages-frameworks/javascript.section.md @@ -85,7 +85,7 @@ you will still need to commit the modified version of the lock files, but at lea each tool has an abstraction to just build the node_modules (dependencies) directory. you can always use the stdenv.mkDerivation with the node_modules to build the package (symlink the node_modules directory and then use the package build command). the node_modules abstraction can be also used to build some web framework frontends. For an example of this see how [plausible](https://github.com/NixOS/nixpkgs/blob/master/pkgs/servers/web-apps/plausible/default.nix) is built. mkYarnModules to make the derivation containing node_modules. Then when building the frontend you can just symlink the node_modules directory -## javascript packages inside nixpkgs {#javascript-packages-nixpkgs} +## Javascript packages inside nixpkgs {#javascript-packages-nixpkgs} The `pkgs/development/node-packages` folder contains a generated collection of [NPM packages](https://npmjs.com/) that can be installed with the Nix package @@ -121,12 +121,14 @@ requires `node-gyp-build`, so [we override](https://github.com/NixOS/nixpkgs/blo }; ``` +### Adding and Updating Javascript packages in nixpkgs + To add a package from NPM to nixpkgs: 1. Modify `pkgs/development/node-packages/node-packages.json` to add, update or remove package entries to have it included in `nodePackages` and `nodePackages_latest`. -2. Run the script: `cd pkgs/development/node-packages && ./generate.sh`. +2. Run the script: `./pkgs/development/node-packages/generate.sh`. 3. Build your new package to test your changes: `cd /path/to/nixpkgs && nix-build -A nodePackages.<new-or-updated-package>`. To build against the latest stable Current Node.js version (e.g. 14.x): @@ -137,6 +139,26 @@ For more information about the generation process, consult the [README.md](https://github.com/svanderburg/node2nix) file of the `node2nix` tool. +To update NPM packages in nixpkgs, run the same `generate.sh` script: + +```sh +./pkgs/development/node-packages/generate.sh +``` + +#### Git protocol error + +Some packages may have Git dependencies from GitHub specified with `git://`. +GitHub has +[disabled unecrypted Git connections](https://github.blog/2021-09-01-improving-git-protocol-security-github/#no-more-unauthenticated-git), +so you may see the following error when running the generate script: +`The unauthenticated git protocol on port 9418 is no longer supported`. + +Use the following Git configuration to resolve the issue: + +```sh +git config --global url."https://github.com/".insteadOf git://github.com/ +``` + ## Tool specific instructions {#javascript-tool-specific} ### node2nix {#javascript-node2nix} diff --git a/nixpkgs/doc/languages-frameworks/ocaml.section.md b/nixpkgs/doc/languages-frameworks/ocaml.section.md index e4813d7dd2d4..c6e40eaa20d0 100644 --- a/nixpkgs/doc/languages-frameworks/ocaml.section.md +++ b/nixpkgs/doc/languages-frameworks/ocaml.section.md @@ -38,8 +38,12 @@ Here is a simple package example. - It uses the `fetchFromGitHub` fetcher to get its source. -- `useDune2 = true` ensures that Dune version 2 is used for the - build (this is the default; set to `false` to use Dune version 1). +- `duneVersion = "2"` ensures that Dune version 2 is used for the + build (this is the default; valid values are `"1"`, `"2"`, and `"3"`); + note that there is also a legacy `useDune2` boolean attribute: + set to `false` it corresponds to `duneVersion = "1"`; set to `true` it + corresponds to `duneVersion = "2"`. If both arguments (`duneVersion` and + `useDune2`) are given, the second one (`useDune2`) is silently ignored. - It sets the optional `doCheck` attribute such that tests will be run with `dune runtest -p angstrom` after the build (`dune build -p angstrom`) is @@ -67,7 +71,7 @@ Here is a simple package example. buildDunePackage rec { pname = "angstrom"; version = "0.15.0"; - useDune2 = true; + duneVersion = "2"; minimalOCamlVersion = "4.04"; diff --git a/nixpkgs/doc/languages-frameworks/texlive.section.md b/nixpkgs/doc/languages-frameworks/texlive.section.md index 6b505cefcc95..060f5c647c29 100644 --- a/nixpkgs/doc/languages-frameworks/texlive.section.md +++ b/nixpkgs/doc/languages-frameworks/texlive.section.md @@ -6,7 +6,7 @@ Since release 15.09 there is a new TeX Live packaging that lives entirely under - For basic usage just pull `texlive.combined.scheme-basic` for an environment with basic LaTeX support. -- It typically won't work to use separately installed packages together. Instead, you can build a custom set of packages like this: +- It typically won't work to use separately installed packages together. Instead, you can build a custom set of packages like this. Most CTAN packages should be available: ```nix texlive.combine { diff --git a/nixpkgs/doc/languages-frameworks/vim.section.md b/nixpkgs/doc/languages-frameworks/vim.section.md index a615d585b151..563fdf45a861 100644 --- a/nixpkgs/doc/languages-frameworks/vim.section.md +++ b/nixpkgs/doc/languages-frameworks/vim.section.md @@ -18,7 +18,7 @@ Adding custom .vimrc lines can be done using the following code: ```nix vim_configurable.customize { - # `name` specifies the name of the executable and package + # `name` optionally specifies the name of the executable and package name = "vim-with-plugins"; vimrcConfig.customRC = '' @@ -28,6 +28,9 @@ vim_configurable.customize { ``` This configuration is used when Vim is invoked with the command specified as name, in this case `vim-with-plugins`. +You can also omit `name` to customize Vim itself. See the +[definition of `vimUtils.makeCustomizable`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/vim/plugins/vim-utils.nix#L408) +for all supported options. For Neovim the `configure` argument can be overridden to achieve the same: @@ -286,7 +289,7 @@ Sample output1: "reload" = buildVimPluginFrom2Nix { # created by nix#NixDerivation name = "reload"; src = fetchgit { - url = "git://github.com/xolox/vim-reload"; + url = "https://github.com/xolox/vim-reload"; rev = "0a601a668727f5b675cb1ddc19f6861f3f7ab9e1"; sha256 = "0vb832l9yxj919f5hfg6qj6bn9ni57gnjd3bj7zpq7d4iv2s4wdh"; }; |