about summary refs log tree commit diff
path: root/nixpkgs/doc
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2023-11-19 16:49:21 +0100
committerAlyssa Ross <hi@alyssa.is>2023-11-19 16:51:12 +0100
commitb9c0b3f126472b144c543d8d77a8047e8d905ada (patch)
tree2ad99b8789bcb62b993ed18d2877905f7f02bdac /nixpkgs/doc
parent67419f0e56f99b0ebbe14574d3492110ac84c8d6 (diff)
parentc757e9bd77b16ca2e03c89bf8bc9ecb28e0c06ad (diff)
downloadnixlib-b9c0b3f126472b144c543d8d77a8047e8d905ada.tar
nixlib-b9c0b3f126472b144c543d8d77a8047e8d905ada.tar.gz
nixlib-b9c0b3f126472b144c543d8d77a8047e8d905ada.tar.bz2
nixlib-b9c0b3f126472b144c543d8d77a8047e8d905ada.tar.lz
nixlib-b9c0b3f126472b144c543d8d77a8047e8d905ada.tar.xz
nixlib-b9c0b3f126472b144c543d8d77a8047e8d905ada.tar.zst
nixlib-b9c0b3f126472b144c543d8d77a8047e8d905ada.zip
Merge branch 'nixos-unstable' of https://github.com/NixOS/nixpkgs into HEAD
Conflicts:
	nixpkgs/pkgs/build-support/rust/build-rust-package/default.nix
	nixpkgs/pkgs/top-level/perl-packages.nix
Diffstat (limited to 'nixpkgs/doc')
-rw-r--r--nixpkgs/doc/hooks/meson.section.md82
-rw-r--r--nixpkgs/doc/hooks/ninja.section.md2
-rw-r--r--nixpkgs/doc/languages-frameworks/dotnet.section.md4
-rw-r--r--nixpkgs/doc/languages-frameworks/javascript.section.md1
4 files changed, 76 insertions, 13 deletions
diff --git a/nixpkgs/doc/hooks/meson.section.md b/nixpkgs/doc/hooks/meson.section.md
index fd7779e6468f..3a7fb5032082 100644
--- a/nixpkgs/doc/hooks/meson.section.md
+++ b/nixpkgs/doc/hooks/meson.section.md
@@ -1,25 +1,83 @@
 # Meson {#meson}
 
-Overrides the configure phase to run meson to generate Ninja files. To run these files, you should accompany Meson with ninja. By default, `enableParallelBuilding` is enabled as Meson supports parallel building almost everywhere.
+[Meson](https://mesonbuild.com/) is an open source meta build system meant to be
+fast and user-friendly.
 
-## Variables controlling Meson {#variables-controlling-meson}
+In Nixpkgs, meson comes with a setup hook that overrides the configure, check,
+and install phases.
 
-### `mesonFlags` {#mesonflags}
+Being a meta build system, meson needs an accompanying backend. In the context
+of Nixpkgs, the typical companion backend is [Ninja](#ninja), that provides a
+setup hook registering ninja-based build and install phases.
 
-Controls the flags passed to meson.
+## Variables controlling Meson {#meson-variables-controlling}
 
-### `mesonBuildType` {#mesonbuildtype}
+### Meson Exclusive Variables {#meson-exclusive-variables}
 
-Which [`--buildtype`](https://mesonbuild.com/Builtin-options.html#core-options) to pass to Meson. We default to `plain`.
+#### `mesonFlags` {#meson-flags}
 
-### `mesonAutoFeatures` {#mesonautofeatures}
+Controls the flags passed to `meson setup` during configure phase.
 
-What value to set [`-Dauto_features=`](https://mesonbuild.com/Builtin-options.html#core-options) to. We default to `enabled`.
+#### `mesonWrapMode` {#meson-wrap-mode}
 
-### `mesonWrapMode` {#mesonwrapmode}
+Which value is passed as
+[`-Dwrap_mode=`](https://mesonbuild.com/Builtin-options.html#core-options)
+to. In Nixpkgs the default value is `nodownload`, so that no subproject will be
+downloaded (since network access is already disabled during deployment in
+Nixpkgs).
 
-What value to set [`-Dwrap_mode=`](https://mesonbuild.com/Builtin-options.html#core-options) to. We default to `nodownload` as we disallow network access.
+Note: Meson allows pre-population of subprojects that would otherwise be
+downloaded.
 
-### `dontUseMesonConfigure` {#dontusemesonconfigure}
+#### `mesonBuildType` {#meson-build-type}
 
-Disables using Meson’s `configurePhase`.
+Which value is passed as
+[`--buildtype`](https://mesonbuild.com/Builtin-options.html#core-options) to
+`meson setup` during configure phase. In Nixpkgs the default value is `plain`.
+
+#### `mesonAutoFeatures` {#meson-auto-features}
+
+Which value is passed as
+[`-Dauto_features=`](https://mesonbuild.com/Builtin-options.html#core-options)
+to `meson setup` during configure phase. In Nixpkgs the default value is
+`enabled`, meaning that every feature declared as "auto" by the meson scripts
+will be enabled.
+
+#### `mesonCheckFlags` {#meson-check-flags}
+
+Controls the flags passed to `meson test` during check phase.
+
+#### `mesonInstallFlags` {#meson-install-flags}
+
+Controls the flags passed to `meson install` during install phase.
+
+#### `mesonInstallTags` {#meson-install-tags}
+
+A list of installation tags passed to Meson's commandline option
+[`--tags`](https://mesonbuild.com/Installing.html#installation-tags) during
+install phase.
+
+Note: `mesonInstallTags` should be a list of strings, that will be converted to
+a comma-separated string that is recognized to `--tags`.
+Example: `mesonInstallTags = [ "emulator" "assembler" ];` will be converted to
+`--tags emulator,assembler`.
+
+#### `dontUseMesonConfigure` {#dont-use-meson-configure}
+
+When set to true, don't use the predefined `mesonConfigurePhase`.
+
+#### `dontUseMesonCheck` {#dont-use-meson-check}
+
+When set to true, don't use the predefined `mesonCheckPhase`.
+
+#### `dontUseMesonInstall` {#dont-use-meson-install}
+
+When set to true, don't use the predefined `mesonInstallPhase`.
+
+### Honored variables {#meson-honored-variables}
+
+The following variables commonly used by `stdenv.mkDerivation` are honored by
+Meson setup hook.
+
+- `prefixKey`
+- `enableParallelBuilding`
diff --git a/nixpkgs/doc/hooks/ninja.section.md b/nixpkgs/doc/hooks/ninja.section.md
index 4b0e33feb5c3..bbc948108804 100644
--- a/nixpkgs/doc/hooks/ninja.section.md
+++ b/nixpkgs/doc/hooks/ninja.section.md
@@ -1,3 +1,5 @@
 # ninja {#ninja}
 
 Overrides the build, install, and check phase to run ninja instead of make. You can disable this behavior with the `dontUseNinjaBuild`, `dontUseNinjaInstall`, and `dontUseNinjaCheck`, respectively. Parallel building is enabled by default in Ninja.
+
+Note that if the [Meson setup hook](#meson) is also active, Ninja's install and check phases will be disabled in favor of Meson's.
diff --git a/nixpkgs/doc/languages-frameworks/dotnet.section.md b/nixpkgs/doc/languages-frameworks/dotnet.section.md
index 9ba0fef2a27b..978ec07cb961 100644
--- a/nixpkgs/doc/languages-frameworks/dotnet.section.md
+++ b/nixpkgs/doc/languages-frameworks/dotnet.section.md
@@ -138,7 +138,9 @@ in buildDotnetModule rec {
   src = ./.;
 
   projectFile = "src/project.sln";
-  nugetDeps = ./deps.nix; # File generated with `nix-build -A package.passthru.fetch-deps`.
+  # File generated with `nix-build -A package.passthru.fetch-deps`.
+  # To run fetch-deps when this file does not yet exist, set nugetDeps to null
+  nugetDeps = ./deps.nix;
 
   projectReferences = [ referencedProject ]; # `referencedProject` must contain `nupkg` in the folder structure.
 
diff --git a/nixpkgs/doc/languages-frameworks/javascript.section.md b/nixpkgs/doc/languages-frameworks/javascript.section.md
index 0bb9959a5105..152974b465a5 100644
--- a/nixpkgs/doc/languages-frameworks/javascript.section.md
+++ b/nixpkgs/doc/languages-frameworks/javascript.section.md
@@ -210,6 +210,7 @@ In the default `installPhase` set by `buildNpmPackage`, it uses `npm pack --json
 * `npmPruneFlags`: Flags to pass to `npm prune`. Defaults to the value of `npmInstallFlags`.
 * `makeWrapperArgs`: Flags to pass to `makeWrapper`, added to executable calling the generated `.js` with `node` as an interpreter. These scripts are defined in `package.json`.
 * `nodejs`: The `nodejs` package to build against, using the corresponding `npm` shipped with that version of `node`. Defaults to `pkgs.nodejs`.
+* `npmDeps`: The dependencies used to build the npm package. Especially useful to not have to recompute workspace depedencies.
 
 #### prefetch-npm-deps {#javascript-buildNpmPackage-prefetch-npm-deps}