+1
-1
doc/builders/fetchers.chapter.md
+1
-1
doc/builders/fetchers.chapter.md
···Building software with Nix often requires downloading source code and other files from the internet.`nixpkgs` provides *fetchers* for different protocols and services. Fetchers are functions that simplify downloading files.Fetchers create [fixed output derivations](https://nixos.org/manual/nix/stable/#fixed-output-drvs) from downloaded files.
+1
-1
doc/builders/images/binarycache.section.md
+1
-1
doc/builders/images/binarycache.section.md
···Note that this function is meant for advanced use-cases. The more idiomatic way to work with flat-file binary caches is via the [nix-copy-closure](https://nixos.org/manual/nix/stable/command-ref/nix-copy-closure.html) command. You may also want to consider [dockerTools](#sec-pkgs-dockerTools) for your containerization needs.The following derivation will construct a flat-file binary cache containing the closure of `hello`.
+2
-2
doc/builders/images/dockertools.section.md
+2
-2
doc/builders/images/dockertools.section.md
···The behavior doesn't match `nix-shell` or `nix-build` exactly and this function is known not to work correctly for e.g. fixed-output derivations, content-addressed derivations, impure derivations and other special types of derivations.···The following shows how to build the `pkgs.hello` package inside a Docker container built with `buildNixShellImage`.
+5
-5
doc/builders/images/makediskimage.section.md
+5
-5
doc/builders/images/makediskimage.section.md
···NixOS tests also use this function when preparing the VM. The `cptofs` method is used when `virtualisation.useBootLoader` is false (the default). Otherwise the second method is used.For reference, read the function signature source code for documentation on arguments: <https://github.com/NixOS/nixpkgs/blob/master/nixos/lib/make-disk-image.nix>.Features are separated in various sections depending on if you opt for a Nix-store only image or a full NixOS image.- automatic or bound disk size: `diskSize` parameter, `additionalSpace` can be set when `diskSize` is `auto` to add a constant of disk space···- the current nixpkgs can be realized as a channel in the disk image, which will change the hash of the image when the sources are updated···Images are **NOT** deterministic, please do not hesitate to try to fix this, source of determinisms are (not exhaustive) :···
+2
-2
doc/builders/special/makesetuphook.section.md
+2
-2
doc/builders/special/makesetuphook.section.md
···-#### setup hook that depends on the hello package and runs hello and @shell@ is substituted with path to bash+#### setup hook that depends on the hello package and runs hello and @shell@ is substituted with path to bash {#sec-pkgs.makeSetupHook-usage-example}···
+2
-2
doc/builders/special/mkshell.section.md
+2
-2
doc/builders/special/mkshell.section.md
······
+2
-2
doc/builders/testers.chapter.md
+2
-2
doc/builders/testers.chapter.md
···A [NixOS VM test network](https://nixos.org/nixos/manual/index.html#sec-nixos-tests), or path to it. Example:···
+1
-1
doc/contributing/submitting-changes.chapter.md
+1
-1
doc/contributing/submitting-changes.chapter.md
···The stable branch does have some changes which cannot be backported. Most notable are breaking changes. The desire is to have stable users be uninterrupted when updating packages.
+1
-1
doc/languages-frameworks/agda.section.md
+1
-1
doc/languages-frameworks/agda.section.md
···
+2
-2
doc/languages-frameworks/beam.section.md
+2
-2
doc/languages-frameworks/beam.section.md
···If you need to use an overlay to change some attributes of a derivation, e.g. if you need a bugfix from a version that is not yet available in nixpkgs, you can override attributes such as `version` (and the corresponding `hash`) and then use this overlay in your development environment:
+3
-3
doc/languages-frameworks/chicken.section.md
+3
-3
doc/languages-frameworks/chicken.section.md
·········
+2
-2
doc/languages-frameworks/cuelang.section.md
+2
-2
doc/languages-frameworks/cuelang.section.md
······Nixpkgs provides a `pkgs.writeCueValidator` helper, which will write a validation script based on the provided Cuelang schema.
+10
-10
doc/languages-frameworks/haskell.section.md
+10
-10
doc/languages-frameworks/haskell.section.md
······························+### Why is topic X not covered in this section? Why is section Y missing? {#haskell-why-not-covered}
+6
-6
doc/languages-frameworks/javascript.section.md
+6
-6
doc/languages-frameworks/javascript.section.md
···The various tools available will be listed in the [tools-overview](#javascript-tools-overview). Some general principles for packaging will follow. Finally some tool specific instructions will be given.If you find you are lacking inspiration for packing javascript applications, the links below might prove useful. Searching online for prior art can be helpful if you are running into solved problems.- Searching Nix files for `mkYarnPackage`: <https://github.com/search?q=mkYarnPackage+language%3ANix&type=code>- Searching just `flake.nix` files for `mkYarnPackage`: <https://github.com/search?q=mkYarnPackage+filename%3Aflake.nix&type=code>- Searching Nix files for `mkYarnPackage`: <https://gitlab.com/search?scope=blobs&search=mkYarnPackage+extension%3Anix>- Searching just `flake.nix` files for `mkYarnPackage`: <https://gitlab.com/search?scope=blobs&search=mkYarnPackage+filename%3Aflake.nix>···+### Adding and Updating Javascript packages in nixpkgs {#javascript-adding-or-updating-packages}···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:···If you have to build a derivation for an integrated web framework (rails, phoenix..), this is probably the easiest way.In the `mkYarnPackage` record the property `pkgConfig` can be used to override packages when you encounter problems building.
+4
-4
doc/languages-frameworks/pkg-config.section.md
+4
-4
doc/languages-frameworks/pkg-config.section.md
···Packages should set `meta.pkgConfigModules` with the list of package config modules they provide.They should also use `testers.testMetaPkgConfig` to check that the final built package matches that list.···A [setup hook](#setup-hook-pkg-config) is bundled in the `pkg-config` package to bring a derivation's declared build inputs into the environment.This will populate environment variables like `PKG_CONFIG_PATH`, `PKG_CONFIG_PATH_FOR_BUILD`, and `PKG_CONFIG_PATH_HOST` based on:···Normal pkg-config commands to look up dependencies by name will then work with those environment variables defined by the hook.The `defaultPkgConfigPackages` package set is a set of aliases, named after the modules they provide.
+4
-4
doc/languages-frameworks/python.section.md
+4
-4
doc/languages-frameworks/python.section.md
·········$ maintainers/scripts/update-python-libraries --target minor --commit --use-pkgs-prefix pkgs/development/python-modules/**/default.nix
+1
-1
doc/languages-frameworks/ruby.section.md
+1
-1
doc/languages-frameworks/ruby.section.md
···Of course for this use-case one could also use overlays since the configuration for `pg` depends on the `postgresql` alias, but for demonstration purposes this has to suffice.Right now, bundix has some issues with pre-built, platform-specific gems: [bundix PR #68](https://github.com/nix-community/bundix/pull/68).
+3
-3
doc/languages-frameworks/vim.section.md
+3
-3
doc/languages-frameworks/vim.section.md
···If your package requires building specific parts, use instead `pkgs.vimUtils.buildVimPlugin`.···
+6
-5
doc/manual.xml
+6
-5
doc/manual.xml
·········
+2
-2
doc/stdenv/meta.chapter.md
+2
-2
doc/stdenv/meta.chapter.md
······The NixOS tests are available as `nixosTests` in parameters of derivations. For instance, the OpenSMTPD derivation includes lines similar to:
+7
-7
doc/stdenv/stdenv.chapter.md
+7
-7
doc/stdenv/stdenv.chapter.md
···The key to use when specifying the prefix. By default, this is set to `--prefix=` as that is used by the majority of packages.By default, when building statically, stdenv will try to add build system appropriate configure flags to try to enable static builds.···Performs string substitution on the contents of \<infile\>, writing the result to \<outfile\>. The substitutions in \<subs\> are of the following form:Replace every occurrence of `@varName@` by the contents of the environment variable \<varName\>. This is useful for generating files from templates, using `@...@` in the template as placeholders.·········Here are some more packages that provide a setup hook. Since the list of hooks is extensible, this is not an exhaustive list. The mechanism is only to be used as a last resort, so it might cover most uses.