git.iko.soy/typeable/nixpkgs
on master help sign in
29292 files changed+1515389−650379
since splitsnapshots
unifiedsplit
.editorconfig+6−34 .git-blame-ignore-revs+32 .github/CODEOWNERS+142−72 .github/CONTRIBUTING.md−63 .github/ISSUE_TEMPLATE/bug_report.md+10−13 .github/ISSUE_TEMPLATE/out_of_date_package_report.md+3−3 .github/PULL_REQUEST_TEMPLATE.md+32−19 .github/STALE-BOT.md+7−6 .github/labeler.yml+159 .github/workflows/backport.yml+35 .github/workflows/basic-eval.yml+26 .github/workflows/direct-push.yml+32 .github/workflows/editorconfig.yml+29−15 .github/workflows/labels.yml+24 .github/workflows/manual-nixos.yml+31 .github/workflows/manual-nixpkgs.yml+31 .github/workflows/nixos-manual.yml+26 .github/workflows/no-channel.yml+21 .github/workflows/pending-set.yml+6−1 .github/workflows/periodic-merge-24h.yml+57 .github/workflows/periodic-merge-6h.yml+51 .github/workflows/update-terraform-providers.yml+48 .gitignore+7 .version+1−1 CONTRIBUTING.md+130 COPYING+1−1 README.md+18−12 doc/Makefile+26−20 doc/README.md+12 doc/build-aux/pandoc-filters/docbook-reader/citerefentry-to-rst-role.lua+23 doc/build-aux/pandoc-filters/docbook-writer/labelless-link-is-xref.lua+34 doc/build-aux/pandoc-filters/docbook-writer/rst-roles.lua+36 doc/build-aux/pandoc-filters/link-unix-man-references.lua+17 doc/build-aux/pandoc-filters/myst-reader/roles.lua+29 doc/build-aux/pandoc-filters/myst-writer/roles.lua+25 doc/builders/fetchers.chapter.md+114 doc/builders/fetchers.xml−150 doc/builders/images.xml+4−4 doc/builders/images/appimagetools.section.md+48 doc/builders/images/appimagetools.xml−102 doc/builders/images/dockertools.section.md+314 doc/builders/images/dockertools.xml−499 doc/builders/images/ocitools.section.md+37 doc/builders/images/ocitools.xml−61 doc/builders/images/snap/example-firefox.nix−28 doc/builders/images/snap/example-hello.nix−12 doc/builders/images/snaptools.section.md+71 doc/builders/images/snaptools.xml−59 doc/builders/packages/cataclysm-dda.section.md+38−3 doc/builders/packages/citrix.section.md+32 doc/builders/packages/citrix.xml−46 doc/builders/packages/dlib.section.md+13 doc/builders/packages/dlib.xml−24 doc/builders/packages/eclipse.section.md+64 doc/builders/packages/eclipse.xml−72 doc/builders/packages/elm.section.md+11 doc/builders/packages/elm.xml−17 doc/builders/packages/emacs.section.md+119 doc/builders/packages/emacs.xml−131 doc/builders/packages/etc-files.section.md+18 doc/builders/packages/firefox.section.md+51 doc/builders/packages/fish.section.md+50 doc/builders/packages/fuse.section.md+45 doc/builders/packages/ibus.section.md+38 doc/builders/packages/ibus.xml−57 doc/builders/packages/index.xml+20−16 doc/builders/packages/kakoune.section.md+9 doc/builders/packages/kakoune.xml−12 doc/builders/packages/linux.section.md+41 doc/builders/packages/linux.xml−85 doc/builders/packages/locales.section.md+5 doc/builders/packages/locales.xml−13 doc/builders/packages/nginx.section.md+11 doc/builders/packages/nginx.xml−25 doc/builders/packages/opengl.section.md+15 doc/builders/packages/opengl.xml−9 doc/builders/packages/shell-helpers.section.md+12 doc/builders/packages/shell-helpers.xml−21 doc/builders/packages/steam.section.md+63 doc/builders/packages/steam.xml−125 doc/builders/packages/urxvt.section.md+71 doc/builders/packages/urxvt.xml−115 doc/builders/packages/weechat.section.md+85 doc/builders/packages/weechat.xml−85 doc/builders/packages/xorg.section.md+34 doc/builders/packages/xorg.xml−34 doc/builders/special.xml+2−2 doc/builders/special/fhs-environments.section.md+49 doc/builders/special/fhs-environments.xml−122 doc/builders/special/mkshell.section.md+37 doc/builders/special/mkshell.xml−24 doc/builders/testers.chapter.md+82 doc/builders/trivial-builders.chapter.md+223 doc/builders/trivial-builders.xml−90 doc/contributing/coding-conventions.chapter.md+665 doc/contributing/coding-conventions.xml−934 doc/contributing/contributing-to-documentation.chapter.md+106 doc/contributing/contributing-to-documentation.xml−30 doc/contributing/quick-start.chapter.md+77 doc/contributing/quick-start.xml−152 doc/contributing/reviewing-contributions.chapter.md+208 doc/contributing/reviewing-contributions.xml−488 doc/contributing/submitting-changes.chapter.md+292 doc/contributing/submitting-changes.xml−455 doc/contributing/vulnerability-roundup.chapter.md+45 doc/default.nix+13−2 doc/doc-support/lib-function-docs.nix+1 doc/functions.xml+4−4 doc/functions/debug.section.md+5 doc/functions/debug.xml−14 doc/functions/generators.section.md+56 doc/functions/generators.xml−74 doc/functions/library.xml+2 doc/functions/library/asserts.xml+1−1 doc/functions/library/attrsets.xml+43−6 doc/functions/nix-gitignore.section.md+49 doc/functions/nix-gitignore.xml−70 doc/functions/prefer-remote-fetch.section.md+17 doc/functions/prefer-remote-fetch.xml−21 doc/hooks/index.xml+10 doc/hooks/postgresql-test-hook.section.md+59 doc/languages-frameworks/agda.section.md+178−33 doc/languages-frameworks/android.section.md+149−44 doc/languages-frameworks/beam.section.md+373 doc/languages-frameworks/beam.xml−159 doc/languages-frameworks/bower.section.md+158 doc/languages-frameworks/bower.xml−196 doc/languages-frameworks/chicken.section.md+49 doc/languages-frameworks/coq.section.md+83 doc/languages-frameworks/coq.xml−52 doc/languages-frameworks/crystal.section.md+5−3 doc/languages-frameworks/cuda.section.md+34 doc/languages-frameworks/dhall.section.md+463 doc/languages-frameworks/dotnet.section.md+77−20 doc/languages-frameworks/emscripten.section.md+13−15 doc/languages-frameworks/gnome.section.md+218 doc/languages-frameworks/gnome.xml−299 doc/languages-frameworks/go.section.md+149 doc/languages-frameworks/go.xml−248 doc/languages-frameworks/haskell.section.md+1−7 doc/languages-frameworks/hy.section.md+31 doc/languages-frameworks/idris.section.md+22−23 doc/languages-frameworks/index.xml+19−12 doc/languages-frameworks/ios.section.md+10−14 doc/languages-frameworks/java.section.md+100 doc/languages-frameworks/java.xml−77 doc/languages-frameworks/javascript.section.md+278 doc/languages-frameworks/lua.section.md+39−38 doc/languages-frameworks/maven.section.md+16−19 doc/languages-frameworks/nim.section.md+91 doc/languages-frameworks/node.section.md−51 doc/languages-frameworks/ocaml.section.md+131 doc/languages-frameworks/ocaml.xml−73 doc/languages-frameworks/octave.section.md+92 doc/languages-frameworks/perl.section.md+159 doc/languages-frameworks/perl.xml−195 doc/languages-frameworks/php.section.md+18 doc/languages-frameworks/python.section.md+221−107 doc/languages-frameworks/qt.section.md+160 doc/languages-frameworks/qt.xml−149 doc/languages-frameworks/r.section.md+25−18 doc/languages-frameworks/ruby.section.md+79−161 doc/languages-frameworks/ruby.xml−107 doc/languages-frameworks/rust.section.md+592−123 doc/languages-frameworks/texlive.section.md+129 doc/languages-frameworks/texlive.xml−152 doc/languages-frameworks/titanium.section.md+5−10 doc/languages-frameworks/vim.section.md+88−25 doc/manual.xml+18−15 doc/preface.chapter.md+2−8 doc/shell.nix+3−5 doc/stdenv/cross-compilation.chapter.md+236 doc/stdenv/cross-compilation.xml−394 doc/stdenv/meta.chapter.md+251 doc/stdenv/meta.xml−349 doc/stdenv/multiple-output.chapter.md+128 doc/stdenv/multiple-output.xml−262 doc/stdenv/platform-notes.chapter.md+62 doc/stdenv/platform-notes.xml−83 doc/stdenv/stdenv.chapter.md+1323 doc/stdenv/stdenv.xml−2423 doc/using/configuration.chapter.md+356 doc/using/configuration.xml−448 doc/using/overlays.chapter.md+167 doc/using/overlays.xml−294 doc/using/overrides.chapter.md+108 doc/using/overrides.xml−145 flake.nix+9−35 lib/asserts.nix+10−12 lib/attrsets.nix+162−29 lib/customisation.nix+55−6 lib/debug.nix+22 lib/default.nix+27−16 lib/deprecated.nix+5−5 lib/fixed-points.nix+5−5 lib/flake.nix+5 lib/flakes.nix+22 lib/generators.nix+101−5 lib/licenses.nix+286−136 lib/lists.nix+15−15 lib/meta.nix+54−1 lib/modules.nix+365−103 lib/options.nix+84−19 lib/sources.nix+177−72 lib/strings.nix+222−18 lib/systems/architectures.nix+38−8 lib/systems/default.nix+52−7 lib/systems/doubles.nix+46−25 lib/systems/examples.nix+101−43 lib/systems/inspect.nix+11−1 lib/systems/parse.nix+43−13 lib/systems/platforms.nix+427−340 lib/systems/supported.nix+26 lib/tests/flakes/subflakeTest/flake.nix+8 lib/tests/flakes/subflakeTest/subflake/flake.nix+5 lib/tests/maintainers.nix+6−2 lib/tests/misc.nix+531−2 lib/tests/modules.sh+184−115 lib/tests/modules/adhoc-freeformType-survives-type-merge.nix+14 lib/tests/modules/declare-attrsOf.nix+8−1 lib/tests/modules/declare-bare-submodule-deep-option-duplicate.nix+10 lib/tests/modules/declare-bare-submodule-deep-option.nix+10 lib/tests/modules/declare-bare-submodule-nested-option.nix+19 lib/tests/modules/declare-bare-submodule.nix+18 lib/tests/modules/declare-set.nix+12 lib/tests/modules/declare-submodule-via-evalModules.nix+28 lib/tests/modules/declare-submoduleWith-modules.nix+1−3 lib/tests/modules/declare-variants.nix+9 lib/tests/modules/define-bare-submodule-values.nix+4 lib/tests/modules/define-shorthandOnlyDefinesConfig-true.nix+1 lib/tests/modules/define-variant.nix+22 lib/tests/modules/emptyValues.nix+36 lib/tests/modules/extendModules-168767-imports.nix+41 lib/tests/modules/freeform-nested.nix+8−1 lib/tests/modules/freeform-submodules.nix+22 lib/tests/modules/functionTo/list-order.nix+25 lib/tests/modules/functionTo/merging-attrs.nix+27 lib/tests/modules/functionTo/merging-list.nix+24 lib/tests/modules/functionTo/trivial.nix+17 lib/tests/modules/functionTo/wrong-type.nix+18 lib/tests/modules/optionTypeFile.nix+28 lib/tests/modules/optionTypeMerging.nix+27 lib/tests/modules/raw.nix+30 lib/tests/modules/types-anything/functions.nix+9−3 lib/tests/release.nix+9−1 lib/tests/sources.sh+61 lib/tests/systems.nix+7−4 lib/trivial.nix+131−10 lib/types.nix+186−57 maintainers/maintainer-list.nix+4737−263 maintainers/scripts/build.nix+10−2 maintainers/scripts/check-hydra-by-maintainer.nix+68 maintainers/scripts/check-maintainer-github-handles.sh+9−9 maintainers/scripts/copy-tarballs.pl+15−1 maintainers/scripts/db-to-md.sh+88 maintainers/scripts/dep-licenses.sh+1−1 maintainers/scripts/doc/escape-code-markup.py+97 maintainers/scripts/doc/replace-xrefs-by-empty-links.py+32 maintainers/scripts/doc/unknown-code-language.lua+12 maintainers/scripts/feature-freeze-teams.pl+98 maintainers/scripts/fetch-kde-qt.sh+4−5 maintainers/scripts/find-tarballs.nix+1−1 maintainers/scripts/haskell/dependencies.nix+10 maintainers/scripts/haskell/hydra-report.hs+490 maintainers/scripts/haskell/maintained-broken-pkgs.nix+22 maintainers/scripts/haskell/maintainer-handles.nix+7 maintainers/scripts/haskell/mark-broken.sh+47 maintainers/scripts/haskell/merge-and-open-pr.sh+122 maintainers/scripts/haskell/regenerate-hackage-packages.sh+46 maintainers/scripts/haskell/regenerate-transitive-broken-packages.sh+15 maintainers/scripts/haskell/test-configurations.nix+136 maintainers/scripts/haskell/transitive-broken-packages.nix+16 maintainers/scripts/haskell/update-cabal2nix-unstable.sh+17 maintainers/scripts/haskell/update-hackage.sh+35 maintainers/scripts/haskell/update-stackage.sh+70 maintainers/scripts/haskell/upload-nixos-package-list-to-hackage.sh+22 maintainers/scripts/luarocks-packages.csv+87−86 maintainers/scripts/nix-generate-from-cpan.nix+3−3 maintainers/scripts/nix-generate-from-cpan.pl+3−3 maintainers/scripts/nixpkgs-lint.nix+6−5 maintainers/scripts/nixpkgs-lint.pl+1−1 maintainers/scripts/pluginupdate.py+701 maintainers/scripts/rebuild-amount.sh+86−79 maintainers/scripts/remove-old-aliases.py+211 maintainers/scripts/update-luarocks-packages+207−125 maintainers/scripts/update-luarocks-shell.nix+7−3 maintainers/scripts/update-redirected-urls.sh+12 maintainers/scripts/update-ruby-packages+4−1 maintainers/scripts/update.nix+18−8 maintainers/scripts/update.py+8−1 maintainers/scripts/update_redirected_urls.sh−11 maintainers/scripts/vanity.sh+19−19 maintainers/team-list.nix+555−6 nixos/default.nix+1−19 nixos/doc/manual/Makefile+1−1 nixos/doc/manual/README−3 nixos/doc/manual/README.md+3 nixos/doc/manual/administration/boot-problems.section.md+41 nixos/doc/manual/administration/boot-problems.xml−126 nixos/doc/manual/administration/cleaning-store.chapter.md+62 nixos/doc/manual/administration/cleaning-store.xml−63 nixos/doc/manual/administration/container-networking.section.md+44 nixos/doc/manual/administration/container-networking.xml−59 nixos/doc/manual/administration/containers.chapter.md+28 nixos/doc/manual/administration/containers.xml−34 nixos/doc/manual/administration/control-groups.chapter.md+59 nixos/doc/manual/administration/control-groups.xml−65 nixos/doc/manual/administration/declarative-containers.section.md+48 nixos/doc/manual/administration/declarative-containers.xml−60 nixos/doc/manual/administration/imperative-containers.section.md+115 nixos/doc/manual/administration/imperative-containers.xml−123 nixos/doc/manual/administration/logging.chapter.md+38 nixos/doc/manual/administration/logging.xml−43 nixos/doc/manual/administration/maintenance-mode.section.md+11 nixos/doc/manual/administration/maintenance-mode.xml−16 nixos/doc/manual/administration/network-problems.section.md+21 nixos/doc/manual/administration/network-problems.xml−27 nixos/doc/manual/administration/rebooting.chapter.md+30 nixos/doc/manual/administration/rebooting.xml−35 nixos/doc/manual/administration/rollback.section.md+38 nixos/doc/manual/administration/rollback.xml−41 nixos/doc/manual/administration/running.xml+8−8 nixos/doc/manual/administration/service-mgmt.chapter.md+120 nixos/doc/manual/administration/service-mgmt.xml−140 nixos/doc/manual/administration/store-corruption.section.md+28 nixos/doc/manual/administration/store-corruption.xml−36 nixos/doc/manual/administration/troubleshooting.chapter.md+12 nixos/doc/manual/administration/troubleshooting.xml−16 nixos/doc/manual/administration/user-sessions.chapter.md+43 nixos/doc/manual/administration/user-sessions.xml−45 nixos/doc/manual/configuration/abstractions.section.md+80 nixos/doc/manual/configuration/abstractions.xml−101 nixos/doc/manual/configuration/ad-hoc-network-config.section.md+13 nixos/doc/manual/configuration/ad-hoc-network-config.xml−20 nixos/doc/manual/configuration/ad-hoc-packages.section.md+51 nixos/doc/manual/configuration/ad-hoc-packages.xml−61 nixos/doc/manual/configuration/adding-custom-packages.section.md+74 nixos/doc/manual/configuration/adding-custom-packages.xml−73 nixos/doc/manual/configuration/config-file.section.md+175 nixos/doc/manual/configuration/config-file.xml−215 nixos/doc/manual/configuration/config-syntax.chapter.md+19 nixos/doc/manual/configuration/config-syntax.xml−25 nixos/doc/manual/configuration/configuration.xml+13−13 nixos/doc/manual/configuration/customizing-packages.section.md+74 nixos/doc/manual/configuration/customizing-packages.xml−86 nixos/doc/manual/configuration/declarative-packages.section.md+46 nixos/doc/manual/configuration/declarative-packages.xml−54 nixos/doc/manual/configuration/file-systems.chapter.md+42 nixos/doc/manual/configuration/file-systems.xml−57 nixos/doc/manual/configuration/firewall.section.md+32 nixos/doc/manual/configuration/firewall.xml−37 nixos/doc/manual/configuration/gpu-accel.chapter.md+204 nixos/doc/manual/configuration/gpu-accel.xml−263 nixos/doc/manual/configuration/ipv4-config.section.md+35 nixos/doc/manual/configuration/ipv4-config.xml−43 nixos/doc/manual/configuration/ipv6-config.section.md+42 nixos/doc/manual/configuration/ipv6-config.xml−50 nixos/doc/manual/configuration/kubernetes.chapter.md+104 nixos/doc/manual/configuration/kubernetes.xml−112 nixos/doc/manual/configuration/linux-kernel.chapter.md+140 nixos/doc/manual/configuration/linux-kernel.xml−138 nixos/doc/manual/configuration/luks-file-systems.section.md+77 nixos/doc/manual/configuration/luks-file-systems.xml−74 nixos/doc/manual/configuration/modularity.section.md+133 nixos/doc/manual/configuration/modularity.xml−146 nixos/doc/manual/configuration/network-manager.section.md+42 nixos/doc/manual/configuration/network-manager.xml−48 nixos/doc/manual/configuration/networking.chapter.md+16 nixos/doc/manual/configuration/networking.xml−19 nixos/doc/manual/configuration/package-mgmt.chapter.md+18 nixos/doc/manual/configuration/package-mgmt.xml−31 nixos/doc/manual/configuration/profiles.chapter.md+34 nixos/doc/manual/configuration/profiles.xml−39 nixos/doc/manual/configuration/profiles/all-hardware.section.md+11 nixos/doc/manual/configuration/profiles/all-hardware.xml−21 nixos/doc/manual/configuration/profiles/base.section.md+7 nixos/doc/manual/configuration/profiles/base.xml−15 nixos/doc/manual/configuration/profiles/clone-config.section.md+11 nixos/doc/manual/configuration/profiles/clone-config.xml−21 nixos/doc/manual/configuration/profiles/demo.section.md+4 nixos/doc/manual/configuration/profiles/demo.xml−14 nixos/doc/manual/configuration/profiles/docker-container.section.md+7 nixos/doc/manual/configuration/profiles/docker-container.xml−16 nixos/doc/manual/configuration/profiles/graphical.section.md+10 nixos/doc/manual/configuration/profiles/graphical.xml−20 nixos/doc/manual/configuration/profiles/hardened.section.md+20 nixos/doc/manual/configuration/profiles/hardened.xml−24 nixos/doc/manual/configuration/profiles/headless.section.md+9 nixos/doc/manual/configuration/profiles/headless.xml−19 nixos/doc/manual/configuration/profiles/installation-device.section.md+24 nixos/doc/manual/configuration/profiles/installation-device.xml−36 nixos/doc/manual/configuration/profiles/minimal.section.md+9 nixos/doc/manual/configuration/profiles/minimal.xml−17 nixos/doc/manual/configuration/profiles/qemu-guest.section.md+7 nixos/doc/manual/configuration/profiles/qemu-guest.xml−18 nixos/doc/manual/configuration/renaming-interfaces.section.md+51 nixos/doc/manual/configuration/ssh.section.md+19 nixos/doc/manual/configuration/ssh.xml−27 nixos/doc/manual/configuration/sshfs-file-systems.section.md+104 nixos/doc/manual/configuration/subversion.chapter.md+102 nixos/doc/manual/configuration/subversion.xml−140 nixos/doc/manual/configuration/summary.section.md+46 nixos/doc/manual/configuration/summary.xml−227 nixos/doc/manual/configuration/user-mgmt.chapter.md+92 nixos/doc/manual/configuration/user-mgmt.xml−88 nixos/doc/manual/configuration/wayland.chapter.md+27 nixos/doc/manual/configuration/wayland.xml−23 nixos/doc/manual/configuration/wireless.section.md+67 nixos/doc/manual/configuration/wireless.xml−70 nixos/doc/manual/configuration/x-windows.chapter.md+337 nixos/doc/manual/configuration/x-windows.xml−341 nixos/doc/manual/configuration/xfce.chapter.md+52 nixos/doc/manual/configuration/xfce.xml−59 nixos/doc/manual/contributing-to-this-manual.chapter.md+13 nixos/doc/manual/contributing-to-this-manual.xml−22 nixos/doc/manual/default.nix+19−6 nixos/doc/manual/development/activation-script.section.md+72 nixos/doc/manual/development/assertions.section.md+40 nixos/doc/manual/development/assertions.xml−74 nixos/doc/manual/development/building-nixos.xml−33 nixos/doc/manual/development/building-parts.chapter.md+74 nixos/doc/manual/development/building-parts.xml−121 nixos/doc/manual/development/development.xml+7−8 nixos/doc/manual/development/freeform-modules.section.md+79 nixos/doc/manual/development/freeform-modules.xml−68 nixos/doc/manual/development/importing-modules.section.md+46 nixos/doc/manual/development/importing-modules.xml−56 nixos/doc/manual/development/linking-nixos-tests-to-packages.section.md+6 nixos/doc/manual/development/meta-attributes.section.md+66 nixos/doc/manual/development/meta-attributes.xml−63 nixos/doc/manual/development/nixos-tests.chapter.md+13 nixos/doc/manual/development/nixos-tests.xml−19 nixos/doc/manual/development/option-declarations.section.md+221 nixos/doc/manual/development/option-declarations.xml−199 nixos/doc/manual/development/option-def.section.md+91 nixos/doc/manual/development/option-def.xml−99 nixos/doc/manual/development/option-types.section.md+583 nixos/doc/manual/development/option-types.xml−914 nixos/doc/manual/development/releases.xml−366 nixos/doc/manual/development/replace-modules.section.md+64 nixos/doc/manual/development/replace-modules.xml−79 nixos/doc/manual/development/running-nixos-tests-interactively.section.md+35 nixos/doc/manual/development/running-nixos-tests-interactively.xml−49 nixos/doc/manual/development/running-nixos-tests.section.md+31 nixos/doc/manual/development/running-nixos-tests.xml−36 nixos/doc/manual/development/settings-options.section.md+251 nixos/doc/manual/development/settings-options.xml−216 nixos/doc/manual/development/sources.chapter.md+77 nixos/doc/manual/development/sources.xml−85 nixos/doc/manual/development/testing-installer.chapter.md+18 nixos/doc/manual/development/testing-installer.xml−22 nixos/doc/manual/development/unit-handling.section.md+62 nixos/doc/manual/development/what-happens-during-a-system-switch.chapter.md+53 nixos/doc/manual/development/writing-documentation.chapter.md+93 nixos/doc/manual/development/writing-documentation.xml−149 nixos/doc/manual/development/writing-modules.chapter.md+208 nixos/doc/manual/development/writing-modules.xml−188 nixos/doc/manual/development/writing-nixos-tests.section.md+382 nixos/doc/manual/development/writing-nixos-tests.xml−453 nixos/doc/manual/from_md/README.md+5 nixos/doc/manual/from_md/administration/boot-problems.section.xml+144 nixos/doc/manual/from_md/administration/cleaning-store.chapter.xml+72 nixos/doc/manual/from_md/administration/container-networking.section.xml+54 nixos/doc/manual/from_md/administration/containers.chapter.xml+31 nixos/doc/manual/from_md/administration/control-groups.chapter.xml+67 nixos/doc/manual/from_md/administration/declarative-containers.section.xml+60 nixos/doc/manual/from_md/administration/imperative-containers.section.xml+132 nixos/doc/manual/from_md/administration/logging.chapter.xml+45 nixos/doc/manual/from_md/administration/maintenance-mode.section.xml+14 nixos/doc/manual/from_md/administration/network-problems.section.xml+25 nixos/doc/manual/from_md/administration/rebooting.chapter.xml+38 nixos/doc/manual/from_md/administration/rollback.section.xml+42 nixos/doc/manual/from_md/administration/service-mgmt.chapter.xml+141 nixos/doc/manual/from_md/administration/store-corruption.section.xml+34 nixos/doc/manual/from_md/administration/troubleshooting.chapter.xml+12 nixos/doc/manual/from_md/administration/user-sessions.chapter.xml+46 nixos/doc/manual/from_md/configuration/abstractions.section.xml+101 nixos/doc/manual/from_md/configuration/ad-hoc-network-config.section.xml+16 nixos/doc/manual/from_md/configuration/ad-hoc-packages.section.xml+59 nixos/doc/manual/from_md/configuration/adding-custom-packages.section.xml+80 nixos/doc/manual/from_md/configuration/config-file.section.xml+231 nixos/doc/manual/from_md/configuration/config-syntax.chapter.xml+21 nixos/doc/manual/from_md/configuration/customizing-packages.section.xml+90 nixos/doc/manual/from_md/configuration/declarative-packages.section.xml+53 nixos/doc/manual/from_md/configuration/file-systems.chapter.xml+55 nixos/doc/manual/from_md/configuration/firewall.section.xml+39 nixos/doc/manual/from_md/configuration/gpu-accel.chapter.xml+239 nixos/doc/manual/from_md/configuration/ipv4-config.section.xml+43 nixos/doc/manual/from_md/configuration/ipv6-config.section.xml+47 nixos/doc/manual/from_md/configuration/kubernetes.chapter.xml+126 nixos/doc/manual/from_md/configuration/linux-kernel.chapter.xml+157 nixos/doc/manual/from_md/configuration/luks-file-systems.section.xml+84 nixos/doc/manual/from_md/configuration/modularity.section.xml+152 nixos/doc/manual/from_md/configuration/network-manager.section.xml+49 nixos/doc/manual/from_md/configuration/networking.chapter.xml+15 nixos/doc/manual/from_md/configuration/package-mgmt.chapter.xml+28 nixos/doc/manual/from_md/configuration/profiles.chapter.xml+38 nixos/doc/manual/from_md/configuration/profiles/all-hardware.section.xml+15 nixos/doc/manual/from_md/configuration/profiles/base.section.xml+10 nixos/doc/manual/from_md/configuration/profiles/clone-config.section.xml+16 nixos/doc/manual/from_md/configuration/profiles/demo.section.xml+10 nixos/doc/manual/from_md/configuration/profiles/docker-container.section.xml+12 nixos/doc/manual/from_md/configuration/profiles/graphical.section.xml+14 nixos/doc/manual/from_md/configuration/profiles/hardened.section.xml+25 nixos/doc/manual/from_md/configuration/profiles/headless.section.xml+15 nixos/doc/manual/from_md/configuration/profiles/installation-device.section.xml+32 nixos/doc/manual/from_md/configuration/profiles/minimal.section.xml+13 nixos/doc/manual/from_md/configuration/profiles/qemu-guest.section.xml+11 nixos/doc/manual/from_md/configuration/renaming-interfaces.section.xml+62 nixos/doc/manual/from_md/configuration/ssh.section.xml+23 nixos/doc/manual/from_md/configuration/sshfs-file-systems.section.xml+139 nixos/doc/manual/from_md/configuration/subversion.chapter.xml+121 nixos/doc/manual/from_md/configuration/summary.section.xml+332 nixos/doc/manual/from_md/configuration/user-mgmt.chapter.xml+105 nixos/doc/manual/from_md/configuration/wayland.chapter.xml+31 nixos/doc/manual/from_md/configuration/wireless.section.xml+73 nixos/doc/manual/from_md/configuration/x-windows.chapter.xml+381 nixos/doc/manual/from_md/configuration/xfce.chapter.xml+62 nixos/doc/manual/from_md/contributing-to-this-manual.chapter.xml+22 nixos/doc/manual/from_md/development/activation-script.section.xml+150 nixos/doc/manual/from_md/development/assertions.section.xml+58 nixos/doc/manual/from_md/development/building-parts.chapter.xml+124 nixos/doc/manual/from_md/development/freeform-modules.section.xml+87 nixos/doc/manual/from_md/development/importing-modules.section.xml+47 nixos/doc/manual/from_md/development/linking-nixos-tests-to-packages.section.xml+10 nixos/doc/manual/from_md/development/meta-attributes.section.xml+95 nixos/doc/manual/from_md/development/nixos-tests.chapter.xml+14 nixos/doc/manual/from_md/development/option-declarations.section.xml+327 nixos/doc/manual/from_md/development/option-def.section.xml+104 nixos/doc/manual/from_md/development/option-types.section.xml+1038 nixos/doc/manual/from_md/development/replace-modules.section.xml+70 nixos/doc/manual/from_md/development/running-nixos-tests-interactively.section.xml+39 nixos/doc/manual/from_md/development/running-nixos-tests.section.xml+34 nixos/doc/manual/from_md/development/settings-options.section.xml+421 nixos/doc/manual/from_md/development/sources.chapter.xml+90 nixos/doc/manual/from_md/development/testing-installer.chapter.xml+22 nixos/doc/manual/from_md/development/unit-handling.section.xml+131 nixos/doc/manual/from_md/development/what-happens-during-a-system-switch.chapter.xml+122 nixos/doc/manual/from_md/development/writing-documentation.chapter.xml+144 nixos/doc/manual/from_md/development/writing-modules.chapter.xml+245 nixos/doc/manual/from_md/development/writing-nixos-tests.section.xml+655 nixos/doc/manual/from_md/installation/building-nixos.chapter.xml+106 nixos/doc/manual/from_md/installation/changing-config.chapter.xml+117 nixos/doc/manual/from_md/installation/installing-behind-a-proxy.section.xml+41 nixos/doc/manual/from_md/installation/installing-from-other-distro.section.xml+388 nixos/doc/manual/from_md/installation/installing-pxe.section.xml+42 nixos/doc/manual/from_md/installation/installing-usb.section.xml+35 nixos/doc/manual/from_md/installation/installing-virtualbox-guest.section.xml+92 nixos/doc/manual/from_md/installation/installing.chapter.xml+645 nixos/doc/manual/from_md/installation/obtaining.chapter.xml+48 nixos/doc/manual/from_md/installation/upgrading.chapter.xml+152 nixos/doc/manual/from_md/release-notes/rl-1310.section.xml+6 nixos/doc/manual/from_md/release-notes/rl-1404.section.xml+189 nixos/doc/manual/from_md/release-notes/rl-1412.section.xml+466 nixos/doc/manual/from_md/release-notes/rl-1509.section.xml+776 nixos/doc/manual/from_md/release-notes/rl-1603.section.xml+695 nixos/doc/manual/from_md/release-notes/rl-1609.section.xml+273 nixos/doc/manual/from_md/release-notes/rl-1703.section.xml+818 nixos/doc/manual/from_md/release-notes/rl-1709.section.xml+922 nixos/doc/manual/from_md/release-notes/rl-1803.section.xml+879 nixos/doc/manual/from_md/release-notes/rl-1809.section.xml+941 nixos/doc/manual/from_md/release-notes/rl-1903.section.xml+790 nixos/doc/manual/from_md/release-notes/rl-1909.section.xml+1197 nixos/doc/manual/from_md/release-notes/rl-2003.section.xml+1497 nixos/doc/manual/from_md/release-notes/rl-2009.section.xml+2210 nixos/doc/manual/from_md/release-notes/rl-2105.section.xml+1567 nixos/doc/manual/from_md/release-notes/rl-2111.section.xml+2091 nixos/doc/manual/from_md/release-notes/rl-2205.section.xml+2470 nixos/doc/manual/installation/building-nixos.chapter.md+77 nixos/doc/manual/installation/changing-config.chapter.md+100 nixos/doc/manual/installation/changing-config.xml−97 nixos/doc/manual/installation/installation.xml+5−4 nixos/doc/manual/installation/installing-behind-a-proxy.section.md+29 nixos/doc/manual/installation/installing-behind-a-proxy.xml−48 nixos/doc/manual/installation/installing-from-other-distro.section.md+279 nixos/doc/manual/installation/installing-from-other-distro.xml−364 nixos/doc/manual/installation/installing-pxe.section.md+32 nixos/doc/manual/installation/installing-pxe.xml−50 nixos/doc/manual/installation/installing-usb.section.md+31 nixos/doc/manual/installation/installing-usb.xml−40 nixos/doc/manual/installation/installing-virtualbox-guest.section.md+59 nixos/doc/manual/installation/installing-virtualbox-guest.xml−108 nixos/doc/manual/installation/installing.chapter.md+482 nixos/doc/manual/installation/installing.xml−578 nixos/doc/manual/installation/obtaining.chapter.md+26 nixos/doc/manual/installation/obtaining.xml−54 nixos/doc/manual/installation/upgrading.chapter.md+118 nixos/doc/manual/installation/upgrading.xml−139 nixos/doc/manual/man-nixos-install.xml+9−4 nixos/doc/manual/man-nixos-rebuild.xml+68−11 nixos/doc/manual/man-pages.xml+7−2 nixos/doc/manual/manual.xml+1−1 nixos/doc/manual/md-to-db.sh+49 nixos/doc/manual/preface.xml+9−4 nixos/doc/manual/release-notes/release-notes.xml+17−15 nixos/doc/manual/release-notes/rl-1310.section.md+3 nixos/doc/manual/release-notes/rl-1310.xml−11 nixos/doc/manual/release-notes/rl-1404.section.md+81 nixos/doc/manual/release-notes/rl-1404.xml−179 nixos/doc/manual/release-notes/rl-1412.section.md+171 nixos/doc/manual/release-notes/rl-1412.xml−467 nixos/doc/manual/release-notes/rl-1509.section.md+319 nixos/doc/manual/release-notes/rl-1509.xml−750 nixos/doc/manual/release-notes/rl-1603.section.md+282 nixos/doc/manual/release-notes/rl-1603.xml−671 nixos/doc/manual/release-notes/rl-1609.section.md+73 nixos/doc/manual/release-notes/rl-1609.xml−277 nixos/doc/manual/release-notes/rl-1703.section.md+303 nixos/doc/manual/release-notes/rl-1703.xml−817 nixos/doc/manual/release-notes/rl-1709.section.md+316 nixos/doc/manual/release-notes/rl-1709.xml−899 nixos/doc/manual/release-notes/rl-1803.section.md+286 nixos/doc/manual/release-notes/rl-1803.xml−855 nixos/doc/manual/release-notes/rl-1809.section.md+332 nixos/doc/manual/release-notes/rl-1809.xml−933 nixos/doc/manual/release-notes/rl-1903.section.md+214 nixos/doc/manual/release-notes/rl-1903.xml−768 nixos/doc/manual/release-notes/rl-1909.section.md+313 nixos/doc/manual/release-notes/rl-1909.xml−902 nixos/doc/manual/release-notes/rl-2003.section.md+507 nixos/doc/manual/release-notes/rl-2003.xml−1243 nixos/doc/manual/release-notes/rl-2009.section.md+747 nixos/doc/manual/release-notes/rl-2009.xml−1814 nixos/doc/manual/release-notes/rl-2103.xml−336 nixos/doc/manual/release-notes/rl-2105.section.md+428 nixos/doc/manual/release-notes/rl-2111.section.md+575 nixos/doc/manual/release-notes/rl-2205.section.md+878 nixos/doc/manual/shell.nix+1−1 nixos/lib/build-vms.nix+23−9 nixos/lib/default.nix+33 nixos/lib/eval-cacheable-options.nix+53 nixos/lib/eval-config-minimal.nix+49 nixos/lib/eval-config.nix+54−16 nixos/lib/make-disk-image.nix+182−34 nixos/lib/make-ext4-fs.nix+3−5 nixos/lib/make-iso9660-image.sh+1 nixos/lib/make-multi-disk-zfs-image.nix+333 nixos/lib/make-options-doc/default.nix+79−78 nixos/lib/make-options-doc/generateAsciiDoc.py+37 nixos/lib/make-options-doc/generateCommonMark.py+27 nixos/lib/make-options-doc/mergeJSON.py+95 nixos/lib/make-options-doc/options-to-docbook.xsl+30−20 nixos/lib/make-options-doc/optionsJSONtoXML.nix+6 nixos/lib/make-options-doc/sortXML.py+27 nixos/lib/make-single-disk-zfs-image.nix+322 nixos/lib/make-squashfs.nix+8−1 nixos/lib/qemu-common.nix+32 nixos/lib/qemu-flags.nix−30 nixos/lib/systemd-lib.nix+426 nixos/lib/systemd-types.nix+69 nixos/lib/systemd-unit-options.nix+711 nixos/lib/test-driver/default.nix+32 nixos/lib/test-driver/setup.py+13 nixos/lib/test-driver/test-driver.py−966 nixos/lib/test-driver/test_driver/__init__.py+128 nixos/lib/test-driver/test_driver/driver.py+226 nixos/lib/test-driver/test_driver/logger.py+105 nixos/lib/test-driver/test_driver/machine.py+1023 nixos/lib/test-driver/test_driver/polling_condition.py+77 nixos/lib/test-driver/test_driver/vlan.py+58 nixos/lib/testing-python.nix+188−236 nixos/lib/utils.nix+78−6 nixos/maintainers/scripts/azure-new/examples/basic/image.nix+1−1 nixos/maintainers/scripts/azure-new/examples/basic/system.nix+1−1 nixos/maintainers/scripts/cloudstack/cloudstack-image.nix−1 nixos/maintainers/scripts/ec2/amazon-image-zfs.nix+12 nixos/maintainers/scripts/ec2/amazon-image.nix+100−29 nixos/maintainers/scripts/ec2/create-amis.sh+84−46 nixos/maintainers/scripts/gce/create-gce.sh+12 nixos/maintainers/scripts/lxd/lxd-image-inner.nix+102 nixos/maintainers/scripts/lxd/lxd-image.nix+34 nixos/maintainers/scripts/lxd/nix.tpl+9 nixos/maintainers/scripts/openstack/openstack-image-zfs.nix+101 nixos/maintainers/scripts/openstack/openstack-image.nix+10−9 nixos/modules/config/console.nix+44−30 nixos/modules/config/fonts/fontconfig.nix+36−18 nixos/modules/config/fonts/fontdir.nix+2−2 nixos/modules/config/fonts/fonts.nix+46−21 nixos/modules/config/gnu.nix+4−6 nixos/modules/config/gtk/gtk-icon-cache.nix+1 nixos/modules/config/i18n.nix+8−2 nixos/modules/config/iproute2.nix+9−9 nixos/modules/config/krb5/default.nix+8−8 nixos/modules/config/ldap.nix+20−17 nixos/modules/config/malloc.nix+28−2 nixos/modules/config/networking.nix+15−7 nixos/modules/config/no-x-libs.nix+1 nixos/modules/config/nsswitch.nix+9−6 nixos/modules/config/power-management.nix+2−2 nixos/modules/config/pulseaudio.nix+13−12 nixos/modules/config/resolvconf.nix+2−4 nixos/modules/config/shells-environment.nix+15−5 nixos/modules/config/swap.nix+34−9 nixos/modules/config/sysctl.nix+1−1 nixos/modules/config/system-environment.nix+34−36 nixos/modules/config/system-path.nix+31−12 nixos/modules/config/terminfo.nix+25−1 nixos/modules/config/unix-odbc-drivers.nix+1−1 nixos/modules/config/update-users-groups.pl+41−18 nixos/modules/config/users-groups.nix+112−57 nixos/modules/config/xdg/mime.nix+64−2 nixos/modules/config/xdg/portal.nix+23−12 nixos/modules/config/xdg/portals/wlr.nix+67 nixos/modules/hardware/all-firmware.nix+26−7 nixos/modules/hardware/ckb-next.nix+1−1 nixos/modules/hardware/corectrl.nix+62 nixos/modules/hardware/cpu/intel-sgx.nix+69 nixos/modules/hardware/device-tree.nix+9−9 nixos/modules/hardware/digitalbitbox.nix+1−1 nixos/modules/hardware/flirc.nix+12 nixos/modules/hardware/gkraken.nix+18 nixos/modules/hardware/gpgsmartcards.nix+37 nixos/modules/hardware/hackrf.nix+23 nixos/modules/hardware/i2c.nix+43 nixos/modules/hardware/keyboard/teck.nix+16 nixos/modules/hardware/keyboard/zsa.nix+24 nixos/modules/hardware/ksm.nix+6−6 nixos/modules/hardware/network/ath-user-regd.nix+31 nixos/modules/hardware/network/b43.nix−4 nixos/modules/hardware/nitrokey.nix+1−15 nixos/modules/hardware/onlykey.udev−4 nixos/modules/hardware/onlykey.nix → nixos/modules/hardware/onlykey/default.nix nixos/modules/hardware/onlykey/onlykey.udev+18 nixos/modules/hardware/opengl.nix+3−4 nixos/modules/hardware/openrazer.nix+18−5 nixos/modules/hardware/opentabletdriver.nix+69 nixos/modules/hardware/pcmcia.nix+1 nixos/modules/hardware/printers.nix+7−12 nixos/modules/hardware/raid/hpsa.nix+4−1 nixos/modules/hardware/rtl-sdr.nix+9−6 nixos/modules/hardware/sata.nix+100 nixos/modules/hardware/sensor/hddtemp.nix+81 nixos/modules/hardware/sensor/iio.nix+1−1 nixos/modules/hardware/system-76.nix+36−3 nixos/modules/hardware/ubertooth.nix+29 nixos/modules/hardware/video/amdgpu-pro.nix+25−22 nixos/modules/hardware/video/amdgpu.nix−9 nixos/modules/hardware/video/ati.nix−40 nixos/modules/hardware/video/bumblebee.nix+1−1 nixos/modules/hardware/video/capture/mwprocapture.nix−5 nixos/modules/hardware/video/nvidia.nix+140−52 nixos/modules/hardware/video/switcheroo-control.nix+18 nixos/modules/hardware/video/uvcvideo/default.nix+1−1 nixos/modules/hardware/video/webcam/facetimehd.nix+14−6 nixos/modules/hardware/xone.nix+23 nixos/modules/hardware/xpadneo.nix+1−1 nixos/modules/i18n/input-method/default.nix+3−1 nixos/modules/i18n/input-method/default.xml+22 nixos/modules/i18n/input-method/fcitx.nix+4−1 nixos/modules/i18n/input-method/fcitx5.nix+47 nixos/modules/i18n/input-method/ibus.nix+5−2 nixos/modules/i18n/input-method/kime.nix+51 nixos/modules/installer/cd-dvd/channel.nix+2−1 nixos/modules/installer/cd-dvd/installation-cd-base.nix+16 nixos/modules/installer/cd-dvd/installation-cd-graphical-base.nix+14−8 nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares-gnome.nix+59 nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares-plasma5.nix+49 nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares.nix+20 nixos/modules/installer/cd-dvd/installation-cd-graphical-gnome.nix+4−6 nixos/modules/installer/cd-dvd/installation-cd-graphical-plasma5.nix+1−3 nixos/modules/installer/cd-dvd/iso-image.nix+195−89 nixos/modules/installer/cd-dvd/sd-image-aarch64-new-kernel.nix+12−5 nixos/modules/installer/cd-dvd/sd-image-aarch64.nix+9−55 nixos/modules/installer/cd-dvd/sd-image-armv7l-multiplatform.nix+9−52 nixos/modules/installer/cd-dvd/sd-image-raspberrypi.nix+9−41 nixos/modules/installer/cd-dvd/sd-image-raspberrypi4.nix−38 nixos/modules/installer/cd-dvd/sd-image.nix+8−238 nixos/modules/installer/cd-dvd/system-tarball-fuloong2f.nix+3−3 nixos/modules/installer/cd-dvd/system-tarball-pc.nix+3−3 nixos/modules/installer/cd-dvd/system-tarball-sheevaplug.nix+5−5 nixos/modules/installer/cd-dvd/system-tarball.nix+2−2 nixos/modules/installer/kexec/kexec-boot.nix+51 nixos/modules/installer/netboot/netboot.nix+14−6 nixos/modules/installer/sd-card/sd-image-aarch64-installer.nix+10 nixos/modules/installer/sd-card/sd-image-aarch64-new-kernel-installer.nix+10 nixos/modules/installer/sd-card/sd-image-aarch64-new-kernel.nix+7 nixos/modules/installer/sd-card/sd-image-aarch64.nix+83 nixos/modules/installer/sd-card/sd-image-armv7l-multiplatform-installer.nix+10 nixos/modules/installer/sd-card/sd-image-armv7l-multiplatform.nix+52 nixos/modules/installer/sd-card/sd-image-raspberrypi-installer.nix+10 nixos/modules/installer/sd-card/sd-image-raspberrypi.nix+41 nixos/modules/installer/sd-card/sd-image-riscv64-qemu-installer.nix+10 nixos/modules/installer/sd-card/sd-image-riscv64-qemu.nix+32 nixos/modules/installer/sd-card/sd-image-x86_64.nix+27 nixos/modules/installer/sd-card/sd-image.nix+269 nixos/modules/installer/tools/nix-fallback-paths.nix+5−4 nixos/modules/installer/tools/nixos-build-vms/build-vms.nix+18−5 nixos/modules/installer/tools/nixos-build-vms/nixos-build-vms.sh+4−3 nixos/modules/installer/tools/nixos-enter.sh+36−1 nixos/modules/installer/tools/nixos-generate-config.pl+42−6 nixos/modules/installer/tools/nixos-install.sh+20−19 nixos/modules/installer/tools/nixos-option/default.nix+1−11 nixos/modules/installer/tools/nixos-rebuild.sh−506 nixos/modules/installer/tools/nixos-version.sh+1 nixos/modules/installer/tools/tools.nix+39−21 nixos/modules/installer/virtualbox-demo.nix+2−2 nixos/modules/misc/crashdump.nix+3−2 nixos/modules/misc/documentation.nix+131−55 nixos/modules/misc/extra-arguments.nix+2−2 nixos/modules/misc/ids.nix+75−62 nixos/modules/misc/locate.nix+196−66 nixos/modules/misc/man-db.nix+73 nixos/modules/misc/mandoc.nix+61 nixos/modules/misc/meta.nix+18−3 nixos/modules/misc/nixpkgs.nix+18−10 nixos/modules/misc/nixpkgs/test.nix+8 nixos/modules/misc/version.nix+52−18 nixos/modules/misc/wordlist.nix+59 nixos/modules/module-list.nix+275−58 nixos/modules/profiles/all-hardware.nix+70−4 nixos/modules/profiles/base.nix+1 nixos/modules/profiles/hardened.nix+8−4 nixos/modules/profiles/headless.nix+1−1 nixos/modules/profiles/installation-device.nix+20−2 nixos/modules/profiles/minimal.nix+2 nixos/modules/profiles/qemu-guest.nix+2−4 nixos/modules/programs/_1password-gui.nix+68 nixos/modules/programs/_1password.nix+44 nixos/modules/programs/adb.nix+1−2 nixos/modules/programs/appgate-sdp.nix+25 nixos/modules/programs/atop.nix+127−8 nixos/modules/programs/bandwhich.nix+3−1 nixos/modules/programs/bash/bash-completion.nix+37 nixos/modules/programs/bash/bash.nix+10−43 nixos/modules/programs/bash/ls-colors.nix+20 nixos/modules/programs/bash/undistract-me.nix+36 nixos/modules/programs/bcc.nix+3−3 nixos/modules/programs/calls.nix+27 nixos/modules/programs/captive-browser.nix+75−45 nixos/modules/programs/ccache.nix+3−1 nixos/modules/programs/cdemu.nix+3 nixos/modules/programs/chromium.nix+13−2 nixos/modules/programs/cnping.nix+21 nixos/modules/programs/command-not-found/command-not-found.nix+9−9 nixos/modules/programs/command-not-found/command-not-found.pl+43−17 nixos/modules/programs/dconf.nix+3−1 nixos/modules/programs/digitalbitbox/default.nix+1−1 nixos/modules/programs/dmrconfig.nix+1−1 nixos/modules/programs/droidcam.nix+16 nixos/modules/programs/environment.nix+9−2 nixos/modules/programs/evince.nix+13−4 nixos/modules/programs/extra-container.nix+17 nixos/modules/programs/feedbackd.nix+33 nixos/modules/programs/file-roller.nix+13−4 nixos/modules/programs/firejail.nix+52−9 nixos/modules/programs/fish.nix+196−123 nixos/modules/programs/fish_completion-generator.patch+10−9 nixos/modules/programs/flashrom.nix+26 nixos/modules/programs/flexoptix-app.nix+25 nixos/modules/programs/freetds.nix+1−1 nixos/modules/programs/gamemode.nix+98 nixos/modules/programs/geary.nix+3−3 nixos/modules/programs/git.nix+69 nixos/modules/programs/gnome-disks.nix+2−2 nixos/modules/programs/gnome-documents.nix+5−5 nixos/modules/programs/gnome-terminal.nix+3−3 nixos/modules/programs/gnupg.nix+4−1 nixos/modules/programs/gpaste.nix+4−4 nixos/modules/programs/hamster.nix+1−1 nixos/modules/programs/htop.nix+58 nixos/modules/programs/iftop.nix+3−1 nixos/modules/programs/iotop.nix+3−1 nixos/modules/programs/java.nix+1−1 nixos/modules/programs/k3b.nix+52 nixos/modules/programs/k40-whisperer.nix+40 nixos/modules/programs/kbdlight.nix+6−1 nixos/modules/programs/kclock.nix+13 nixos/modules/programs/kdeconnect.nix+35 nixos/modules/programs/less.nix+9−6 nixos/modules/programs/liboping.nix+3−1 nixos/modules/programs/mininet.nix+3−3 nixos/modules/programs/mosh.nix+1−1 nixos/modules/programs/msmtp.nix+106 nixos/modules/programs/mtr.nix+4−1 nixos/modules/programs/nbd.nix+19 nixos/modules/programs/neovim.nix+29−28 nixos/modules/programs/nethoscope.nix+30 nixos/modules/programs/nix-ld.nix+12 nixos/modules/programs/nncp.nix+101 nixos/modules/programs/noisetorch.nix+28 nixos/modules/programs/npm.nix+3−2 nixos/modules/programs/pantheon-tweaks.nix+19 nixos/modules/programs/partition-manager.nix+19 nixos/modules/programs/phosh.nix+162 nixos/modules/programs/plotinus.nix+1−1 nixos/modules/programs/proxychains.nix+165 nixos/modules/programs/qt5ct.nix+1−1 nixos/modules/programs/seahorse.nix+3−3 nixos/modules/programs/shadow.nix+15−8 nixos/modules/programs/singularity.nix+6−1 nixos/modules/programs/slock.nix+6−1 nixos/modules/programs/spacefm.nix+6−6 nixos/modules/programs/ssh.nix+73−19 nixos/modules/programs/ssmtp.nix−186 nixos/modules/programs/starship.nix+51 nixos/modules/programs/steam.nix+40−2 nixos/modules/programs/sway.nix+29−16 nixos/modules/programs/thefuck.nix+7−6 nixos/modules/programs/tmux.nix+14−1 nixos/modules/programs/traceroute.nix+3−1 nixos/modules/programs/tsm-client.nix+8−8 nixos/modules/programs/turbovnc.nix+54 nixos/modules/programs/udevil.nix+6−1 nixos/modules/programs/venus.nix−173 nixos/modules/programs/vim.nix+2−2 nixos/modules/programs/wavemon.nix+3−1 nixos/modules/programs/weylus.nix+47 nixos/modules/programs/wireshark.nix+1−1 nixos/modules/programs/wshowkeys.nix+6−1 nixos/modules/programs/xonsh.nix+2−1 nixos/modules/programs/xss-lock.nix+2−1 nixos/modules/programs/xwayland.nix+13−8 nixos/modules/programs/yabar.nix+2−1 nixos/modules/programs/zsh/oh-my-zsh.nix+1−1 nixos/modules/programs/zsh/zsh-autoenv.nix+1−1 nixos/modules/programs/zsh/zsh-autosuggestions.nix+20−11 nixos/modules/programs/zsh/zsh-syntax-highlighting.nix+2−2 nixos/modules/programs/zsh/zsh.nix+14−6 nixos/modules/rename.nix+63−35 nixos/modules/security/acme.nix−688 nixos/modules/security/acme.xml−266 nixos/modules/security/acme/default.nix+921 nixos/modules/security/acme/doc.xml+413 nixos/modules/security/acme/mk-cert-ownership-assertion.nix+4 nixos/modules/security/apparmor-suid.nix−49 nixos/modules/security/apparmor.nix+208−51 nixos/modules/security/apparmor/includes.nix+317 nixos/modules/security/apparmor/profiles.nix+11 nixos/modules/security/ca.nix+11−17 nixos/modules/security/chromium-suid-sandbox.nix+6−1 nixos/modules/security/dhparams.nix+5−3 nixos/modules/security/doas.nix+19−5 nixos/modules/security/duosec.nix+6−1 nixos/modules/security/google_oslogin.nix+6−3 nixos/modules/security/hidepid.nix−27 nixos/modules/security/hidepid.xml−28 nixos/modules/security/lock-kernel-modules.nix+19−9 nixos/modules/security/misc.nix+6−2 nixos/modules/security/pam.nix+504−145 nixos/modules/security/pam_mount.nix+102−7 nixos/modules/security/pam_usb.nix+12−2 nixos/modules/security/polkit.nix+15−7 nixos/modules/security/rngd.nix+12−52 nixos/modules/security/rtkit.nix+4−1 nixos/modules/security/sudo.nix+28−6 nixos/modules/security/systemd-confinement.nix+7−9 nixos/modules/security/tpm2.nix+5−5 nixos/modules/security/wrappers/default.nix+197−106 nixos/modules/security/wrappers/wrapper.c+162−168 nixos/modules/security/wrappers/wrapper.nix+21 nixos/modules/services/admin/meshcentral.nix+53 nixos/modules/services/admin/oxidized.nix+2−2 nixos/modules/services/admin/pgadmin.nix+127 nixos/modules/services/amqp/activemq/default.nix+3−1 nixos/modules/services/amqp/rabbitmq.nix+26−9 nixos/modules/services/audio/alsa.nix+9−9 nixos/modules/services/audio/botamusique.nix+115 nixos/modules/services/audio/hqplayerd.nix+142 nixos/modules/services/audio/icecast.nix+1 nixos/modules/services/audio/jack.nix+8−8 nixos/modules/services/audio/jmusicbot.nix+48 nixos/modules/services/audio/liquidsoap.nix+3−3 nixos/modules/services/audio/mopidy.nix+1−1 nixos/modules/services/audio/mpd.nix+78−56 nixos/modules/services/audio/mpdscribble.nix+213 nixos/modules/services/audio/navidrome.nix+71 nixos/modules/services/audio/networkaudiod.nix+19 nixos/modules/services/audio/roon-bridge.nix+76 nixos/modules/services/audio/roon-server.nix+9−4 nixos/modules/services/audio/slimserver.nix+2−1 nixos/modules/services/audio/snapserver.nix+55−24 nixos/modules/services/audio/spotifyd.nix+27−1 nixos/modules/services/audio/squeezelite.nix+17−21 nixos/modules/services/audio/ympd.nix+1−1 nixos/modules/services/backup/automysqlbackup.nix+3−2 nixos/modules/services/backup/bacula.nix+24−2 nixos/modules/services/backup/borgbackup.nix+78−23 nixos/modules/services/backup/borgmatic.nix+57 nixos/modules/services/backup/btrbk.nix+220 nixos/modules/services/backup/duplicati.nix+31−12 nixos/modules/services/backup/duplicity.nix+73−18 nixos/modules/services/backup/mysql-backup.nix+8−3 nixos/modules/services/backup/postgresql-backup.nix+47−9 nixos/modules/services/backup/postgresql-wal-receiver.nix+5−5 nixos/modules/services/backup/restic-rest-server.nix+5−1 nixos/modules/services/backup/restic.nix+27−10 nixos/modules/services/backup/sanoid.nix+143−152 nixos/modules/services/backup/syncoid.nix+390−185 nixos/modules/services/backup/tarsnap.nix+29−27 nixos/modules/services/backup/tsm.nix+33−14 nixos/modules/services/backup/znapzend.nix+8−8 nixos/modules/services/backup/zrepl.nix+57 nixos/modules/services/blockchain/ethereum/geth.nix+179 nixos/modules/services/cluster/corosync/default.nix+112 nixos/modules/services/cluster/hadoop/conf.nix+25−12 nixos/modules/services/cluster/hadoop/default.nix+180−25 nixos/modules/services/cluster/hadoop/hdfs.nix+175−44 nixos/modules/services/cluster/hadoop/yarn.nix+155−29 nixos/modules/services/cluster/k3s/default.nix+36−9 nixos/modules/services/cluster/kubernetes/addon-manager.nix+8−4 nixos/modules/services/cluster/kubernetes/addons/dashboard.nix−332 nixos/modules/services/cluster/kubernetes/addons/dns.nix+53−19 nixos/modules/services/cluster/kubernetes/apiserver.nix+47−16 nixos/modules/services/cluster/kubernetes/controller-manager.nix+11−2 nixos/modules/services/cluster/kubernetes/default.nix+39−11 nixos/modules/services/cluster/kubernetes/flannel.nix+6−40 nixos/modules/services/cluster/kubernetes/kubelet.nix+58−10 nixos/modules/services/cluster/kubernetes/pki.nix+6−1 nixos/modules/services/cluster/kubernetes/proxy.nix+11−3 nixos/modules/services/cluster/kubernetes/scheduler.nix+11−4 nixos/modules/services/cluster/pacemaker/default.nix+52 nixos/modules/services/cluster/spark/default.nix+162 nixos/modules/services/computing/boinc/client.nix+2−2 nixos/modules/services/computing/foldingathome/client.nix+11−1 nixos/modules/services/computing/slurm/slurm.nix+67−43 nixos/modules/services/continuous-integration/buildbot/master.nix+13−9 nixos/modules/services/continuous-integration/buildbot/worker.nix+7−5 nixos/modules/services/continuous-integration/buildkite-agents.nix+12−8 nixos/modules/services/continuous-integration/github-runner.nix+320 nixos/modules/services/continuous-integration/gitlab-runner.nix+24−11 nixos/modules/services/continuous-integration/gocd-agent/default.nix+14−2 nixos/modules/services/continuous-integration/gocd-server/default.nix+20−2 nixos/modules/services/continuous-integration/hail.nix+1−1 nixos/modules/services/continuous-integration/hercules-ci-agent/common.nix+137−84 nixos/modules/services/continuous-integration/hercules-ci-agent/default.nix+25−9 nixos/modules/services/continuous-integration/hydra/default.nix+41−18 nixos/modules/services/continuous-integration/jenkins/default.nix+30−9 nixos/modules/services/continuous-integration/jenkins/job-builder.nix+52−16 nixos/modules/services/continuous-integration/jenkins/slave.nix+15−1 nixos/modules/services/databases/aerospike.nix+1−1 nixos/modules/services/databases/cassandra.nix+245−174 nixos/modules/services/databases/clickhouse.nix+14−4 nixos/modules/services/databases/cockroachdb.nix+38−30 nixos/modules/services/databases/couchdb.nix+27−20 nixos/modules/services/databases/firebird.nix+19−12 nixos/modules/services/databases/hbase.nix+39−17 nixos/modules/services/databases/influxdb.nix+4−4 nixos/modules/services/databases/influxdb2.nix+66 nixos/modules/services/databases/memcached.nix+12−5 nixos/modules/services/databases/monetdb.nix+1−1 nixos/modules/services/databases/mongodb.nix+12−3 nixos/modules/services/databases/mysql.nix+192−191 nixos/modules/services/databases/neo4j.nix+16−6 nixos/modules/services/databases/openldap.nix+8−7 nixos/modules/services/databases/opentsdb.nix+1−2 nixos/modules/services/databases/pgmanage.nix+2−1 nixos/modules/services/databases/postgresql.nix+30−15 nixos/modules/services/databases/postgresql.xml+54−32 nixos/modules/services/databases/redis.nix+342−202 nixos/modules/services/databases/riak.nix+1−2 nixos/modules/services/databases/victoriametrics.nix+9−1 nixos/modules/services/databases/virtuoso.nix−94 nixos/modules/services/desktops/bamf.nix+2−2 nixos/modules/services/desktops/cpupower-gui.nix+56 nixos/modules/services/desktops/espanso.nix−1 nixos/modules/services/desktops/flatpak.nix+3−13 nixos/modules/services/desktops/geoclue2.nix+7−5 nixos/modules/services/desktops/gnome/at-spi2-core.nix+57 nixos/modules/services/desktops/gnome/chrome-gnome-shell.nix+41 nixos/modules/services/desktops/gnome/evolution-data-server.nix+71 nixos/modules/services/desktops/gnome/glib-networking.nix+45 nixos/modules/services/desktops/gnome3/gnome-initial-setup.nix → nixos/modules/services/desktops/gnome/gnome-initial-setup.nix+12−4 nixos/modules/services/desktops/gnome/gnome-keyring.nix+63 nixos/modules/services/desktops/gnome/gnome-online-accounts.nix+51 nixos/modules/services/desktops/gnome/gnome-online-miners.nix+51 nixos/modules/services/desktops/gnome/gnome-remote-desktop.nix+32 nixos/modules/services/desktops/gnome/gnome-settings-daemon.nix+70 nixos/modules/services/desktops/gnome/gnome-user-share.nix+48 nixos/modules/services/desktops/gnome/rygel.nix+44 nixos/modules/services/desktops/gnome/sushi.nix+50 nixos/modules/services/desktops/gnome/tracker-miners.nix+54 nixos/modules/services/desktops/gnome/tracker.nix+76 nixos/modules/services/desktops/gnome3/at-spi2-core.nix−49 nixos/modules/services/desktops/gnome3/chrome-gnome-shell.nix−33 nixos/modules/services/desktops/gnome3/evolution-data-server.nix−45 nixos/modules/services/desktops/gnome3/glib-networking.nix−37 nixos/modules/services/desktops/gnome3/gnome-keyring.nix−53 nixos/modules/services/desktops/gnome3/gnome-online-accounts.nix−43 nixos/modules/services/desktops/gnome3/gnome-online-miners.nix−43 nixos/modules/services/desktops/gnome3/gnome-remote-desktop.nix−24 nixos/modules/services/desktops/gnome3/gnome-settings-daemon.nix−78 nixos/modules/services/desktops/gnome3/gnome-user-share.nix−40 nixos/modules/services/desktops/gnome3/rygel.nix−36 nixos/modules/services/desktops/gnome3/sushi.nix−42 nixos/modules/services/desktops/gnome3/tracker-miners.nix−44 nixos/modules/services/desktops/gnome3/tracker.nix−45 nixos/modules/services/desktops/gsignond.nix+1−1 nixos/modules/services/desktops/gvfs.nix+4−3 nixos/modules/services/desktops/pantheon/files.nix−13 nixos/modules/services/desktops/pipewire.nix−105 nixos/modules/services/desktops/pipewire/daemon/client-rt.conf.json+39 nixos/modules/services/desktops/pipewire/daemon/client.conf.json+31 nixos/modules/services/desktops/pipewire/daemon/jack.conf.json+38 nixos/modules/services/desktops/pipewire/daemon/minimal.conf.json+118 nixos/modules/services/desktops/pipewire/daemon/pipewire-pulse.conf.json+100 nixos/modules/services/desktops/pipewire/daemon/pipewire.conf.json+96 nixos/modules/services/desktops/pipewire/media-session/alsa-monitor.conf.json+34 nixos/modules/services/desktops/pipewire/media-session/bluez-monitor.conf.json+36 nixos/modules/services/desktops/pipewire/media-session/media-session.conf.json+68 nixos/modules/services/desktops/pipewire/media-session/v4l2-monitor.conf.json+30 nixos/modules/services/desktops/pipewire/pipewire-media-session.nix+141 nixos/modules/services/desktops/pipewire/pipewire.nix+262 nixos/modules/services/desktops/pipewire/wireplumber.nix+54 nixos/modules/services/desktops/telepathy.nix+1−1 nixos/modules/services/desktops/tumbler.nix+2−2 nixos/modules/services/desktops/zeitgeist.nix+2−2 nixos/modules/services/development/blackfire.nix+4−9 nixos/modules/services/development/blackfire.xml+2−1 nixos/modules/services/development/bloop.nix+1−1 nixos/modules/services/development/distccd.nix+155 nixos/modules/services/development/hoogle.nix+13−8 nixos/modules/services/development/jupyter/default.nix+5−6 nixos/modules/services/development/jupyter/kernel-options.nix+4−4 nixos/modules/services/development/jupyterhub/default.nix+21−9 nixos/modules/services/development/lorri.nix+1−2 nixos/modules/services/development/rstudio-server/default.nix+107 nixos/modules/services/development/zammad.nix+323 nixos/modules/services/display-managers/greetd.nix+111 nixos/modules/services/editors/emacs.nix+1−1 nixos/modules/services/editors/emacs.xml+5−5 nixos/modules/services/editors/haste.nix+86 nixos/modules/services/editors/infinoted.nix+6−6 nixos/modules/services/finance/odoo.nix+122 nixos/modules/services/games/asf.nix+236 nixos/modules/services/games/crossfire-server.nix+179 nixos/modules/services/games/deliantra-server.nix+172 nixos/modules/services/games/factorio.nix+36−6 nixos/modules/services/games/freeciv.nix+187 nixos/modules/services/games/minecraft-server.nix+29−6 nixos/modules/services/games/minetest-server.nix+1−1 nixos/modules/services/games/openarena.nix+1−1 nixos/modules/services/games/quake3-server.nix+112 nixos/modules/services/games/terraria.nix+18−4 nixos/modules/services/hardware/acpid.nix+16−17 nixos/modules/services/hardware/actkbd.nix+2−2 nixos/modules/services/hardware/auto-cpufreq.nix+24 nixos/modules/services/hardware/bluetooth.nix+84−68 nixos/modules/services/hardware/brltty.nix+32−25 nixos/modules/services/hardware/ddccontrol.nix+39 nixos/modules/services/hardware/fancontrol.nix+10−7 nixos/modules/services/hardware/freefall.nix+1−1 nixos/modules/services/hardware/fwupd.nix+2−1 nixos/modules/services/hardware/interception-tools.nix+1 nixos/modules/services/hardware/joycond.nix+36 nixos/modules/services/hardware/lirc.nix+1−1 nixos/modules/services/hardware/pcscd.nix+45−41 nixos/modules/services/hardware/power-profiles-daemon.nix+55 nixos/modules/services/hardware/rasdaemon.nix+170 nixos/modules/services/hardware/sane.nix+41−6 nixos/modules/services/hardware/sane_extra_backends/brscan4.nix+4−4 nixos/modules/services/hardware/sane_extra_backends/brscan4_etc_files.nix+7−10 nixos/modules/services/hardware/sane_extra_backends/brscan5.nix+110 nixos/modules/services/hardware/sane_extra_backends/brscan5_etc_files.nix+77 nixos/modules/services/hardware/spacenavd.nix+24 nixos/modules/services/hardware/tcsd.nix+29−18 nixos/modules/services/hardware/thermald.nix+12−12 nixos/modules/services/hardware/thinkfan.nix+166−94 nixos/modules/services/hardware/throttled.nix+6 nixos/modules/services/hardware/trezord.nix+2−2 nixos/modules/services/hardware/triggerhappy.nix+2−2 nixos/modules/services/hardware/udev.nix+133−9 nixos/modules/services/hardware/udisks2.nix+41 nixos/modules/services/hardware/undervolt.nix+2−4 nixos/modules/services/hardware/upower.nix+7−8 nixos/modules/services/hardware/usbrelayd.nix+44 nixos/modules/services/hardware/vdr.nix+2−2 nixos/modules/services/hardware/xow.nix+3 nixos/modules/services/home-automation/home-assistant.nix+552 nixos/modules/services/home-automation/zigbee2mqtt.nix+142 nixos/modules/services/logging/SystemdJournal2Gelf.nix+1 nixos/modules/services/logging/awstats.nix+4−4 nixos/modules/services/logging/filebeat.nix+253 nixos/modules/services/logging/fluentd.nix+1−1 nixos/modules/services/logging/graylog.nix+7−8 nixos/modules/services/logging/journalbeat.nix+4−17 nixos/modules/services/logging/journalwatch.nix+1 nixos/modules/services/logging/klogd.nix+6−34 nixos/modules/services/logging/logcheck.nix+6−2 nixos/modules/services/logging/logrotate.nix+267−33 nixos/modules/services/logging/logstash.nix+26−13 nixos/modules/services/logging/promtail.nix+6−1 nixos/modules/services/logging/syslog-ng.nix+2−2 nixos/modules/services/logging/vector.nix+64 nixos/modules/services/mail/davmail.nix+1−1 nixos/modules/services/mail/dovecot.nix+21−50 nixos/modules/services/mail/exim.nix+16−4 nixos/modules/services/mail/maddy.nix+273 nixos/modules/services/mail/mail.nix+2−1 nixos/modules/services/mail/mailman.nix+51−19 nixos/modules/services/mail/mailman.xml+40−5 nixos/modules/services/mail/mlmmj.nix+30−13 nixos/modules/services/mail/nullmailer.nix+2−1 nixos/modules/services/mail/offlineimap.nix+2−2 nixos/modules/services/mail/opendkim.nix+2−1 nixos/modules/services/mail/opensmtpd.nix+5−2 nixos/modules/services/mail/postfix.nix+56−36 nixos/modules/services/mail/postfixadmin.nix+199 nixos/modules/services/mail/postgrey.nix+1−1 nixos/modules/services/mail/roundcube.nix+5−4 nixos/modules/services/mail/rspamd.nix+45−15 nixos/modules/services/mail/spamassassin.nix+36−29 nixos/modules/services/mail/sympa.nix+4−4 nixos/modules/services/misc/matrix-synapse-log_config.yaml → nixos/modules/services/matrix/matrix-synapse-log_config.yaml nixos/modules/services/matrix/matrix-synapse.nix+773 nixos/modules/services/misc/matrix-synapse.xml → nixos/modules/services/matrix/matrix-synapse.xml+25−21 nixos/modules/services/matrix/mjolnir.nix+242 nixos/modules/services/matrix/mjolnir.xml+134 nixos/modules/services/matrix/pantalaimon-options.nix+70 nixos/modules/services/matrix/pantalaimon.nix+70 nixos/modules/services/misc/airsonic.nix+32−8 nixos/modules/services/misc/ananicy.nix+107 nixos/modules/services/misc/ankisyncd.nix+1−1 nixos/modules/services/misc/apache-kafka.nix+13−16 nixos/modules/services/misc/autofs.nix+2−1 nixos/modules/services/misc/autorandr.nix+309−2 nixos/modules/services/misc/bazarr.nix+1 nixos/modules/services/misc/bees.nix+44−35 nixos/modules/services/misc/cfdyndns.nix+1−1 nixos/modules/services/misc/cgminer.nix+11−3 nixos/modules/services/misc/clipcat.nix+31 nixos/modules/services/misc/clipmenu.nix+1−1 nixos/modules/services/misc/confd.nix+1−1 nixos/modules/services/misc/couchpotato.nix−42 nixos/modules/services/misc/defaultUnicornConfig.rb−69 nixos/modules/services/misc/dendrite.nix+273 nixos/modules/services/misc/dictd.nix+3−3 nixos/modules/services/misc/disnix.nix+12−2 nixos/modules/services/misc/docker-registry.nix+3−1 nixos/modules/services/misc/duckling.nix+39 nixos/modules/services/misc/dwm-status.nix+2−2 nixos/modules/services/misc/dysnomia.nix+71−23 nixos/modules/services/misc/etcd.nix+14−4 nixos/modules/services/misc/etebase-server.nix+226 nixos/modules/services/misc/etesync-dav.nix+92 nixos/modules/services/misc/ethminer.nix+4−4 nixos/modules/services/misc/exhibitor.nix+5−2 nixos/modules/services/misc/felix.nix+3−1 nixos/modules/services/misc/freeswitch.nix+4−5 nixos/modules/services/misc/fstrim.nix+1−1 nixos/modules/services/misc/gammu-smsd.nix+2−2 nixos/modules/services/misc/geoip-updater.nix−306 nixos/modules/services/misc/geoipupdate.nix+187 nixos/modules/services/misc/gitea.nix+100−51 nixos/modules/services/misc/gitit.nix+28−27 nixos/modules/services/misc/gitlab.nix+653−164 nixos/modules/services/misc/gitlab.xml+38−19 nixos/modules/services/misc/gitolite.nix+8−6 nixos/modules/services/misc/gitweb.nix+2−1 nixos/modules/services/misc/gogs.nix+4−9 nixos/modules/services/misc/gollum.nix+3 nixos/modules/services/misc/gpsd.nix+2−1 nixos/modules/services/misc/greenclip.nix+1−1 nixos/modules/services/misc/headphones.nix+3−1 nixos/modules/services/misc/heisenbridge.nix+222 nixos/modules/services/misc/home-assistant.nix−276 nixos/modules/services/misc/ihaskell.nix+5−3 nixos/modules/services/misc/input-remapper.nix+30 nixos/modules/services/misc/jackett.nix+1−1 nixos/modules/services/misc/jellyfin.nix+24−12 nixos/modules/services/misc/klipper.nix+70−12 nixos/modules/services/misc/leaps.nix+1−1 nixos/modules/services/misc/libreddit.nix+66 nixos/modules/services/misc/lidarr.nix+1−1 nixos/modules/services/misc/lifecycled.nix+164 nixos/modules/services/misc/mame.nix+5−3 nixos/modules/services/misc/matrix-appservice-discord.nix+8−9 nixos/modules/services/misc/matrix-appservice-irc.nix+232 nixos/modules/services/misc/matrix-conduit.nix+149 nixos/modules/services/misc/matrix-synapse.nix−737 nixos/modules/services/misc/mautrix-facebook.nix+195 nixos/modules/services/misc/mautrix-telegram.nix+24−6 nixos/modules/services/misc/mbpfan.nix+59−61 nixos/modules/services/misc/mediatomb.nix+10−7 nixos/modules/services/misc/moonraker.nix+178 nixos/modules/services/misc/mwlib.nix−258 nixos/modules/services/misc/mx-puppet-discord.nix+122 nixos/modules/services/misc/n8n.nix+79 nixos/modules/services/misc/nitter.nix+358 nixos/modules/services/misc/nix-daemon.nix+510−283 nixos/modules/services/misc/nix-gc.nix+52−7 nixos/modules/services/misc/nix-optimise.nix+8−2 nixos/modules/services/misc/nix-ssh-serve.nix+10−2 nixos/modules/services/misc/nzbget.nix+36−18 nixos/modules/services/misc/nzbhydra2.nix+78 nixos/modules/services/misc/octoprint.nix+7−3 nixos/modules/services/misc/ombi.nix+81 nixos/modules/services/misc/owncast.nix+98 nixos/modules/services/misc/packagekit.nix+51−42 nixos/modules/services/misc/paperless.nix+204−67 nixos/modules/services/misc/pinnwand.nix+47−22 nixos/modules/services/misc/plex.nix+43−14 nixos/modules/services/misc/plikd.nix+82 nixos/modules/services/misc/podgrab.nix+50 nixos/modules/services/misc/prowlarr.nix+41 nixos/modules/services/misc/pykms.nix+7−6 nixos/modules/services/misc/redmine.nix+13−12 nixos/modules/services/misc/ripple-data-api.nix+3−1 nixos/modules/services/misc/rippled.nix+12−5 nixos/modules/services/misc/rmfakecloud.nix+147 nixos/modules/services/misc/safeeyes.nix+4 nixos/modules/services/misc/sdrplay.nix+35 nixos/modules/services/misc/sickbeard.nix+6−3 nixos/modules/services/misc/signald.nix+105 nixos/modules/services/misc/snapper.nix+42−17 nixos/modules/services/misc/sourcehut/builds.nix+236 nixos/modules/services/misc/sourcehut/default.nix+1386 nixos/modules/services/misc/sourcehut/dispatch.nix+127 nixos/modules/services/misc/sourcehut/git.nix+217 nixos/modules/services/misc/sourcehut/hg.nix+175 nixos/modules/services/misc/sourcehut/hub.nix+120 nixos/modules/services/misc/sourcehut/lists.nix+187 nixos/modules/services/misc/sourcehut/man.nix+124 nixos/modules/services/misc/sourcehut/meta.nix+213 nixos/modules/services/misc/sourcehut/paste.nix+135 nixos/modules/services/misc/sourcehut/service.nix+375 nixos/modules/services/misc/sourcehut/sourcehut.xml+119 nixos/modules/services/misc/sourcehut/todo.nix+163 nixos/modules/services/misc/ssm-agent.nix+11−4 nixos/modules/services/misc/subsonic.nix+10−6 nixos/modules/services/misc/svnserve.nix+1 nixos/modules/services/misc/synergy.nix+26−1 nixos/modules/services/misc/taskserver/default.nix+15−10 nixos/modules/services/misc/taskserver/doc.xml+1−1 nixos/modules/services/misc/taskserver/helper-tool.py+5−5 nixos/modules/services/misc/tautulli.nix+1−1 nixos/modules/services/misc/tp-auto-kbbl.nix+58 nixos/modules/services/misc/uhub.nix+85−153 nixos/modules/services/misc/weechat.nix+10−5 nixos/modules/services/misc/xmr-stak.nix+1−1 nixos/modules/services/misc/xmrig.nix+76 nixos/modules/services/misc/zigbee2mqtt.nix−98 nixos/modules/services/misc/zoneminder.nix+4−4 nixos/modules/services/misc/zookeeper.nix+15−5 nixos/modules/services/monitoring/alerta.nix+2−6 nixos/modules/services/monitoring/apcupsd.nix+1−1 nixos/modules/services/monitoring/arbtt.nix+1−2 nixos/modules/services/monitoring/bosun.nix+1−2 nixos/modules/services/monitoring/cadvisor.nix+2 nixos/modules/services/monitoring/collectd.nix+56−28 nixos/modules/services/monitoring/datadog-agent.nix+11−9 nixos/modules/services/monitoring/grafana-image-renderer.nix+150 nixos/modules/services/monitoring/grafana-reporter.nix+3−2 nixos/modules/services/monitoring/grafana.nix+224−55 nixos/modules/services/monitoring/graphite.nix+19−7 nixos/modules/services/monitoring/heapster.nix+4−2 nixos/modules/services/monitoring/incron.nix+8−3 nixos/modules/services/monitoring/kapacitor.nix+1−4 nixos/modules/services/monitoring/loki.nix+2−2 nixos/modules/services/monitoring/mackerel-agent.nix−1 nixos/modules/services/monitoring/metricbeat.nix+151 nixos/modules/services/monitoring/mimir.nix+63 nixos/modules/services/monitoring/munin.nix+7−5 nixos/modules/services/monitoring/nagios.nix+8−7 nixos/modules/services/monitoring/netdata.nix+110−38 nixos/modules/services/monitoring/parsedmarc.md+113 nixos/modules/services/monitoring/parsedmarc.nix+542 nixos/modules/services/monitoring/parsedmarc.xml+125 nixos/modules/services/monitoring/prometheus/alertmanager.nix+1−1 nixos/modules/services/monitoring/prometheus/default.nix+1352−246 nixos/modules/services/monitoring/prometheus/exporters.nix+64−17 nixos/modules/services/monitoring/prometheus/exporters.xml+21 nixos/modules/services/monitoring/prometheus/exporters/artifactory.nix+59 nixos/modules/services/monitoring/prometheus/exporters/bind.nix+6−6 nixos/modules/services/monitoring/prometheus/exporters/bird.nix+50 nixos/modules/services/monitoring/prometheus/exporters/bitcoin.nix+82 nixos/modules/services/monitoring/prometheus/exporters/buildkite-agent.nix+64 nixos/modules/services/monitoring/prometheus/exporters/collectd.nix+10−10 nixos/modules/services/monitoring/prometheus/exporters/dmarc.nix+117 nixos/modules/services/monitoring/prometheus/exporters/domain.nix+19 nixos/modules/services/monitoring/prometheus/exporters/dovecot.nix+20−1 nixos/modules/services/monitoring/prometheus/exporters/fastly.nix+41 nixos/modules/services/monitoring/prometheus/exporters/flow.nix+50 nixos/modules/services/monitoring/prometheus/exporters/influxdb.nix+34 nixos/modules/services/monitoring/prometheus/exporters/jitsi.nix+40 nixos/modules/services/monitoring/prometheus/exporters/json.nix+18−10 nixos/modules/services/monitoring/prometheus/exporters/kea.nix+47 nixos/modules/services/monitoring/prometheus/exporters/knot.nix+54 nixos/modules/services/monitoring/prometheus/exporters/mail.nix+19−1 nixos/modules/services/monitoring/prometheus/exporters/mikrotik.nix+2−2 nixos/modules/services/monitoring/prometheus/exporters/modemmanager.nix+4 nixos/modules/services/monitoring/prometheus/exporters/nextcloud.nix+5−5 nixos/modules/services/monitoring/prometheus/exporters/nginx.nix+10−7 nixos/modules/services/monitoring/prometheus/exporters/nginxlog.nix+51 nixos/modules/services/monitoring/prometheus/exporters/node.nix+11−2 nixos/modules/services/monitoring/prometheus/exporters/openldap.nix+67 nixos/modules/services/monitoring/prometheus/exporters/pihole.nix+74 nixos/modules/services/monitoring/prometheus/exporters/postfix.nix+3 nixos/modules/services/monitoring/prometheus/exporters/postgres.nix+41 nixos/modules/services/monitoring/prometheus/exporters/process.nix+46 nixos/modules/services/monitoring/prometheus/exporters/pve.nix+118 nixos/modules/services/monitoring/prometheus/exporters/py-air-control.nix+53 nixos/modules/services/monitoring/prometheus/exporters/rspamd.nix+68−63 nixos/modules/services/monitoring/prometheus/exporters/rtl_433.nix+5 nixos/modules/services/monitoring/prometheus/exporters/script.nix+64 nixos/modules/services/monitoring/prometheus/exporters/smartctl.nix+75 nixos/modules/services/monitoring/prometheus/exporters/smokeping.nix+61 nixos/modules/services/monitoring/prometheus/exporters/snmp.nix+7−9 nixos/modules/services/monitoring/prometheus/exporters/sql.nix+4 nixos/modules/services/monitoring/prometheus/exporters/systemd.nix+22 nixos/modules/services/monitoring/prometheus/exporters/unbound.nix+63 nixos/modules/services/monitoring/prometheus/exporters/varnish.nix+3−2 nixos/modules/services/monitoring/prometheus/exporters/wireguard.nix+5 nixos/modules/services/monitoring/prometheus/pushgateway.nix+1−1 nixos/modules/services/monitoring/prometheus/xmpp-alerts.nix+17−9 nixos/modules/services/monitoring/scollector.nix+3−4 nixos/modules/services/monitoring/smartd.nix+6−1 nixos/modules/services/monitoring/teamviewer.nix+6−3 nixos/modules/services/monitoring/telegraf.nix+10−7 nixos/modules/services/monitoring/thanos.nix+10−7 nixos/modules/services/monitoring/tuptime.nix+5−1 nixos/modules/services/monitoring/unifi-poller.nix+80−4 nixos/modules/services/monitoring/ups.nix+1−1 nixos/modules/services/monitoring/uptime.nix+7−3 nixos/modules/services/monitoring/vnstat.nix+15−13 nixos/modules/services/monitoring/zabbix-agent.nix+17−9 nixos/modules/services/monitoring/zabbix-proxy.nix+18−7 nixos/modules/services/monitoring/zabbix-server.nix+17−6 nixos/modules/services/network-filesystems/ceph.nix+15−25 nixos/modules/services/network-filesystems/davfs2.nix+18 nixos/modules/services/network-filesystems/drbd.nix+5−7 nixos/modules/services/network-filesystems/glusterfs.nix+1−4 nixos/modules/services/network-filesystems/ipfs.nix+104−88 nixos/modules/services/network-filesystems/litestream/default.nix+100 nixos/modules/services/network-filesystems/litestream/litestream.xml+65 nixos/modules/services/network-filesystems/moosefs.nix+249 nixos/modules/services/network-filesystems/netatalk.nix+41−93 nixos/modules/services/network-filesystems/openafs/client.nix+7−8 nixos/modules/services/network-filesystems/openafs/server.nix+4−3 nixos/modules/services/network-filesystems/orangefs/client.nix−1 nixos/modules/services/network-filesystems/orangefs/server.nix+9−9 nixos/modules/services/network-filesystems/rsyncd.nix+55−5 nixos/modules/services/network-filesystems/samba-wsdd.nix+2−2 nixos/modules/services/network-filesystems/samba.nix+17−7 nixos/modules/services/network-filesystems/tahoe.nix+2−4 nixos/modules/services/network-filesystems/webdav-server-rs.nix+144 nixos/modules/services/network-filesystems/webdav.nix+107 nixos/modules/services/network-filesystems/xtreemfs.nix+15 nixos/modules/services/network-filesystems/yandex-disk.nix+2 nixos/modules/services/networking/3proxy.nix+3−16 nixos/modules/services/networking/adguardhome.nix+140 nixos/modules/services/networking/amuled.nix+9−3 nixos/modules/services/networking/antennas.nix+80 nixos/modules/services/networking/asterisk.nix+13−45 nixos/modules/services/networking/atftpd.nix+1−1 nixos/modules/services/networking/autossh.nix+1−1 nixos/modules/services/networking/avahi-daemon.nix+5−5 nixos/modules/services/networking/babeld.nix+25−4 nixos/modules/services/networking/bee-clef.nix+107 nixos/modules/services/networking/bee.nix+149 nixos/modules/services/networking/biboumi.nix+1 nixos/modules/services/networking/bind.nix+93−24 nixos/modules/services/networking/bird.nix+91−67 nixos/modules/services/networking/bitcoind.nix+2−2 nixos/modules/services/networking/bitlbee.nix+12−16 nixos/modules/services/networking/blockbook-frontend.nix+6−9 nixos/modules/services/networking/blocky.nix+40 nixos/modules/services/networking/charybdis.nix+8−1 nixos/modules/services/networking/cjdns.nix+16−6 nixos/modules/services/networking/cloudflare-dyndns.nix+93 nixos/modules/services/networking/cntlm.nix+7−2 nixos/modules/services/networking/connman.nix+7−6 nixos/modules/services/networking/consul.nix+42−11 nixos/modules/services/networking/coredns.nix+1−1 nixos/modules/services/networking/corerad.nix+7−13 nixos/modules/services/networking/coturn.nix+68−37 nixos/modules/services/networking/create_ap.nix+50 nixos/modules/services/networking/croc.nix+86 nixos/modules/services/networking/ddclient.nix+54−24 nixos/modules/services/networking/dhcpcd.nix+23−3 nixos/modules/services/networking/dhcpd.nix+49−50 nixos/modules/services/networking/dnscache.nix+1−1 nixos/modules/services/networking/dnscrypt-proxy2.nix+28−4 nixos/modules/services/networking/dnscrypt-wrapper.nix+4−2 nixos/modules/services/networking/dnsdist.nix+2−3 nixos/modules/services/networking/dnsmasq.nix+3−1 nixos/modules/services/networking/doh-proxy-rust.nix+60 nixos/modules/services/networking/ejabberd.nix+2−2 nixos/modules/services/networking/envoy.nix+84 nixos/modules/services/networking/epmd.nix+19−3 nixos/modules/services/networking/ergo.nix+4−2 nixos/modules/services/networking/ergochat.nix+155 nixos/modules/services/networking/eternal-terminal.nix+2−2 nixos/modules/services/networking/ferm.nix+2−2 nixos/modules/services/networking/firefox/sync-server.nix−183 nixos/modules/services/networking/firewall.nix+8−9 nixos/modules/services/networking/flannel.nix+7−6 nixos/modules/services/networking/flashpolicyd.nix−85 nixos/modules/services/networking/freeradius.nix+2 nixos/modules/services/networking/frr.nix+211 nixos/modules/services/networking/gale.nix−181 nixos/modules/services/networking/gateone.nix+2−2 nixos/modules/services/networking/ghostunnel.nix+242 nixos/modules/services/networking/git-daemon.nix+2−1 nixos/modules/services/networking/globalprotect-vpn.nix+43 nixos/modules/services/networking/gnunet.nix+15−11 nixos/modules/services/networking/go-neb.nix+30−4 nixos/modules/services/networking/gobgpd.nix+64 nixos/modules/services/networking/gogoclient.nix−85 nixos/modules/services/networking/gvpe.nix+8−2 nixos/modules/services/networking/hans.nix+2−2 nixos/modules/services/networking/headscale.nix+490 nixos/modules/services/networking/hostapd.nix+3−2 nixos/modules/services/networking/https-dns-proxy.nix+128 nixos/modules/services/networking/hylafax/faxq-wait.sh+1−1 nixos/modules/services/networking/hylafax/modem-default.nix+3−3 nixos/modules/services/networking/hylafax/options.nix+25−28 nixos/modules/services/networking/hylafax/spool.sh+3−3 nixos/modules/services/networking/hylafax/systemd.nix+21−21 nixos/modules/services/networking/i2pd.nix+19−12 nixos/modules/services/networking/icecream/daemon.nix+155 nixos/modules/services/networking/icecream/scheduler.nix+101 nixos/modules/services/networking/inspircd.nix+62 nixos/modules/services/networking/iodine.nix+2−1 nixos/modules/services/networking/ircd-hybrid/default.nix+11−3 nixos/modules/services/networking/iscsi/initiator.nix+84 nixos/modules/services/networking/iscsi/root-initiator.nix+190 nixos/modules/services/networking/iscsi/target.nix+53 nixos/modules/services/networking/iwd.nix+48−6 nixos/modules/services/networking/jibri/default.nix+417 nixos/modules/services/networking/jibri/logging.properties-journal+32 nixos/modules/services/networking/jicofo.nix+1−1 nixos/modules/services/networking/jitsi-videobridge.nix+15−3 nixos/modules/services/networking/kea.nix+449 nixos/modules/services/networking/keepalived/vrrp-instance-options.nix+1−3 nixos/modules/services/networking/keepalived/vrrp-script-options.nix+1−1 nixos/modules/services/networking/kippo.nix−117 nixos/modules/services/networking/knot.nix+43−8 nixos/modules/services/networking/kresd.nix+22−15 nixos/modules/services/networking/lambdabot.nix+1−1 nixos/modules/services/networking/libreswan.nix+89−58 nixos/modules/services/networking/lxd-image-server.nix+133 nixos/modules/services/networking/mailpile.nix−72 nixos/modules/services/networking/matterbridge.nix+3−3 nixos/modules/services/networking/minidlna.nix+1−1 nixos/modules/services/networking/miredo.nix+1−1 nixos/modules/services/networking/monero.nix+15−9 nixos/modules/services/networking/morty.nix+4−5 nixos/modules/services/networking/mosquitto.md+102 nixos/modules/services/networking/mosquitto.nix+580−170 nixos/modules/services/networking/mosquitto.xml+147 nixos/modules/services/networking/mozillavpn.nix+19 nixos/modules/services/networking/mtr-exporter.nix+87 nixos/modules/services/networking/mullvad-vpn.nix+6−2 nixos/modules/services/networking/multipath.nix+557 nixos/modules/services/networking/murmur.nix+10−3 nixos/modules/services/networking/mxisd.nix+2−2 nixos/modules/services/networking/namecoind.nix+1−1 nixos/modules/services/networking/nar-serve.nix+1−1 nixos/modules/services/networking/nat.nix+98−24 nixos/modules/services/networking/nats.nix+158 nixos/modules/services/networking/nbd.nix+159 nixos/modules/services/networking/ncdns.nix+10−5 nixos/modules/services/networking/ndppd.nix+1−1 nixos/modules/services/networking/nebula.nix+217 nixos/modules/services/networking/networkmanager.nix+165−89 nixos/modules/services/networking/nftables.nix+7−12 nixos/modules/services/networking/ngircd.nix+5−2 nixos/modules/services/networking/nix-serve.nix+20−10 nixos/modules/services/networking/nixops-dns.nix−1 nixos/modules/services/networking/nntp-proxy.nix+18−18 nixos/modules/services/networking/nomad.nix+178 nixos/modules/services/networking/nsd.nix+30−19 nixos/modules/services/networking/ntopng.nix+57−13 nixos/modules/services/networking/ntp/chrony.nix+66−14 nixos/modules/services/networking/ntp/ntpd.nix+9−7 nixos/modules/services/networking/ntp/openntpd.nix+4−1 nixos/modules/services/networking/nylon.nix+1−1 nixos/modules/services/networking/ofono.nix+1−1 nixos/modules/services/networking/onedrive.nix+1−2 nixos/modules/services/networking/openconnect.nix+137 nixos/modules/services/networking/openfire.nix−56 nixos/modules/services/networking/openvpn.nix+2−2 nixos/modules/services/networking/ostinato.nix+2−2 nixos/modules/services/networking/owamp.nix+1−1 nixos/modules/services/networking/pdns-recursor.nix+13−8 nixos/modules/services/networking/pixiecore.nix+1 nixos/modules/services/networking/pleroma.nix+149 nixos/modules/services/networking/pleroma.xml+188 nixos/modules/services/networking/powerdns.nix+2−2 nixos/modules/services/networking/pppd.nix+23−5 nixos/modules/services/networking/prayer.nix+2−1 nixos/modules/services/networking/privoxy.nix+230−65 nixos/modules/services/networking/prosody.nix+3−2 nixos/modules/services/networking/prosody.xml+1−1 nixos/modules/services/networking/quagga.nix−185 nixos/modules/services/networking/quassel.nix+11−4 nixos/modules/services/networking/quicktun.nix+1−1 nixos/modules/services/networking/quorum.nix+5−3 nixos/modules/services/networking/racoon.nix−45 nixos/modules/services/networking/radicale.nix+156−44 nixos/modules/services/networking/radvd.nix+5−1 nixos/modules/services/networking/rdnssd.nix+3−1 nixos/modules/services/networking/resilio.nix+2 nixos/modules/services/networking/rxe.nix+2−2 nixos/modules/services/networking/sabnzbd.nix+11−1 nixos/modules/services/networking/seafile.nix+287 nixos/modules/services/networking/searx.nix+184−33 nixos/modules/services/networking/shadowsocks.nix+4−6 nixos/modules/services/networking/shairport-sync.nix+31−2 nixos/modules/services/networking/shellhub-agent.nix+100 nixos/modules/services/networking/shorewall.nix+1−1 nixos/modules/services/networking/shorewall6.nix+1−1 nixos/modules/services/networking/shout.nix+4−2 nixos/modules/services/networking/skydns.nix+2−1 nixos/modules/services/networking/smartdns.nix+2−1 nixos/modules/services/networking/smokeping.nix+74−32 nixos/modules/services/networking/sniproxy.nix+6−17 nixos/modules/services/networking/snowflake-proxy.nix+81 nixos/modules/services/networking/softether.nix+1−1 nixos/modules/services/networking/soju.nix+114 nixos/modules/services/networking/solanum.nix+109 nixos/modules/services/networking/spacecookie.nix+147−14 nixos/modules/services/networking/spiped.nix+1−1 nixos/modules/services/networking/squid.nix+23−4 nixos/modules/services/networking/ssh/lshd.nix+12−6 nixos/modules/services/networking/ssh/sshd.nix+44−23 nixos/modules/services/networking/sslh.nix+1−1 nixos/modules/services/networking/strongswan-swanctl/module.nix+2−2 nixos/modules/services/networking/strongswan-swanctl/swanctl-params.nix+11−1 nixos/modules/services/networking/strongswan.nix+3−3 nixos/modules/services/networking/stubby.nix+46−174 nixos/modules/services/networking/stunnel.nix+3−2 nixos/modules/services/networking/supplicant.nix+5−14 nixos/modules/services/networking/supybot.nix+5−3 nixos/modules/services/networking/syncplay.nix+19−3 nixos/modules/services/networking/syncthing.nix+372−308 nixos/modules/services/networking/tailscale.nix+28−3 nixos/modules/services/networking/teamspeak3.nix+20−2 nixos/modules/services/networking/tedicross.nix+1−1 nixos/modules/services/networking/teleport.nix+99 nixos/modules/services/networking/tetrd.nix+96 nixos/modules/services/networking/thelounge.nix+39−8 nixos/modules/services/networking/tinc.nix+233−18 nixos/modules/services/networking/tinydns.nix+5−1 nixos/modules/services/networking/tox-bootstrapd.nix+8−13 nixos/modules/services/networking/tox-node.nix+1−6 nixos/modules/services/networking/toxvpn.nix+4−2 nixos/modules/services/networking/trickster.nix+1−1 nixos/modules/services/networking/tvheadend.nix+3−1 nixos/modules/services/networking/ucarp.nix+183 nixos/modules/services/networking/unbound.nix+177−82 nixos/modules/services/networking/unifi.nix+80−60 nixos/modules/services/networking/v2ray.nix+15−7 nixos/modules/services/networking/vsftpd.nix+5−2 nixos/modules/services/networking/wakeonlan.nix−56 nixos/modules/services/networking/wasabibackend.nix+4−2 nixos/modules/services/networking/websockify.nix+1−1 nixos/modules/services/networking/wg-netmanager.nix+42 nixos/modules/services/networking/wg-quick.nix+12−13 nixos/modules/services/networking/wicd.nix−40 nixos/modules/services/networking/wireguard.nix+104−54 nixos/modules/services/networking/wpa_supplicant.nix+355−83 nixos/modules/programs/x2goserver.nix → nixos/modules/services/networking/x2goserver.nix+24−9 nixos/modules/services/networking/xandikos.nix+2−2 nixos/modules/services/networking/xrdp.nix+17−3 nixos/modules/services/networking/yggdrasil.nix+3−4 nixos/modules/services/networking/yggdrasil.xml−1 nixos/modules/services/networking/zerobin.nix+1−1 nixos/modules/services/networking/zeronet.nix+5−7 nixos/modules/services/networking/zerotierone.nix+1−2 nixos/modules/services/networking/znc/default.nix+36−9 nixos/modules/services/networking/znc/options.nix+6−6 nixos/modules/services/printing/cupsd.nix+2−2 nixos/modules/services/scheduling/atd.nix+6−9 nixos/modules/services/scheduling/cron.nix+7−2 nixos/modules/services/scheduling/fcron.nix+3 nixos/modules/services/search/elasticsearch-curator.nix+1 nixos/modules/services/search/elasticsearch.nix+43−12 nixos/modules/services/search/hound.nix+13−11 nixos/modules/services/search/kibana.nix+9−4 nixos/modules/services/search/meilisearch.md+39 nixos/modules/services/search/meilisearch.nix+132 nixos/modules/services/search/meilisearch.xml+85 nixos/modules/services/search/solr.nix+1−1 nixos/modules/services/security/aesmd.nix+236 nixos/modules/services/security/bitwarden_rs/default.nix−162 nixos/modules/services/security/certmgr.nix+2−2 nixos/modules/services/security/cfssl.nix+56−43 nixos/modules/services/security/clamav.nix+37−33 nixos/modules/services/security/fail2ban.nix+41−7 nixos/modules/services/security/fprintd.nix+22−12 nixos/modules/services/security/fprot.nix−79 nixos/modules/services/security/haka.nix+1−1 nixos/modules/services/security/haveged.nix+39−29 nixos/modules/services/security/hockeypuck.nix+106 nixos/modules/services/security/hologram-agent.nix+1−1 nixos/modules/services/security/nginx-sso.nix+2−2 nixos/modules/services/security/oauth2_proxy.nix+13−7 nixos/modules/services/security/oauth2_proxy_nginx.nix+5−3 nixos/modules/services/security/opensnitch.nix+125 nixos/modules/services/security/physlock.nix+6−4 nixos/modules/services/security/privacyidea.nix+40−9 nixos/modules/services/security/shibboleth-sp.nix+1−1 nixos/modules/services/security/sks.nix+2−2 nixos/modules/services/security/sshguard.nix+24−18 nixos/modules/services/security/sslmate-agent.nix+32 nixos/modules/services/security/step-ca.nix+146 nixos/modules/services/security/tor.nix+858−590 nixos/modules/services/security/torsocks.nix+1 nixos/modules/services/security/usbguard.nix+2−2 nixos/modules/services/security/vault.nix+52−4 nixos/modules/services/security/bitwarden_rs/backup.sh → nixos/modules/services/security/vaultwarden/backup.sh+1−1 nixos/modules/services/security/vaultwarden/default.nix+185 nixos/modules/services/security/yubikey-agent.nix+8−2 nixos/modules/services/system/cachix-agent/default.nix+57 nixos/modules/services/system/cloud-init.nix+17−3 nixos/modules/services/system/earlyoom.nix+134−97 nixos/modules/services/system/kerberos/heimdal.nix+1−1 nixos/modules/services/system/localtime.nix+6−5 nixos/modules/services/system/nscd.nix+20−9 nixos/modules/services/system/saslauthd.nix+1−1 nixos/modules/services/system/self-deploy.nix+173 nixos/modules/services/system/systembus-notify.nix+27 nixos/modules/services/system/uptimed.nix+7−3 nixos/modules/services/torrent/deluge.nix+10−2 nixos/modules/services/torrent/flexget.nix+1−1 nixos/modules/services/torrent/magnetico.nix+3−1 nixos/modules/services/torrent/opentracker.nix+1−1 nixos/modules/services/torrent/peerflix.nix+8−2 nixos/modules/services/torrent/rtorrent.nix+4−2 nixos/modules/services/torrent/transmission.nix+257−223 nixos/modules/services/ttys/agetty.nix−117 nixos/modules/services/ttys/getty.nix+162 nixos/modules/services/ttys/kmscon.nix+26−10 nixos/modules/services/video/epgstation/default.nix+193−154 nixos/modules/services/video/epgstation/streaming.json+129−108 nixos/modules/services/video/mirakurun.nix+27−6 nixos/modules/services/video/replay-sorcery.nix+72 nixos/modules/services/video/rtsp-simple-server.nix+80 nixos/modules/services/video/unifi-video.nix+271 nixos/modules/services/wayland/cage.nix+8−3 nixos/modules/services/web-apps/atlassian/confluence.nix+2−2 nixos/modules/services/web-apps/atlassian/crowd.nix+2−2 nixos/modules/services/web-apps/atlassian/jira.nix+3−2 nixos/modules/services/web-apps/baget.nix+170 nixos/modules/services/web-apps/bookstack.nix+449 nixos/modules/services/web-apps/calibre-web.nix+165 nixos/modules/services/web-apps/code-server.nix+139 nixos/modules/services/web-apps/codimd.nix−962 nixos/modules/services/web-apps/cryptpad.nix+2−2 nixos/modules/services/web-apps/dex.nix+118 nixos/modules/services/web-apps/discourse.nix+1093 nixos/modules/services/web-apps/discourse.xml+355 nixos/modules/services/web-apps/documize.nix+1 nixos/modules/services/web-apps/dokuwiki.nix+325−274 nixos/modules/services/web-apps/engelsystem.nix+3−3 nixos/modules/services/web-apps/ethercalc.nix+62 nixos/modules/services/web-apps/fluidd.nix+66 nixos/modules/services/web-apps/frab.nix−222 nixos/modules/services/web-apps/galene.nix+214 nixos/modules/services/web-apps/gerrit.nix+4−1 nixos/modules/services/web-apps/grocy.nix+3−3 nixos/modules/services/web-apps/hedgedoc.nix+1038 nixos/modules/services/web-apps/hledger-web.nix+142 nixos/modules/services/web-apps/icingaweb2/icingaweb2.nix+19−1 nixos/modules/services/web-apps/ihatemoney/default.nix+20−8 nixos/modules/services/web-apps/invidious.nix+264 nixos/modules/services/web-apps/invoiceplane.nix+305 nixos/modules/services/web-apps/isso.nix+69 nixos/modules/services/web-apps/jirafeau.nix+10−6 nixos/modules/services/web-apps/jitsi-meet.nix+130−12 nixos/modules/services/web-apps/jitsi-meet.xml+2−2 nixos/modules/services/web-apps/keycloak.nix+575−584 nixos/modules/services/web-apps/keycloak.xml+82−85 nixos/modules/services/web-apps/lemmy.md+34 nixos/modules/services/web-apps/lemmy.nix+236 nixos/modules/services/web-apps/lemmy.xml+56 nixos/modules/services/web-apps/limesurvey.nix+5−5 nixos/modules/services/web-apps/mastodon.nix+638 nixos/modules/services/web-apps/matomo.nix+44−15 nixos/modules/services/web-apps/mattermost.nix+145−37 nixos/modules/services/web-apps/mediawiki.nix+7−5 nixos/modules/services/web-apps/miniflux.nix+62−32 nixos/modules/services/web-apps/moinmoin.nix−304 nixos/modules/services/web-apps/moodle.nix+8−8 nixos/modules/services/web-apps/netbox.nix+265 nixos/modules/services/web-apps/nextcloud.nix+467−98 nixos/modules/services/web-apps/nextcloud.xml+107−40 nixos/modules/services/web-apps/nexus.nix+22 nixos/modules/services/web-apps/nifi.nix+318 nixos/modules/services/web-apps/node-red.nix+149 nixos/modules/services/web-apps/openwebrx.nix+34 nixos/modules/services/web-apps/peertube.nix+475 nixos/modules/services/web-apps/pgpkeyserver-lite.nix+5−2 nixos/modules/services/web-apps/pict-rs.md+88 nixos/modules/services/web-apps/pict-rs.nix+50 nixos/modules/services/web-apps/pict-rs.xml+162 nixos/modules/services/web-apps/plantuml-server.nix+140 nixos/modules/services/web-apps/plausible.nix+292 nixos/modules/services/web-apps/plausible.xml+51 nixos/modules/services/web-apps/powerdns-admin.nix+152 nixos/modules/services/web-apps/prosody-filer.nix+86 nixos/modules/services/web-apps/restya-board.nix+1−4 nixos/modules/services/web-apps/rss-bridge.nix+2−4 nixos/modules/services/web-apps/selfoss.nix−1 nixos/modules/services/web-apps/shiori.nix+2−5 nixos/modules/services/web-apps/timetagger.nix+80 nixos/modules/services/web-apps/trac.nix−79 nixos/modules/services/web-apps/trilium.nix+11−2 nixos/modules/services/web-apps/tt-rss.nix+97−88 nixos/modules/services/web-apps/vikunja.nix+145 nixos/modules/services/web-apps/whitebophir.nix+52 nixos/modules/services/web-apps/wiki-js.nix+139 nixos/modules/services/web-apps/wordpress.nix+175−61 nixos/modules/services/web-apps/youtrack.nix+3−2 nixos/modules/services/web-apps/zabbix.nix+26−5 nixos/modules/services/web-servers/agate.nix+148 nixos/modules/services/web-servers/apache-httpd/default.nix+72−39 nixos/modules/services/web-servers/apache-httpd/vhost-options.nix+27−7 nixos/modules/services/web-servers/caddy.nix−138 nixos/modules/services/web-servers/caddy/default.nix+339 nixos/modules/services/web-servers/caddy/vhost-options.nix+79 nixos/modules/services/web-servers/darkhttpd.nix+1−1 nixos/modules/services/web-servers/hydron.nix+1−1 nixos/modules/services/web-servers/jboss/default.nix+6 nixos/modules/services/web-servers/lighttpd/cgit.nix+7−5 nixos/modules/services/web-servers/lighttpd/collectd.nix+5−1 nixos/modules/services/web-servers/lighttpd/default.nix+15−3 nixos/modules/services/web-servers/minio.nix+34−12 nixos/modules/services/web-servers/molly-brown.nix+1−2 nixos/modules/services/web-servers/nginx/default.nix+246−39 nixos/modules/services/web-servers/nginx/gitweb.nix+2−2 nixos/modules/services/web-servers/nginx/location-options.nix+12−2 nixos/modules/services/web-servers/nginx/vhost-options.nix+74−9 nixos/modules/services/web-servers/phpfpm/default.nix+5−5 nixos/modules/services/web-servers/pomerium.nix+135 nixos/modules/services/web-servers/shellinabox.nix−122 nixos/modules/services/web-servers/tomcat.nix+7−5 nixos/modules/services/web-servers/traefik.nix+3−3 nixos/modules/services/web-servers/trafficserver/default.nix+310 nixos/modules/services/web-servers/trafficserver/ip_allow.json+36 nixos/modules/services/web-servers/trafficserver/logging.json+37 nixos/modules/services/web-servers/ttyd.nix+2−2 nixos/modules/services/web-servers/unit/default.nix+4−2 nixos/modules/services/web-servers/uwsgi.nix+69−23 nixos/modules/services/web-servers/varnish/default.nix+9−7 nixos/modules/services/web-servers/zope2.nix+6−2 nixos/modules/services/x11/clight.nix+27−11 nixos/modules/services/x11/desktop-managers/cde.nix+5−4 nixos/modules/services/x11/desktop-managers/cinnamon.nix+25−12 nixos/modules/services/x11/desktop-managers/default.nix+1−1 nixos/modules/services/x11/desktop-managers/enlightenment.nix+24−3 nixos/modules/services/x11/desktop-managers/gnome.nix+582 nixos/modules/services/x11/desktop-managers/gnome.xml+253 nixos/modules/services/x11/desktop-managers/gnome3.nix−501 nixos/modules/services/x11/desktop-managers/kodi.nix+12−2 nixos/modules/services/x11/desktop-managers/lumina.nix+4 nixos/modules/services/x11/desktop-managers/lxqt.nix+13−4 nixos/modules/services/x11/desktop-managers/mate.nix+12−40 nixos/modules/services/x11/desktop-managers/none.nix+44−5 nixos/modules/services/x11/desktop-managers/pantheon.nix+45−29 nixos/modules/services/x11/desktop-managers/pantheon.xml+11−5 nixos/modules/services/x11/desktop-managers/plasma5.nix+335−135 nixos/modules/services/x11/desktop-managers/retroarch.nix+40 nixos/modules/services/x11/desktop-managers/surf-display.nix+2−1 nixos/modules/services/x11/desktop-managers/xfce.nix+17−10 nixos/modules/services/x11/desktop-managers/xterm.nix+2−2 nixos/modules/services/x11/display-managers/account-service-util.nix+1−1 nixos/modules/services/x11/display-managers/default.nix+33−23 nixos/modules/services/x11/display-managers/gdm.nix+59−64 nixos/modules/services/x11/display-managers/lightdm-greeters/enso-os.nix+4−4 nixos/modules/services/x11/display-managers/lightdm-greeters/gtk.nix+7−6 nixos/modules/services/x11/display-managers/lightdm-greeters/pantheon.nix+2−2 nixos/modules/services/x11/display-managers/lightdm.nix+8−6 nixos/modules/services/x11/display-managers/sddm.nix+100−97 nixos/modules/services/x11/display-managers/set-session.py+3 nixos/modules/services/x11/display-managers/startx.nix+12−3 nixos/modules/services/x11/display-managers/sx.nix+34 nixos/modules/services/x11/extra-layouts.nix+9−48 nixos/modules/services/x11/hardware/libinput.nix+79−40 nixos/modules/services/x11/hardware/synaptics.nix+6−1 nixos/modules/services/x11/imwheel.nix+11−9 nixos/modules/services/x11/picom.nix+13−3 nixos/modules/services/x11/redshift.nix+1−1 nixos/modules/services/x11/touchegg.nix+38 nixos/modules/services/x11/unclutter-xfixes.nix+1−1 nixos/modules/services/x11/unclutter.nix+1−1 nixos/modules/services/x11/urxvtd.nix+1−1 nixos/modules/services/x11/window-managers/awesome.nix+1−1 nixos/modules/services/x11/window-managers/bspwm.nix+6−6 nixos/modules/services/x11/window-managers/clfswm.nix+13−3 nixos/modules/services/x11/window-managers/default.nix+4 nixos/modules/services/x11/window-managers/e16.nix+26 nixos/modules/services/x11/window-managers/exwm.nix+19−4 nixos/modules/services/x11/window-managers/fvwm.nix+1−1 nixos/modules/services/x11/window-managers/herbstluftwm.nix+11−2 nixos/modules/services/x11/window-managers/i3.nix+3−3 nixos/modules/services/x11/window-managers/metacity.nix+3−3 nixos/modules/services/x11/window-managers/mlvwm.nix+41 nixos/modules/services/x11/window-managers/qtile.nix+11−4 nixos/modules/services/x11/window-managers/wmderland.nix+61 nixos/modules/services/x11/window-managers/xmonad.nix+88−33 nixos/modules/services/x11/xautolock.nix+4−3 nixos/modules/services/x11/xserver.nix+97−47 nixos/modules/system/activation/activation-script.nix+77−46 nixos/modules/system/activation/switch-to-configuration.pl+698−255 nixos/modules/system/activation/top-level.nix+101−37 nixos/modules/system/boot/binfmt.nix+59−11 nixos/modules/system/boot/initrd-openvpn.nix+2−2 nixos/modules/system/boot/initrd-ssh.nix+7−2 nixos/modules/system/boot/kernel.nix+31−16 nixos/modules/system/boot/kernel_config.nix+2−22 nixos/modules/system/boot/kexec.nix+3−3 nixos/modules/system/boot/loader/generations-dir/generations-dir.nix+1−4 nixos/modules/system/boot/loader/generic-extlinux-compatible/default.nix+18−1 nixos/modules/system/boot/loader/generic-extlinux-compatible/extlinux-conf-builder.sh+9−3 nixos/modules/system/boot/loader/grub/grub.nix+63−10 nixos/modules/system/boot/loader/grub/install-grub.pl+71−43 nixos/modules/system/boot/loader/grub/ipxe.nix+1−1 nixos/modules/system/boot/loader/init-script/init-script-builder.sh−1 nixos/modules/system/boot/loader/raspberrypi/raspberrypi-builder.nix+2−3 nixos/modules/system/boot/loader/raspberrypi/raspberrypi.nix+3−6 nixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py+130−70 nixos/modules/system/boot/loader/systemd-boot/systemd-boot.nix+165−5 nixos/modules/system/boot/luksroot.nix+180−69 nixos/modules/system/boot/modprobe.nix+2 nixos/modules/system/boot/networkd.nix+434−28 nixos/modules/system/boot/plymouth.nix+83−19 nixos/modules/system/boot/resolved.nix+3−1 nixos/modules/system/boot/stage-1-init.sh+66−54 nixos/modules/system/boot/stage-1.nix+148−31 nixos/modules/system/boot/stage-2-init.sh+71−99 nixos/modules/system/boot/stage-2.nix+9−33 nixos/modules/system/boot/systemd-lib.nix−235 nixos/modules/system/boot/systemd-nspawn.nix−133 nixos/modules/system/boot/systemd-unit-options.nix−536 nixos/modules/system/boot/systemd.nix+96−663 nixos/modules/system/boot/systemd/coredump.nix+57 nixos/modules/system/boot/systemd/initrd-secrets.nix+36 nixos/modules/system/boot/systemd/initrd.nix+502 nixos/modules/system/boot/systemd/journald.nix+131 nixos/modules/system/boot/systemd/logind.nix+114 nixos/modules/system/boot/systemd/nspawn.nix+131 nixos/modules/system/boot/systemd/shutdown.nix+58 nixos/modules/system/boot/systemd/tmpfiles.nix+120 nixos/modules/system/boot/systemd/user.nix+153 nixos/modules/system/boot/timesyncd.nix+20−5 nixos/modules/system/boot/tmp.nix+26−1 nixos/modules/system/build.nix+21 nixos/modules/system/etc/etc-activation.nix+12 nixos/modules/system/etc/etc.nix+61−22 nixos/modules/system/etc/make-etc.sh−45 nixos/modules/system/etc/setup-etc.pl+6 nixos/modules/system/etc/test.nix+70 nixos/modules/tasks/auto-upgrade.nix+105−20 nixos/modules/tasks/bcache.nix+16−6 nixos/modules/tasks/cpu-freq.nix+1−1 nixos/modules/tasks/encrypted-devices.nix+1−1 nixos/modules/tasks/filesystems.nix+96−13 nixos/modules/tasks/filesystems/apfs.nix+22 nixos/modules/tasks/filesystems/bcachefs.nix+2−2 nixos/modules/tasks/filesystems/btrfs.nix+14−5 nixos/modules/tasks/filesystems/cifs.nix+1−1 nixos/modules/tasks/filesystems/ecryptfs.nix+12−2 nixos/modules/tasks/filesystems/exfat.nix+5−3 nixos/modules/tasks/filesystems/ext.nix+10−4 nixos/modules/tasks/filesystems/f2fs.nix+1−1 nixos/modules/tasks/filesystems/jfs.nix+1−1 nixos/modules/tasks/filesystems/nfs.nix+1−1 nixos/modules/tasks/filesystems/reiserfs.nix+1−1 nixos/modules/tasks/filesystems/unionfs-fuse.nix+13−2 nixos/modules/tasks/filesystems/vfat.nix+1−1 nixos/modules/tasks/filesystems/xfs.nix+2−2 nixos/modules/tasks/filesystems/zfs.nix+169−67 nixos/modules/tasks/lvm.nix+73−14 nixos/modules/tasks/network-interfaces-scripted.nix+80−9 nixos/modules/tasks/network-interfaces-systemd.nix+116−6 nixos/modules/tasks/network-interfaces.nix+346−68 nixos/modules/tasks/snapraid.nix+230 nixos/modules/tasks/swraid.nix+35−9 nixos/modules/tasks/trackpoint.nix+5−4 nixos/modules/testing/service-runner.nix+3−3 nixos/modules/testing/test-instrumentation.nix+32−32 nixos/modules/virtualisation/amazon-ec2-amis.nix+444 nixos/modules/virtualisation/amazon-image.nix+33−10 nixos/modules/virtualisation/amazon-init.nix+40−13 nixos/modules/virtualisation/amazon-options.nix+54−1 nixos/modules/virtualisation/anbox.nix+1−2 nixos/modules/virtualisation/azure-agent.nix+6−10 nixos/modules/virtualisation/azure-common.nix+5−1 nixos/modules/virtualisation/azure-image.nix+3−2 nixos/modules/virtualisation/brightbox-image.nix+1−1 nixos/modules/virtualisation/build-vm.nix+58 nixos/modules/virtualisation/container-config.nix+1−1 nixos/modules/virtualisation/containerd.nix+101 nixos/modules/virtualisation/containers.nix+52−34 nixos/modules/virtualisation/cri-o.nix+49−27 nixos/modules/virtualisation/digital-ocean-image.nix+3−2 nixos/modules/virtualisation/digital-ocean-init.nix+1−1 nixos/modules/virtualisation/docker-rootless.nix+102 nixos/modules/virtualisation/docker.nix+40−12 nixos/modules/virtualisation/ec2-amis.nix+9−352 nixos/modules/virtualisation/ec2-data.nix+1−1 nixos/modules/virtualisation/ec2-metadata-fetcher.nix+1−1 nixos/modules/virtualisation/ecs-agent.nix+1−1 nixos/modules/virtualisation/gce-images.nix+9−1 nixos/modules/virtualisation/google-compute-config.nix+33−79 nixos/modules/virtualisation/google-compute-image.nix+14−4 nixos/modules/virtualisation/hyperv-guest.nix+5−3 nixos/modules/virtualisation/hyperv-image.nix+3−2 nixos/modules/virtualisation/kubevirt.nix+30 nixos/modules/virtualisation/kvmgt.nix+1−1 nixos/modules/virtualisation/libvirtd.nix+184−68 nixos/modules/virtualisation/lxc-container.nix+161−13 nixos/modules/virtualisation/lxc.nix+8−4 nixos/modules/virtualisation/lxd.nix+65−33 nixos/modules/virtualisation/nixos-containers.nix+102−65 nixos/modules/virtualisation/oci-containers.nix+82−40 nixos/modules/virtualisation/openstack-config.nix+39−7 nixos/modules/virtualisation/openstack-metadata-fetcher.nix+5−4 nixos/modules/virtualisation/openstack-options.nix+71 nixos/modules/virtualisation/openvswitch.nix+10−55 nixos/modules/virtualisation/parallels-guest.nix+1−2 nixos/modules/virtualisation/podman.nix−98 nixos/modules/virtualisation/podman/default.nix+187 nixos/modules/virtualisation/podman/dnsname.nix+36 nixos/modules/virtualisation/podman/network-socket-ghostunnel.nix+34 nixos/modules/virtualisation/podman/network-socket.nix+95 nixos/modules/virtualisation/proxmox-image.nix+169 nixos/modules/virtualisation/proxmox-lxc.nix+64 nixos/modules/virtualisation/qemu-guest-agent.nix+6−2 nixos/modules/virtualisation/qemu-vm.nix+377−88 nixos/modules/virtualisation/railcar.nix+4−5 nixos/modules/virtualisation/spice-usb-redirection.nix+4−2 nixos/modules/virtualisation/virtualbox-guest.nix+2−2 nixos/modules/virtualisation/virtualbox-host.nix+10−2 nixos/modules/virtualisation/virtualbox-image.nix+25−4 nixos/modules/virtualisation/vmware-guest.nix+27−1 nixos/modules/virtualisation/vmware-host.nix+166 nixos/modules/virtualisation/vmware-image.nix+3−2 nixos/modules/virtualisation/waydroid.nix+75 nixos/modules/virtualisation/xe-guest-utilities.nix+1−1 nixos/modules/virtualisation/xen-dom0.nix+9−10 nixos/release-combined.nix+9−5 nixos/release-small.nix+4−2 nixos/release.nix+75−16 nixos/tests/3proxy.nix+1−1 nixos/tests/acme.nix+404−177 nixos/tests/adguardhome.nix+57 nixos/tests/aesmd.nix+62 nixos/tests/agda.nix+16−7 nixos/tests/airsonic.nix+28 nixos/tests/all-terminfo.nix+31 nixos/tests/all-tests.nix+272−58 nixos/tests/amazon-init-shell.nix+40 nixos/tests/ammonite.nix−20 nixos/tests/apfs.nix+54 nixos/tests/apparmor.nix+82 nixos/tests/atd.nix+2−2 nixos/tests/atop.nix+226 nixos/tests/avahi.nix+2−2 nixos/tests/babeld.nix+1−7 nixos/tests/bazarr.nix+1−1 nixos/tests/bcachefs.nix+8−9 nixos/tests/beanstalkd.nix+1−1 nixos/tests/bees.nix+2−2 nixos/tests/bind.nix+2−1 nixos/tests/bird.nix+129 nixos/tests/bitcoind.nix+2−2 nixos/tests/bittorrent.nix+2−2 nixos/tests/bitwarden.nix−188 nixos/tests/blockbook-frontend.nix+2−2 nixos/tests/blocky.nix+34 nixos/tests/boot-stage1.nix+4−2 nixos/tests/boot.nix+61−18 nixos/tests/borgbackup.nix+35−2 nixos/tests/botamusique.nix+51 nixos/tests/bpf.nix+29 nixos/tests/breitbandmessung.nix+33 nixos/tests/brscan5.nix+43 nixos/tests/btrbk.nix+110 nixos/tests/buildbot.nix+1−1 nixos/tests/buildkite-agents.nix+2−2 nixos/tests/caddy.nix+57−41 nixos/tests/cadvisor.nix+1−1 nixos/tests/cage.nix+7−14 nixos/tests/cagebreak.nix+26−55 nixos/tests/calibre-web.nix+43 nixos/tests/cassandra.nix+6−5 nixos/tests/ceph-multi-node.nix+3−3 nixos/tests/ceph-single-node-bluestore.nix+196 nixos/tests/ceph-single-node.nix+2−2 nixos/tests/cfssl.nix+1−1 nixos/tests/charliecloud.nix+1−1 nixos/tests/chromium.nix+132−138 nixos/tests/cjdns.nix+1−1 nixos/tests/clickhouse.nix+3−2 nixos/tests/cloud-init.nix+39−12 nixos/tests/cntr.nix+75 nixos/tests/cockroachdb.nix+1−1 nixos/tests/codimd.nix−60 nixos/tests/collectd.nix+38 nixos/tests/common/acme/client/default.nix+4−2 nixos/tests/common/acme/server/default.nix+5 nixos/tests/common/ec2.nix+1 nixos/tests/common/lxd/config.yaml+24 nixos/tests/common/wayland-cage.nix+13 nixos/tests/containers-bridge.nix+5−8 nixos/tests/containers-custom-pkgs.nix+23−31 nixos/tests/containers-ephemeral.nix+8−8 nixos/tests/containers-extra_veth.nix+5−8 nixos/tests/containers-hosts.nix+4−7 nixos/tests/containers-imperative.nix+33−16 nixos/tests/containers-ip.nix+5−8 nixos/tests/containers-macvlans.nix+3−7 nixos/tests/containers-names.nix+37 nixos/tests/containers-nested.nix+30 nixos/tests/containers-physical_interfaces.nix+3−8 nixos/tests/containers-portforward.nix+5−8 nixos/tests/containers-reloadable.nix+3−4 nixos/tests/containers-restart_networking.nix+3−5 nixos/tests/containers-tmpfs.nix+10−13 nixos/tests/convos.nix+1−1 nixos/tests/coturn.nix+29 nixos/tests/couchdb.nix+4−39 nixos/tests/cri-o.nix+1−1 nixos/tests/croc.nix+51 nixos/tests/cryptpad.nix+18 nixos/tests/custom-ca.nix+193 nixos/tests/deluge.nix+12−58 nixos/tests/dendrite.nix+99 nixos/tests/dex-oidc.nix+78 nixos/tests/disable-installer-tools.nix+29 nixos/tests/discourse.nix+201 nixos/tests/dnscrypt-proxy2.nix+1−1 nixos/tests/dnscrypt-wrapper/default.nix+2−1 nixos/tests/dnsdist.nix+48 nixos/tests/doas.nix+16−1 nixos/tests/docker-edge.nix+1−1 nixos/tests/docker-registry.nix+1−1 nixos/tests/docker-rootless.nix+41 nixos/tests/docker-tools-cross.nix+76 nixos/tests/docker-tools-overlay.nix+2−2 nixos/tests/docker-tools.nix+183−10 nixos/tests/docker.nix+4−1 nixos/tests/documize.nix+2−2 nixos/tests/doh-proxy-rust.nix+43 nixos/tests/dokuwiki.nix+63−28 nixos/tests/domination.nix+26 nixos/tests/dovecot.nix+8−3 nixos/tests/drbd.nix+87 nixos/tests/earlyoom.nix+16 nixos/tests/ec2.nix+5 nixos/tests/ecryptfs.nix+1−1 nixos/tests/elk.nix+133−41 nixos/tests/emacs-daemon.nix+3−3 nixos/tests/empty-file nixos/tests/engelsystem.nix+1−1 nixos/tests/enlightenment.nix+5−6 nixos/tests/env.nix+2−2 nixos/tests/envoy.nix+33 nixos/tests/ergo.nix+1−1 nixos/tests/ergochat.nix+97 nixos/tests/etcd-cluster.nix+1−1 nixos/tests/etcd.nix+1−1 nixos/tests/etebase-server.nix+50 nixos/tests/etesync-dav.nix+21 nixos/tests/fancontrol.nix+23−17 nixos/tests/fcitx/default.nix+1−2 nixos/tests/fenics.nix+2−3 nixos/tests/ferm.nix+1−1 nixos/tests/firefox.nix+10−12 nixos/tests/firejail.nix+10−1 nixos/tests/firewall.nix+1−1 nixos/tests/fish.nix+1−1 nixos/tests/fluentd.nix+1−1 nixos/tests/fluidd.nix+21 nixos/tests/fontconfig-default-fonts.nix+1−2 nixos/tests/freeswitch.nix+1−1 nixos/tests/frr.nix+104 nixos/tests/fsck.nix+2−2 nixos/tests/ft2-clone.nix+2−2 nixos/tests/gerrit.nix+1−2 nixos/tests/geth.nix+41 nixos/tests/ghostunnel.nix+103 nixos/tests/git/hub.nix+17 nixos/tests/gitdaemon.nix+6−2 nixos/tests/gitea.nix+2−1 nixos/tests/gitlab.nix+401−60 nixos/tests/gitolite-fcgiwrap.nix+3−3 nixos/tests/gitolite.nix+1−1 nixos/tests/glusterfs.nix+2−2 nixos/tests/gnome-xorg.nix+96 nixos/tests/gnome.nix+97 nixos/tests/gnome3-xorg.nix−81 nixos/tests/gnome3.nix−82 nixos/tests/go-neb.nix+7−7 nixos/tests/gobgpd.nix+71 nixos/tests/gocd-agent.nix+2−2 nixos/tests/gocd-server.nix+1−1 nixos/tests/google-oslogin/default.nix+3−3 nixos/tests/google-oslogin/server.nix+2−4 nixos/tests/google-oslogin/server.py nixos/tests/gotify-server.nix+2−2 nixos/tests/grafana.nix+16−4 nixos/tests/graphite.nix−1 nixos/tests/graylog.nix+2−2 nixos/tests/grocy.nix+3−3 nixos/tests/grub.nix+1−1 nixos/tests/gvisor.nix+1−1 nixos/tests/hadoop/default.nix+7 nixos/tests/hadoop/hadoop.nix+255 nixos/tests/hadoop/hdfs.nix+57−27 nixos/tests/hadoop/yarn.nix+22−23 nixos/tests/haka.nix+1−1 nixos/tests/handbrake.nix−31 nixos/tests/haproxy.nix−1 nixos/tests/hardened.nix+8−44 nixos/tests/haste-server.nix+23 nixos/tests/hbase.nix+30 nixos/tests/hedgedoc.nix+60 nixos/tests/herbstluftwm.nix+37 nixos/tests/hibernate.nix+113−24 nixos/tests/hitch/default.nix+2−2 nixos/tests/hledger-web.nix+50 nixos/tests/hocker-fetchdocker/default.nix+2−2 nixos/tests/hockeypuck.nix+63 nixos/tests/home-assistant.nix+95−36 nixos/tests/hostname.nix+12−6 nixos/tests/hound.nix+2−2 nixos/tests/hydra/common.nix+2−2 nixos/tests/hydra/default.nix+3−3 nixos/tests/i3wm.nix+2−2 nixos/tests/icingaweb2.nix+1−1 nixos/tests/iftop.nix+1−1 nixos/tests/ihatemoney.nix−62 nixos/tests/ihatemoney/default.nix+78 nixos/tests/ihatemoney/rates.json+39 nixos/tests/ihatemoney/server.crt+28 nixos/tests/ihatemoney/server.key+52 nixos/tests/image-contents.nix+51 nixos/tests/incron.nix+1−1 nixos/tests/influxdb.nix+1−1 nixos/tests/initrd-network.nix+2−2 nixos/tests/initrd-secrets.nix+41 nixos/tests/input-remapper.nix+52 nixos/tests/inspircd.nix+93 nixos/tests/installed-tests/appstream-qt.nix+9 nixos/tests/installed-tests/appstream.nix+9 nixos/tests/installed-tests/default.nix+5−1 nixos/tests/installed-tests/flatpak.nix+1 nixos/tests/installed-tests/fwupd.nix−1 nixos/tests/installed-tests/gjs.nix+6 nixos/tests/installed-tests/gnome-photos.nix+1−1 nixos/tests/installed-tests/libgdata.nix+1−1 nixos/tests/installed-tests/librsvg.nix+9 nixos/tests/installed-tests/pipewire.nix+10 nixos/tests/installed-tests/power-profiles-daemon.nix+9 nixos/tests/installer-systemd-stage-1.nix+33 nixos/tests/installer.nix+67−54 nixos/tests/invidious.nix+81 nixos/tests/invoiceplane.nix+82 nixos/tests/ipfs.nix+6−1 nixos/tests/ipv6.nix+63−24 nixos/tests/iscsi-multipath-root.nix+267 nixos/tests/iscsi-root.nix+161 nixos/tests/isso.nix+30 nixos/tests/jellyfin.nix+155−16 nixos/tests/jenkins-cli.nix+30 nixos/tests/jenkins.nix+86−3 nixos/tests/jibri.nix+69 nixos/tests/jitsi-meet.nix+3−9 nixos/tests/k3s-single-node-docker.nix+84 nixos/tests/k3s-single-node.nix+82 nixos/tests/k3s.nix−78 nixos/tests/kafka.nix+3−18 nixos/tests/kbd-setfont-decompress.nix+21 nixos/tests/kbd-update-search-paths-patch.nix+19 nixos/tests/kea.nix+73 nixos/tests/keepassxc.nix+68 nixos/tests/kerberos/heimdal.nix+2−2 nixos/tests/kerberos/mit.nix+1−1 nixos/tests/kernel-generic.nix+41 nixos/tests/kernel-latest-ath-user-regd.nix+17 nixos/tests/kernel-latest.nix−17 nixos/tests/kernel-lts.nix−17 nixos/tests/kernel-testing.nix−17 nixos/tests/kexec.nix+44−19 nixos/tests/keycloak.nix+47−11 nixos/tests/keymap.nix+25−4 nixos/tests/knot.nix+7−1 nixos/tests/krb5/deprecated-config.nix+2−2 nixos/tests/krb5/example-config.nix+2−2 nixos/tests/ksm.nix+22 nixos/tests/kubernetes/base.nix+3−4 nixos/tests/kubernetes/default.nix+13−5 nixos/tests/kubernetes/dns.nix+10−11 nixos/tests/kubernetes/e2e.nix+1−1 nixos/tests/kubernetes/rbac.nix+12−12 nixos/tests/leaps.nix+1−1 nixos/tests/libinput.nix+38 nixos/tests/libreddit.nix+19 nixos/tests/libresprite.nix+30 nixos/tests/libreswan.nix+134 nixos/tests/lightdm.nix+3−3 nixos/tests/limesurvey.nix+2−2 nixos/tests/litestream.nix+93 nixos/tests/locate.nix+62 nixos/tests/login.nix+3−3 nixos/tests/logrotate.nix+152 nixos/tests/loki.nix+4−2 nixos/tests/lorri/default.nix+1−1 nixos/tests/lvm2/default.nix+45 nixos/tests/lvm2/systemd-stage-1.nix+104 nixos/tests/lvm2/thinpool.nix+32 nixos/tests/lvm2/vdo.nix+27 nixos/tests/lxd-image-server.nix+94 nixos/tests/lxd-nftables.nix+2−2 nixos/tests/lxd.nix+42−65 nixos/tests/maddy.nix+58 nixos/tests/maestral.nix+72 nixos/tests/magic-wormhole-mailbox-server.nix+2−2 nixos/tests/magnetico.nix+2−2 nixos/tests/mailcatcher.nix+8−3 nixos/tests/mailhog.nix+24 nixos/tests/make-test-python.nix+1−1 nixos/tests/man.nix+100 nixos/tests/matomo.nix+2−2 nixos/tests/matrix-appservice-irc.nix+224 nixos/tests/matrix-conduit.nix+95 nixos/tests/matrix-synapse.nix+141−10 nixos/tests/matrix/mjolnir.nix+170 nixos/tests/matrix/pantalaimon.nix+88 nixos/tests/mattermost.nix+124 nixos/tests/mediawiki.nix+1−1 nixos/tests/meilisearch.nix+60 nixos/tests/memcached.nix+1−1 nixos/tests/metabase.nix+1−2 nixos/tests/minecraft-server.nix+37 nixos/tests/minecraft.nix+28 nixos/tests/minidlna.nix+4−2 nixos/tests/miniflux.nix+36−10 nixos/tests/minio.nix+5−2 nixos/tests/misc.nix+11−10 nixos/tests/mod_perl.nix+53 nixos/tests/moinmoin.nix−28 nixos/tests/molly-brown.nix+1−1 nixos/tests/mongodb.nix+5−1 nixos/tests/moodle.nix+1−1 nixos/tests/moonraker.nix+45 nixos/tests/moosefs.nix+89 nixos/tests/morty.nix+1−1 nixos/tests/mosquitto.nix+168−50 nixos/tests/mpd.nix+7−5 nixos/tests/mpv.nix+28 nixos/tests/mtp.nix+109 nixos/tests/mumble.nix+3−3 nixos/tests/munin.nix+2−2 nixos/tests/musescore.nix+86 nixos/tests/mutable-users.nix+29−1 nixos/tests/mxisd.nix+5−14 nixos/tests/mysql/common.nix+10 nixos/tests/mysql/mariadb-galera-mariabackup.nix−223 nixos/tests/mysql/mariadb-galera-rsync.nix−216 nixos/tests/mysql/mariadb-galera.nix+250 nixos/tests/mysql/mysql-autobackup.nix+48−33 nixos/tests/mysql/mysql-backup.nix+60−44 nixos/tests/mysql/mysql-replication.nix+84−74 nixos/tests/mysql/mysql.nix+134−188 nixos/tests/n8n.nix+25 nixos/tests/nagios.nix+2−2 nixos/tests/nano.nix−44 nixos/tests/nar-serve.nix+1−1 nixos/tests/nat.nix+1−1 nixos/tests/nats.nix+63 nixos/tests/navidrome.nix+12 nixos/tests/nbd.nix+103 nixos/tests/ncdns.nix+7−10 nixos/tests/ndppd.nix+1−1 nixos/tests/nebula.nix+223 nixos/tests/netdata.nix+1−1 nixos/tests/networking-proxy.nix+1−2 nixos/tests/networking.nix+251−18 nixos/tests/nextcloud/basic.nix+35−8 nixos/tests/nextcloud/default.nix+20−8 nixos/tests/nextcloud/with-mysql-and-memcached.nix+9−19 nixos/tests/nextcloud/with-postgresql-and-redis.nix+6−3 nixos/tests/nexus.nix+2−2 nixos/tests/nfs/kerberos.nix+5−5 nixos/tests/nfs/simple.nix+3−3 nixos/tests/nginx-etag.nix+1−2 nixos/tests/nginx-modsecurity.nix+39 nixos/tests/nginx-pubhtml.nix+1−1 nixos/tests/nginx-sandbox.nix+2−2 nixos/tests/nginx-sso.nix+2−2 nixos/tests/nginx-variants.nix+2−2 nixos/tests/nginx.nix+3−3 nixos/tests/nitter.nix+18 nixos/tests/nix-ld.nix+20 nixos/tests/nix-serve-ssh.nix+45 nixos/tests/nix-serve.nix+22 nixos/tests/nix-ssh-serve.nix−45 nixos/tests/nixops/default.nix+114 nixos/tests/nixops/legacy/base-configuration.nix+31 nixos/tests/nixops/legacy/nixops.nix+15 nixos/tests/nixos-generate-config.nix+6−7 nixos/tests/node-red.nix+31 nixos/tests/nomad.nix+97 nixos/tests/noto-fonts.nix+44 nixos/tests/novacomd.nix+2−2 nixos/tests/nsd.nix+11−1 nixos/tests/nzbget.nix+19−3 nixos/tests/nzbhydra2.nix+17 nixos/tests/oci-containers.nix+1−1 nixos/tests/odoo.nix+27 nixos/tests/oh-my-zsh.nix+1−1 nixos/tests/ombi.nix+18 nixos/tests/openarena.nix+3−3 nixos/tests/openldap.nix+15−10 nixos/tests/openresty-lua.nix+55 nixos/tests/opensmtpd-rspamd.nix+141 nixos/tests/openssh.nix+13−7 nixos/tests/opentabletdriver.nix+30 nixos/tests/orangefs.nix+1−1 nixos/tests/os-prober.nix+13−15 nixos/tests/osrm-backend.nix+1−1 nixos/tests/overlayfs.nix+29−32 nixos/tests/owncast.nix+42 nixos/tests/pacemaker.nix+110 nixos/tests/packagekit.nix+2−3 nixos/tests/pam/pam-file-contents.nix+25 nixos/tests/pam/pam-oath-login.nix+3−3 nixos/tests/pam/pam-u2f.nix+2−2 nixos/tests/pam/pam-ussh.nix+70 nixos/tests/pam/test_chfn.py+27 nixos/tests/pantheon.nix+7−8 nixos/tests/paperless.nix+25−17 nixos/tests/parsedmarc/default.nix+235 nixos/tests/pdns-recursor.nix+4−1 nixos/tests/peerflix.nix+1−1 nixos/tests/pgadmin4-standalone.nix+43 nixos/tests/pgadmin4.nix+132 nixos/tests/pgmanage.nix+1−1 nixos/tests/php/default.nix+15−7 nixos/tests/php/fpm.nix+25−19 nixos/tests/php/httpd.nix+14−11 nixos/tests/php/pcre.nix+14−11 nixos/tests/pict-rs.nix+17 nixos/tests/pinnwand.nix+10−2 nixos/tests/plasma5-systemd-start.nix+42 nixos/tests/plasma5.nix+9−7 nixos/tests/plausible.nix+49 nixos/tests/pleroma.nix+249 nixos/tests/plikd.nix+27 nixos/tests/plotinus.nix+3−3 nixos/tests/podgrab.nix+34 nixos/tests/podman.nix−79 nixos/tests/podman/default.nix+144 nixos/tests/podman/dnsname.nix+42 nixos/tests/podman/tls-ghostunnel.nix+150 nixos/tests/pomerium.nix+102 nixos/tests/postfix-raise-smtpd-tls-security-level.nix+1−1 nixos/tests/postfix.nix+1−1 nixos/tests/postfixadmin.nix+31 nixos/tests/postgis.nix+1−1 nixos/tests/postgresql-wal-receiver.nix+13−5 nixos/tests/postgresql.nix+51−4 nixos/tests/power-profiles-daemon.nix+45 nixos/tests/powerdns-admin.nix+117 nixos/tests/powerdns.nix+1 nixos/tests/predictable-interface-names.nix+7−3 nixos/tests/printing.nix+3−12 nixos/tests/privacyidea.nix+12−5 nixos/tests/privoxy.nix+113 nixos/tests/prometheus-exporters.nix+753−201 nixos/tests/prometheus.nix+93−1 nixos/tests/prowlarr.nix+18 nixos/tests/proxy.nix+1−1 nixos/tests/pt2-clone.nix+3−3 nixos/tests/pulseaudio.nix+71 nixos/tests/qboot.nix+1−1 nixos/tests/quagga.nix−96 nixos/tests/quorum.nix+33−10 nixos/tests/rabbitmq.nix+9−3 nixos/tests/radicale.nix+82−127 nixos/tests/rasdaemon.nix+34 nixos/tests/redis.nix+29−7 nixos/tests/redmine.nix+1−1 nixos/tests/resolv.nix+1−1 nixos/tests/restart-by-activation-script.nix+73 nixos/tests/restic.nix+7−1 nixos/tests/retroarch.nix+49 nixos/tests/riak.nix+1−1 nixos/tests/robustirc-bridge.nix+1−1 nixos/tests/roundcube.nix+1−1 nixos/tests/rspamd.nix+41−32 nixos/tests/rss2email.nix+1−1 nixos/tests/rstudio-server.nix+24 nixos/tests/rsyncd.nix+25−14 nixos/tests/rsyslogd.nix+4−4 nixos/tests/run-in-machine.nix−23 nixos/tests/sabnzbd.nix+22 nixos/tests/samba-wsdd.nix+2−2 nixos/tests/samba.nix+2−3 nixos/tests/sanoid.nix+38−17 nixos/tests/sbt-extras.nix−16 nixos/tests/sbt.nix−18 nixos/tests/scala.nix−33 nixos/tests/sddm.nix+3−3 nixos/tests/seafile.nix+121 nixos/tests/searx.nix+114 nixos/tests/service-runner.nix+2−2 nixos/tests/sfxr-qt.nix+32 nixos/tests/shadow.nix+119 nixos/tests/shattered-pixel-dungeon.nix+3−2 nixos/tests/shiori.nix+2−3 nixos/tests/signal-desktop.nix+33−7 nixos/tests/simple.nix+2−2 nixos/tests/slurm.nix+10−8 nixos/tests/smokeping.nix+2−1 nixos/tests/snapcast.nix+33−1 nixos/tests/snapper.nix+2−2 nixos/tests/soapui.nix+24 nixos/tests/sogo.nix+2−2 nixos/tests/solanum.nix+97 nixos/tests/solr.nix+2−2 nixos/tests/sourcehut.nix+212 nixos/tests/spacecookie.nix+19−14 nixos/tests/spark/default.nix+27 nixos/tests/spark/spark_sample.py+40 nixos/tests/spike.nix−22 nixos/tests/ssh-keys.nix+1−1 nixos/tests/sssd-ldap.nix+79−81 nixos/tests/sssd.nix+2−2 nixos/tests/starship.nix+42 nixos/tests/step-ca.nix+77 nixos/tests/strongswan-swanctl.nix+1−1 nixos/tests/sudo.nix+26−3 nixos/tests/sway.nix+138 nixos/tests/switch-test.nix+1017−7 nixos/tests/sympa.nix+1−2 nixos/tests/syncthing-init.nix+10−10 nixos/tests/syncthing-relay.nix+2−2 nixos/tests/syncthing.nix+3−3 nixos/tests/systemd-analyze.nix+2−2 nixos/tests/systemd-binfmt.nix+86−20 nixos/tests/systemd-boot.nix+172−8 nixos/tests/systemd-confinement.nix+46−23 nixos/tests/systemd-cryptenroll.nix+54 nixos/tests/systemd-escaping.nix+45 nixos/tests/systemd-initrd-btrfs-raid.nix+45 nixos/tests/systemd-initrd-luks-keyfile.nix+53 nixos/tests/systemd-initrd-luks-password.nix+48 nixos/tests/systemd-initrd-simple.nix+44 nixos/tests/systemd-initrd-swraid.nix+50 nixos/tests/systemd-journal.nix+4−2 nixos/tests/systemd-machinectl.nix+85 nixos/tests/systemd-misc.nix+62 nixos/tests/systemd-networkd-dhcpserver-static-leases.nix+81 nixos/tests/systemd-networkd-dhcpserver.nix+1−1 nixos/tests/systemd-networkd-ipv6-prefix-delegation.nix+14−25 nixos/tests/systemd-networkd-vrf.nix+2 nixos/tests/systemd-networkd.nix+11−2 nixos/tests/systemd-shutdown.nix+26 nixos/tests/systemd.nix+42−14 nixos/tests/taskserver.nix+1 nixos/tests/teeworlds.nix+3−3 nixos/tests/telegraf.nix+2−2 nixos/tests/teleport.nix+99 nixos/tests/terminal-emulators.nix+207 nixos/tests/thelounge.nix+29 nixos/tests/tigervnc.nix+53 nixos/tests/tinc/default.nix+139 nixos/tests/tinc/snakeoil-keys.nix+157 nixos/tests/tinydns.nix+15−1 nixos/tests/tinywl.nix+57 nixos/tests/tomcat.nix+21 nixos/tests/tor.nix+10−15 nixos/tests/trac.nix−19 nixos/tests/traefik.nix+5−3 nixos/tests/trafficserver.nix+177 nixos/tests/transmission.nix+2−2 nixos/tests/trezord.nix+1−1 nixos/tests/trickster.nix+1−1 nixos/tests/tsm-client-gui.nix+57 nixos/tests/tuptime.nix+2−2 nixos/tests/turbovnc-headless-server.nix+172 nixos/tests/tuxguitar.nix+24 nixos/tests/txredisapi.nix+29 nixos/tests/ucarp.nix+66 nixos/tests/udisks2.nix+3−3 nixos/tests/unbound.nix+69−32 nixos/tests/unifi.nix+36 nixos/tests/upnp.nix+1−1 nixos/tests/usbguard.nix+62 nixos/tests/user-activation-scripts.nix+33 nixos/tests/uwsgi.nix+57−14 nixos/tests/v2ray.nix+2−2 nixos/tests/vault-postgresql.nix+69 nixos/tests/vault.nix+5−3 nixos/tests/vaultwarden.nix+187 nixos/tests/vector.nix+37 nixos/tests/vengi-tools.nix+29 nixos/tests/victoriametrics.nix+1−1 nixos/tests/vikunja.nix+65 nixos/tests/virtualbox.nix+10−16 nixos/tests/vscodium.nix+78 nixos/tests/vsftpd.nix+42 nixos/tests/wasabibackend.nix+2−2 nixos/tests/web-apps/mastodon.nix+170 nixos/tests/web-apps/netbox.nix+30 nixos/tests/web-apps/nifi.nix+30 nixos/tests/web-apps/peertube.nix+131 nixos/tests/web-servers/agate.nix+29 nixos/tests/web-servers/unit-php.nix+21−31 nixos/tests/wiki-js.nix+152 nixos/tests/wine.nix+48 nixos/tests/wireguard/basic.nix+4−4 nixos/tests/wireguard/generated.nix+1−1 nixos/tests/wireguard/namespaces.nix+1−1 nixos/tests/wireguard/wg-quick.nix+2−2 nixos/tests/without-nix.nix+32 nixos/tests/wmderland.nix+54 nixos/tests/wordpress.nix+57−24 nixos/tests/wpa_supplicant.nix+96 nixos/tests/xandikos.nix+4−4 nixos/tests/xautolock.nix+1−1 nixos/tests/xfce.nix+2−3 nixos/tests/xmonad-xdg-autostart.nix+35 nixos/tests/xmonad.nix+85−18 nixos/tests/xmpp/ejabberd.nix+1−1 nixos/tests/xmpp/prosody-mysql.nix+65−33 nixos/tests/xmpp/prosody.nix+4−3 nixos/tests/xmpp/xmpp-sendmessage.nix+25−6 nixos/tests/xrdp.nix+3−3 nixos/tests/xss-lock.nix+1−1 nixos/tests/xterm.nix+3−3 nixos/tests/xxh.nix+67 nixos/tests/yabar.nix+3−3 nixos/tests/yggdrasil.nix+9−13 nixos/tests/zammad.nix+60 nixos/tests/zfs.nix+77−4 nixos/tests/zigbee2mqtt.nix+6−2 nixos/tests/zoneminder.nix+1−1 nixos/tests/zookeeper.nix+15−3 nixos/tests/zrepl.nix+66 nixos/tests/zsh-history.nix+3−3 pkgs/applications/accessibility/contrast/default.nix+26−23 pkgs/applications/accessibility/dasher/default.nix+34−19 pkgs/applications/accessibility/espeakup/default.nix+46 pkgs/applications/accessibility/mousetweaks/default.nix+6−6 pkgs/applications/accessibility/squeekboard/default.nix+73 pkgs/applications/accessibility/svkbd/default.nix+59 pkgs/applications/accessibility/wvkbd/default.nix+36 pkgs/applications/audio/AMB-plugins/default.nix+5−5 pkgs/applications/audio/CHOWTapeModel/default.nix+78 pkgs/applications/audio/ChowCentaur/default.nix+53 pkgs/applications/audio/ChowKick/default.nix+106 pkgs/applications/audio/ChowPhaser/default.nix+76 pkgs/applications/audio/FIL-plugins/default.nix+5−5 pkgs/applications/audio/LibreArp/default.nix+53 pkgs/applications/audio/LibreArp/lv2.nix+53 pkgs/applications/audio/MMA/default.nix+13−12 pkgs/applications/audio/a2jmidid/default.nix+4−4 pkgs/applications/audio/aacgain/default.nix+9−4 pkgs/applications/audio/abcde/default.nix+3−3 pkgs/applications/audio/adlplug/default.nix+77−15 pkgs/applications/audio/aeolus/default.nix+5−5 pkgs/applications/audio/aether-lv2/default.nix+33 pkgs/applications/audio/airwave/default.nix+5−5 pkgs/applications/audio/aj-snapshot/default.nix+9−10 pkgs/applications/audio/amarok/default.nix+11−14 pkgs/applications/audio/amberol/default.nix+75 pkgs/applications/audio/ams-lv2/default.nix+4−4 pkgs/applications/audio/ams/default.nix+5−5 pkgs/applications/audio/apple-music-electron/default.nix+32 pkgs/applications/audio/ardour/5.nix−162 pkgs/applications/audio/ardour/default.nix+22−13 pkgs/applications/audio/ario/default.nix+30−11 pkgs/applications/audio/artyFX/default.nix+5−5 pkgs/applications/audio/ashuffle/default.nix+13−5 pkgs/applications/audio/asunder/default.nix+3−3 pkgs/applications/audio/aucatctl/default.nix+4−4 pkgs/applications/audio/audacious/default.nix+12−10 pkgs/applications/audio/audacity/default.nix+186−46 pkgs/applications/audio/audio-recorder/default.nix+6−6 pkgs/applications/audio/aumix/default.nix+28−13 pkgs/applications/audio/autotalent/default.nix+2−2 pkgs/applications/audio/axoloti/default.nix+2−2 pkgs/applications/audio/axoloti/dfu-util.nix+3−3 pkgs/applications/audio/axoloti/libusb1.nix+11−10 pkgs/applications/audio/bambootracker/default.nix+22−26 pkgs/applications/audio/baudline/default.nix+4−4 pkgs/applications/audio/bchoppr/default.nix+5−5 pkgs/applications/audio/bespokesynth/default.nix+148 pkgs/applications/audio/bitmeter/default.nix+3−3 pkgs/applications/audio/bitwig-studio/bitwig-studio1.nix+6−6 pkgs/applications/audio/bitwig-studio/bitwig-studio2.nix+1−1 pkgs/applications/audio/bitwig-studio/bitwig-studio3.nix+71−13 pkgs/applications/audio/bitwig-studio/bitwig-studio4.nix+80 pkgs/applications/audio/bjumblr/default.nix+7−7 pkgs/applications/audio/blanket/default.nix+69 pkgs/applications/audio/boops/default.nix+28 pkgs/applications/audio/bristol/default.nix+4−4 pkgs/applications/audio/bs1770gain/default.nix−22 pkgs/applications/audio/bschaffl/default.nix+4−4 pkgs/applications/audio/bsequencer/default.nix+7−7 pkgs/applications/audio/bshapr/default.nix+7−7 pkgs/applications/audio/bslizr/default.nix+7−7 pkgs/applications/audio/bucklespring/default.nix+63 pkgs/applications/audio/cadence/default.nix+58−44 pkgs/applications/audio/calf/default.nix+4−4 pkgs/applications/audio/callaudiod/default.nix+45 pkgs/applications/audio/cantata/default.nix+74−61 pkgs/applications/audio/caps/default.nix+4−4 pkgs/applications/audio/cardinal/default.nix+67 pkgs/applications/audio/carla/default.nix+21−11 pkgs/applications/audio/caudec/default.nix+9−13 pkgs/applications/audio/cava/default.nix+5−5 pkgs/applications/audio/cd-discid/default.nix+3−4 pkgs/applications/audio/cdparanoia/default.nix+20−10 pkgs/applications/audio/cheesecutter/default.nix+3−3 pkgs/applications/audio/chuck/default.nix+4−4 pkgs/applications/audio/cider/default.nix+30 pkgs/applications/audio/clementine/default.nix+75−21 pkgs/applications/audio/clerk/default.nix+38−12 pkgs/applications/audio/cmt/default.nix+4−4 pkgs/applications/audio/cmus/default.nix+13−13 pkgs/applications/audio/cmusfm/default.nix+19−13 pkgs/applications/audio/cozy-audiobooks/default.nix−87 pkgs/applications/audio/cozy/default.nix+92 pkgs/applications/audio/crip/default.nix+7−6 pkgs/applications/audio/csa/default.nix+3−3 pkgs/applications/audio/csound/csound-manual/default.nix+4−4 pkgs/applications/audio/csound/csound-qt/default.nix+4−2 pkgs/applications/audio/csound/default.nix+9−14 pkgs/applications/audio/curseradio/default.nix+2−2 pkgs/applications/audio/cyanrip/default.nix+34 pkgs/applications/audio/deadbeef/default.nix+12−13 pkgs/applications/audio/deadbeef/plugins/headerbar-gtk3.nix+3−3 pkgs/applications/audio/deadbeef/plugins/infobar.nix+3−3 pkgs/applications/audio/deadbeef/plugins/lyricbar.nix+3−3 pkgs/applications/audio/deadbeef/plugins/mpris2.nix+3−3 pkgs/applications/audio/deadbeef/plugins/statusnotifier.nix+39 pkgs/applications/audio/deadbeef/wrapper.nix+1−1 pkgs/applications/audio/denemo/default.nix+5−5 pkgs/applications/audio/dfasma/default.nix+5−7 pkgs/applications/audio/diopser/default.nix+76 pkgs/applications/audio/dirt/default.nix+4−3 pkgs/applications/audio/distrho/default.nix+78−38 pkgs/applications/audio/dr14_tmeter/default.nix+3−3 pkgs/applications/audio/dragonfly-reverb/default.nix+9−7 pkgs/applications/audio/drumgizmo/default.nix+10−18 pkgs/applications/audio/drumkv1/default.nix+5−5 pkgs/applications/audio/dsf2flac/default.nix+34 pkgs/applications/audio/easyeffects/default.nix+113 pkgs/applications/audio/easytag/default.nix+7−7 pkgs/applications/audio/ebumeter/default.nix+33 pkgs/applications/audio/ecasound/default.nix+50−5 pkgs/applications/audio/eflite/default.nix+6−6 pkgs/applications/audio/ekho/default.nix+4−4 pkgs/applications/audio/ensemble-chorus/default.nix+4−4 pkgs/applications/audio/eq10q/default.nix+6−6 pkgs/applications/audio/espeak-ng/default.nix+34−9 pkgs/applications/audio/espeak-ng/mbrola.patch+22 pkgs/applications/audio/espeak/default.nix+7−5 pkgs/applications/audio/espeak/edit.nix+8−7 pkgs/applications/audio/eteroj.lv2/default.nix−23 pkgs/applications/audio/exaile/default.nix+107 pkgs/applications/audio/faust/faust1.nix+8−9 pkgs/applications/audio/faust/faust2.nix+21−14 pkgs/applications/audio/faust/faust2alqt.nix+2−2 pkgs/applications/audio/faust/faust2alsa.nix+2−2 pkgs/applications/audio/faust/faust2firefox.nix+2−2 pkgs/applications/audio/faust/faust2jack.nix+4−4 pkgs/applications/audio/faust/faust2jackrust.nix+3−4 pkgs/applications/audio/faust/faust2jaqt.nix+4−4 pkgs/applications/audio/faust/faustlive.nix+16−16 pkgs/applications/audio/faustPhysicalModeling/default.nix+39 pkgs/applications/audio/faustStk/default.nix+39 pkgs/applications/audio/fdkaac/default.nix+5−5 pkgs/applications/audio/flac/default.nix+6−5 pkgs/applications/audio/flac123/default.nix+2−2 pkgs/applications/audio/flacon/default.nix+5−5 pkgs/applications/audio/fluidsynth/default.nix+10−26 pkgs/applications/audio/fmit/default.nix+5−7 pkgs/applications/audio/fmsynth/default.nix+5−5 pkgs/applications/audio/fomp/default.nix+8−8 pkgs/applications/audio/foo-yc20/default.nix−29 pkgs/applications/audio/freac/default.nix+38 pkgs/applications/audio/freewheeling/default.nix+8−8 pkgs/applications/audio/freqtweak/default.nix+3−3 pkgs/applications/audio/friture/default.nix+21−8 pkgs/applications/audio/friture/factorial.patch−13 pkgs/applications/audio/friture/unlock_constraints.patch−34 pkgs/applications/audio/ft2-clone/default.nix+32−8 pkgs/applications/audio/furnace/default.nix+100 pkgs/applications/audio/fverb/default.nix+2−2 pkgs/applications/audio/game-music-emu/default.nix+8−8 pkgs/applications/audio/gbsplay/default.nix+18−14 pkgs/applications/audio/geonkick/default.nix+5−6 pkgs/applications/audio/giada/default.nix+41−27 pkgs/applications/audio/gigedit/default.nix+22−5 pkgs/applications/audio/gjay/default.nix+26−9 pkgs/applications/audio/gmpc/default.nix+34−8 pkgs/applications/audio/gmu/default.nix+23−4 pkgs/applications/audio/gnaural/default.nix+33 pkgs/applications/audio/gnome-podcasts/default.nix+34−20 pkgs/applications/audio/goattracker/default.nix+17−13 pkgs/applications/audio/google-musicmanager/default.nix−77 pkgs/applications/audio/google-play-music-desktop-player/default.nix+7−7 pkgs/applications/audio/gpodder/default.nix+20−10 pkgs/applications/audio/gpodder/disable-autoupdate.patch+8−29 pkgs/applications/audio/gradio/default.nix+3−4 pkgs/applications/audio/grandorgue/default.nix+5−5 pkgs/applications/audio/greg/default.nix+6−7 pkgs/applications/audio/gspeech/default.nix+2−2 pkgs/applications/audio/gtklick/default.nix−34 pkgs/applications/audio/gtkpod/default.nix+8−7 pkgs/applications/audio/guitarix/default.nix+23−13 pkgs/applications/audio/gwc/default.nix+6−6 pkgs/applications/audio/gxmatcheq-lv2/default.nix+3−3 pkgs/applications/audio/gxplugins-lv2/default.nix+6−6 pkgs/applications/audio/helio-workstation/default.nix+13−13 pkgs/applications/audio/helm/default.nix+10−15 pkgs/applications/audio/helvum/default.nix+60 pkgs/applications/audio/hivelytracker/default.nix+89 pkgs/applications/audio/hqplayer-desktop/default.nix+92 pkgs/applications/audio/hushboard/default.nix+73 pkgs/applications/audio/hybridreverb2/default.nix+47−12 pkgs/applications/audio/hydrogen/0.nix+30−8 pkgs/applications/audio/hydrogen/default.nix+8−8 pkgs/applications/audio/i-score/default.nix−85 pkgs/applications/audio/iannix/default.nix+13−14 pkgs/applications/audio/id3v2/default.nix+2−2 pkgs/applications/audio/in-formant/default.nix+45 pkgs/applications/audio/indicator-sound-switcher/default.nix+62 pkgs/applications/audio/industrializer/default.nix+7−9 pkgs/applications/audio/infamousPlugins/default.nix+3−3 pkgs/applications/audio/ingen/default.nix+12−15 pkgs/applications/audio/ir.lv2/default.nix+3−3 pkgs/applications/audio/jaaa/default.nix+3−3 pkgs/applications/audio/jack-capture/default.nix+4−4 pkgs/applications/audio/jack-oscrolloscope/default.nix+4−4 pkgs/applications/audio/jack-rack/default.nix+9−8 pkgs/applications/audio/jackmeter/default.nix+9−8 pkgs/applications/audio/jackmix/default.nix+3−3 pkgs/applications/audio/jacktrip/default.nix+61 pkgs/applications/audio/jalv/default.nix+6−6 pkgs/applications/audio/jamesdsp/default.nix+95 pkgs/applications/audio/jamin/default.nix+6−6 pkgs/applications/audio/jamulus/default.nix+8−8 pkgs/applications/audio/japa/default.nix+7−7 pkgs/applications/audio/jconvolver/default.nix+114 pkgs/applications/audio/jellycli/default.nix+33 pkgs/applications/audio/jellycli/fix-test-dir.patch+13 pkgs/applications/audio/jmusicbot/default.nix+31 pkgs/applications/audio/kapitonov-plugins-pack/default.nix+4−4 pkgs/applications/audio/keyfinder-cli/default.nix+6−6 pkgs/applications/audio/keyfinder/default.nix+7−8 pkgs/applications/audio/kid3/default.nix+56−17 pkgs/applications/audio/klick/default.nix+4−4 pkgs/applications/audio/klystrack/default.nix+4−4 pkgs/applications/audio/kmetronome/default.nix+8−6 pkgs/applications/audio/ladspa-plugins/default.nix+19−9 pkgs/applications/audio/ladspa-sdk/default.nix+4−4 pkgs/applications/audio/ladspa-sdk/ladspah.nix+4−4 pkgs/applications/audio/lash/default.nix+5−5 pkgs/applications/audio/lastfmsubmitd/default.nix−21 pkgs/applications/audio/librespot/cargo-lock.patch−137 pkgs/applications/audio/librespot/default.nix+16−23 pkgs/applications/audio/lingot/default.nix+8−8 pkgs/applications/audio/linuxband/default.nix−37 pkgs/applications/audio/linuxsampler/default.nix+7−7 pkgs/applications/audio/littlegptracker/0002-Set-the-initial-directory-to-the-current-directory.patch−27 pkgs/applications/audio/littlegptracker/default.nix+16−14 pkgs/applications/audio/lmms/default.nix+7−8 pkgs/applications/audio/lollypop/default.nix+5−5 pkgs/applications/audio/losslessaudiochecker/default.nix+29 pkgs/applications/audio/lsp-plugins/default.nix+16−9 pkgs/applications/audio/ltc-tools/default.nix+3−3 pkgs/applications/audio/luppp/default.nix+4−4 pkgs/applications/audio/lv2-cpp-tools/default.nix+3−3 pkgs/applications/audio/lv2bm/default.nix+3−3 pkgs/applications/audio/lv2lint/default.nix+22 pkgs/applications/audio/lyrebird/default.nix+2−2 pkgs/applications/audio/m4acut/default.nix+24 pkgs/applications/audio/magnetophonDSP/CharacterCompressor/default.nix+3−3 pkgs/applications/audio/magnetophonDSP/CompBus/default.nix+3−3 pkgs/applications/audio/magnetophonDSP/ConstantDetuneChorus/default.nix+3−3 pkgs/applications/audio/magnetophonDSP/LazyLimiter/default.nix+3−3 pkgs/applications/audio/magnetophonDSP/MBdistortion/default.nix+10−3 pkgs/applications/audio/magnetophonDSP/RhythmDelay/default.nix+3−3 pkgs/applications/audio/magnetophonDSP/VoiceOfFaust/default.nix+3−3 pkgs/applications/audio/magnetophonDSP/faustCompressors/default.nix+4−4 pkgs/applications/audio/magnetophonDSP/pluginUtils/default.nix+3−3 pkgs/applications/audio/magnetophonDSP/shelfMultiBand/default.nix+3−3 pkgs/applications/audio/mamba/default.nix+8−7 pkgs/applications/audio/mbrola/default.nix+42 pkgs/applications/audio/mda-lv2/default.nix+5−5 pkgs/applications/audio/mellowplayer/default.nix+4−4 pkgs/applications/audio/melmatcheq.lv2/default.nix+28 pkgs/applications/audio/meterbridge/default.nix+3−3 pkgs/applications/audio/meters_lv2/default.nix+43−36 pkgs/applications/audio/mhwaveedit/default.nix+5−5 pkgs/applications/audio/mi2ly/default.nix+17−26 pkgs/applications/audio/mi2ly/default.upstream−3 pkgs/applications/audio/mid2key/default.nix+9−6 pkgs/applications/audio/midas/generic.nix+7−8 pkgs/applications/audio/midi-visualizer/default.nix+4−4 pkgs/applications/audio/midisheetmusic/default.nix+5−5 pkgs/applications/audio/mikmod/default.nix+7−6 pkgs/applications/audio/milkytracker/default.nix+21−9 pkgs/applications/audio/mimic/default.nix+20−12 pkgs/applications/audio/mimms/default.nix−31 pkgs/applications/audio/miniaudicle/default.nix+59 pkgs/applications/audio/mixxx/default.nix+119−35 pkgs/applications/audio/mmtc/default.nix+32 pkgs/applications/audio/moc/default.nix+14−14 pkgs/applications/audio/mod-arpeggiator-lv2/default.nix+26 pkgs/applications/audio/mod-distortion/default.nix+4−4 pkgs/applications/audio/molot-lite/default.nix+16−19 pkgs/applications/audio/monkeys-audio/default.nix+2−2 pkgs/applications/audio/mooSpace/default.nix+3−3 pkgs/applications/audio/mopidy/default.nix+25−23 pkgs/applications/audio/mopidy/gmusic.nix−29 pkgs/applications/audio/mopidy/iris.nix+4−4 pkgs/applications/audio/mopidy/jellyfin.nix+25 pkgs/applications/audio/mopidy/local.nix+2−2 pkgs/applications/audio/mopidy/moped.nix+2−2 pkgs/applications/audio/mopidy/mopidy.nix+7−11 pkgs/applications/audio/mopidy/mopify.nix+2−2 pkgs/applications/audio/mopidy/mpd.nix+4−4 pkgs/applications/audio/mopidy/mpris.nix+4−4 pkgs/applications/audio/mopidy/muse.nix+29 pkgs/applications/audio/mopidy/musicbox-webclient.nix+5−4 pkgs/applications/audio/mopidy/podcast.nix+31 pkgs/applications/audio/mopidy/scrobbler.nix+24 pkgs/applications/audio/mopidy/somafm.nix+3−3 pkgs/applications/audio/mopidy/soundcloud.nix+4−4 pkgs/applications/audio/mopidy/spotify-tunigo.nix+2−2 pkgs/applications/audio/mopidy/spotify.nix+10−8 pkgs/applications/audio/mopidy/subidy.nix+24 pkgs/applications/audio/mopidy/tunein.nix+4−7 pkgs/applications/audio/mopidy/youtube.nix+44−16 pkgs/applications/audio/mopidy/ytmusic.nix+35 pkgs/applications/audio/mousai/default.nix+79 pkgs/applications/audio/mousai/paths.patch+13 pkgs/applications/audio/mp3blaster/default.nix+14−4 pkgs/applications/audio/mp3gain/default.nix+19−9 pkgs/applications/audio/mp3info/default.nix+7−6 pkgs/applications/audio/mp3splt/default.nix+3−3 pkgs/applications/audio/mp3val/default.nix+4−4 pkgs/applications/audio/mpc/default.nix+50−13 pkgs/applications/audio/mpc123/default.nix+3−3 pkgs/applications/audio/mpdevil/default.nix+53 pkgs/applications/audio/mpg123/default.nix+44−20 pkgs/applications/audio/mpg321/default.nix+4−5 pkgs/applications/audio/munt/default.nix−38 pkgs/applications/audio/munt/libmt32emu.nix+38 pkgs/applications/audio/munt/mt32emu-qt.nix+75 pkgs/applications/audio/munt/mt32emu-smf2wav.nix+50 pkgs/applications/audio/mup/default.nix+2−2 pkgs/applications/audio/muse/default.nix+6−6 pkgs/applications/audio/musescore/darwin.nix+2−3 pkgs/applications/audio/musescore/default.nix+17−12 pkgs/applications/audio/musikcube/default.nix+24−9 pkgs/applications/audio/musly/default.nix+3−3 pkgs/applications/audio/muso/default.nix+37 pkgs/applications/audio/mympd/default.nix+52 pkgs/applications/audio/myxer/default.nix+38 pkgs/applications/audio/ncmpc/default.nix+18−10 pkgs/applications/audio/ncmpcpp/default.nix+20−9 pkgs/applications/audio/ncpamixer/default.nix+6−10 pkgs/applications/audio/ncspot/default.nix+17−18 pkgs/applications/audio/netease-cloud-music-gtk/cargo-lock.patch+2007 pkgs/applications/audio/netease-cloud-music-gtk/default.nix+60 pkgs/applications/audio/netease-cloud-music-gtk/update-cargo-lock.sh+20 pkgs/applications/audio/netease-music-tui/cargo-lock.patch+2655 pkgs/applications/audio/netease-music-tui/default.nix+27 pkgs/applications/audio/netease-music-tui/update-cargo-lock.sh+20 pkgs/applications/audio/new-session-manager/default.nix+27 pkgs/applications/audio/ninjas2/default.nix+3−3 pkgs/applications/audio/noise-repellent/default.nix+12−10 pkgs/applications/audio/noisetorch/default.nix+12−14 pkgs/applications/audio/noisetorch/embedlibrnnoise.patch−13 pkgs/applications/audio/noisetorch/version.patch−37 pkgs/applications/audio/non/default.nix+11−11 pkgs/applications/audio/nootka/default.nix+9−6 pkgs/applications/audio/nootka/unstable.nix+28−8 pkgs/applications/audio/normalize/default.nix+2−2 pkgs/applications/audio/nova-filters/default.nix+3−3 pkgs/applications/audio/nuclear/default.nix+1−1 pkgs/applications/audio/ocenaudio/default.nix+7−7 pkgs/applications/audio/odin2/default.nix+79 pkgs/applications/audio/open-music-kontrollers/eteroj.nix+10 pkgs/applications/audio/open-music-kontrollers/generic.nix+37 pkgs/applications/audio/open-music-kontrollers/jit.nix+12 pkgs/applications/audio/open-music-kontrollers/mephisto.nix+17 pkgs/applications/audio/open-music-kontrollers/midi_matrix.nix+10 pkgs/applications/audio/open-music-kontrollers/moony.nix+13 pkgs/applications/audio/open-music-kontrollers/orbit.nix+12 pkgs/applications/audio/open-music-kontrollers/patchmatrix.nix+13 pkgs/applications/audio/open-music-kontrollers/router.nix+11 pkgs/applications/audio/open-music-kontrollers/sherlock.nix+12 pkgs/applications/audio/open-music-kontrollers/synthpod.nix+13 pkgs/applications/audio/open-music-kontrollers/vm.nix+10 pkgs/applications/audio/openmpt123/default.nix−31 pkgs/applications/audio/opus-tools/default.nix+9−7 pkgs/applications/audio/opusfile/default.nix+12−8

26292 more files changed are not listed.

.editorconfig+6−34
@@ -47,43 +47,31 @@ indent_style = space
4747insert_final_newline = unset
4848trim_trailing_whitespace = unset
4949
50−[*.{key,ovpn}]
50+[*.{asc,key,ovpn}]
5151insert_final_newline = unset
5252end_of_line = unset
53+trim_trailing_whitespace = unset
5354
5455[*.lock]
5556indent_size = unset
5657
57−[deps.nix]
58−insert_final_newline = unset
59−[pkgs/tools/networking/dd-agent/*-deps.nix]
60−insert_final_newline = unset
58+# trailing whitespace is an actual syntax element of classic Markdown/
59+# CommonMark to enforce a line break
60+[*.md]
61+trim_trailing_whitespace = unset
6162
6263[eggs.nix]
6364trim_trailing_whitespace = unset
6465
65−[gemset.nix]
66−insert_final_newline = unset
67−
68−[node-{composition,packages,packages-generated}.nix]
69−insert_final_newline = unset
70−
7166[nixos/modules/services/networking/ircd-hybrid/*.{conf,in}]
7267trim_trailing_whitespace = unset
7368
74−[nixos/tests/systemd-networkd-vrf.nix]
75−trim_trailing_whitespace = unset
76−
7769[pkgs/build-support/dotnetenv/Wrapper/**]
7870end_of_line = unset
7971indent_style = unset
8072insert_final_newline = unset
8173trim_trailing_whitespace = unset
8274
83−[pkgs/build-support/upstream-updater/**]
84−indent_style = unset
85−trim_trailing_whitespace = unset
86−
8775[pkgs/development/compilers/elm/registry.dat]
8876end_of_line = unset
8977insert_final_newline = unset
@@ -92,24 +80,8 @@ insert_final_newline = unset
9280indent_style = unset
9381trim_trailing_whitespace = unset
9482
95−[pkgs/development/mobile/androidenv/generated/{addons,packages}.nix]
96−trim_trailing_whitespace = unset
97−
98−[pkgs/development/node-packages/composition.nix]
99−insert_final_newline = unset
100−
101−[pkgs/development/{perl-modules,ocaml-modules,tools/ocaml}/**]
102−indent_style = unset
103−
10483[pkgs/servers/dict/wordnet_structures.py]
10584trim_trailing_whitespace = unset
10685
10786[pkgs/tools/misc/timidity/timidity.cfg]
10887trim_trailing_whitespace = unset
109−
110−[pkgs/tools/security/enpass/data.json]
111−insert_final_newline = unset
112−trim_trailing_whitespace = unset
113−
114−[pkgs/top-level/emscripten-packages.nix]
115−trim_trailing_whitespace = unset
.git-blame-ignore-revsnew file+32
@@ -0,0 +1,32 @@
1+# This file contains a list of commits that are not likely what you
2+# are looking for in a blame, such as mass reformatting or renaming.
3+# You can set this file as a default ignore file for blame by running
4+# the following command.
5+#
6+# $ git config blame.ignoreRevsFile .git-blame-ignore-revs
7+#
8+# To temporarily not use this file add
9+# --ignore-revs-file=""
10+# to your blame command.
11+#
12+# The ignoreRevsFile can't be set globally due to blame failing if the file isn't present.
13+# To not have to set the option in every repository it is needed in,
14+# save the following script in your path with the name "git-bblame"
15+# now you can run
16+# $ git bblame $FILE
17+# to use the .git-blame-ignore-revs file if it is present.
18+#
19+# #!/usr/bin/env bash
20+# repo_root=$(git rev-parse --show-toplevel)
21+# if [[ -e $repo_root/.git-blame-ignore-revs ]]; then
22+# git blame --ignore-revs-file="$repo_root/.git-blame-ignore-revs" $@
23+# else
24+# git blame $@
25+# fi
26+
27+
28+# nixos/modules/rename: Sort alphabetically
29+1f71224fe86605ef4cd23ed327b3da7882dad382
30+
31+# nixos: fix module paths in rename.nix
32+d08ede042b74b8199dc748323768227b88efcf7c
.github/CODEOWNERS+142−72
@@ -6,40 +6,53 @@
66#
77# For documentation on this file, see https://help.github.com/articles/about-codeowners/
88# Mentioned users will get code review requests.
9+#
10+# IMPORTANT NOTE: in order to actually get pinged, commit access is required.
11+# This also holds true for GitHub teams. Since almost none of our teams have write
12+# permissions, you need to list all members of the team with commit access individually.
913
1014# This file
1115/.github/CODEOWNERS @edolstra
1216
1317# GitHub actions
14−/.github/workflows @Mic92 @zowoq
18+/.github/workflows @NixOS/Security @Mic92 @zowoq
19+/.github/workflows/merge-staging @FRidh
1520
1621# EditorConfig
1722/.editorconfig @Mic92 @zowoq
1823
1924# Libraries
2025/lib @edolstra @nbp @infinisil
21−/lib/systems @nbp @ericson2314 @matthewbauer
26+/lib/systems @alyssais @nbp @ericson2314 @matthewbauer
2227/lib/generators.nix @edolstra @nbp @Profpatsch
2328/lib/cli.nix @edolstra @nbp @Profpatsch
2429/lib/debug.nix @edolstra @nbp @Profpatsch
2530/lib/asserts.nix @edolstra @nbp @Profpatsch
2631
2732# Nixpkgs Internals
28−/default.nix @nbp
29−/pkgs/top-level/default.nix @nbp @Ericson2314
30−/pkgs/top-level/impure.nix @nbp @Ericson2314
31−/pkgs/top-level/stage.nix @nbp @Ericson2314 @matthewbauer
32−/pkgs/top-level/splice.nix @Ericson2314 @matthewbauer
33−/pkgs/top-level/release-cross.nix @Ericson2314 @matthewbauer
34−/pkgs/stdenv/generic @Ericson2314 @matthewbauer
35−/pkgs/stdenv/cross @Ericson2314 @matthewbauer
36−/pkgs/build-support/cc-wrapper @Ericson2314 @orivej
37−/pkgs/build-support/bintools-wrapper @Ericson2314 @orivej
38−/pkgs/build-support/setup-hooks @Ericson2314
33+/default.nix @nbp
34+/pkgs/top-level/default.nix @nbp @Ericson2314
35+/pkgs/top-level/impure.nix @nbp @Ericson2314
36+/pkgs/top-level/stage.nix @nbp @Ericson2314 @matthewbauer
37+/pkgs/top-level/splice.nix @Ericson2314 @matthewbauer
38+/pkgs/top-level/release-cross.nix @Ericson2314 @matthewbauer
39+/pkgs/stdenv/generic @Ericson2314 @matthewbauer
40+/pkgs/stdenv/cross @Ericson2314 @matthewbauer
41+/pkgs/build-support/cc-wrapper @Ericson2314
42+/pkgs/build-support/bintools-wrapper @Ericson2314
43+/pkgs/build-support/setup-hooks @Ericson2314
44+/pkgs/build-support/setup-hooks/auto-patchelf.sh @layus
45+/pkgs/build-support/setup-hooks/auto-patchelf.py @layus
3946
4047# Nixpkgs build-support
4148/pkgs/build-support/writers @lassulus @Profpatsch
4249
50+# Nixpkgs documentation
51+/maintainers/scripts/db-to-md.sh @jtojnar @ryantm
52+/maintainers/scripts/doc @jtojnar @ryantm
53+/doc/build-aux/pandoc-filters @jtojnar
54+/doc/contributing/contributing-to-documentation.chapter.md @jtojnar
55+
4356# NixOS Internals
4457/nixos/default.nix @nbp @infinisil
4558/nixos/lib/from-env.nix @nbp @infinisil
@@ -57,10 +70,17 @@
5770/nixos/doc/manual/development/writing-modules.xml @nbp
5871/nixos/doc/manual/man-nixos-option.xml @nbp
5972/nixos/modules/installer/tools/nixos-option.sh @nbp
73+/nixos/modules/system @dasJ
6074
6175# NixOS integration test driver
6276/nixos/lib/test-driver @tfc
6377
78+# Systemd
79+/nixos/modules/system/boot/systemd.nix @NixOS/systemd
80+/nixos/modules/system/boot/systemd @NixOS/systemd
81+/nixos/lib/systemd-*.nix @NixOS/systemd
82+/pkgs/os-specific/linux/systemd @NixOS/systemd
83+
6484# Updaters
6585## update.nix
6686/maintainers/scripts/update.nix @jtojnar
@@ -69,39 +89,40 @@
6989/pkgs/common-updater/scripts/update-source-version @jtojnar
7090
7191# Python-related code and docs
72−/maintainers/scripts/update-python-libraries @FRidh
73−/pkgs/top-level/python-packages.nix @FRidh @jonringer
74−/pkgs/development/interpreters/python @FRidh
75−/pkgs/development/python-modules @FRidh @jonringer
76−/doc/languages-frameworks/python.section.md @FRidh
92+/maintainers/scripts/update-python-libraries @FRidh
93+/pkgs/top-level/python-packages.nix @FRidh @jonringer
94+/pkgs/development/interpreters/python @FRidh
95+/pkgs/development/python-modules @FRidh @jonringer
96+/doc/languages-frameworks/python.section.md @FRidh
97+/pkgs/development/tools/poetry2nix @adisbladis
98+/pkgs/development/interpreters/python/hooks @FRidh @jonringer
7799
78100# Haskell
79−/pkgs/development/compilers/ghc @cdepillabout
80−/pkgs/development/haskell-modules @cdepillabout
81−/pkgs/development/haskell-modules/default.nix @cdepillabout
82−/pkgs/development/haskell-modules/generic-builder.nix @cdepillabout
83−/pkgs/development/haskell-modules/hoogle.nix @cdepillabout
101+/doc/languages-frameworks/haskell.section.md @cdepillabout @sternenseemann @maralorn @expipiplus1
102+/maintainers/scripts/haskell @cdepillabout @sternenseemann @maralorn @expipiplus1
103+/pkgs/development/compilers/ghc @cdepillabout @sternenseemann @maralorn @expipiplus1
104+/pkgs/development/haskell-modules @cdepillabout @sternenseemann @maralorn @expipiplus1
105+/pkgs/test/haskell @cdepillabout @sternenseemann @maralorn @expipiplus1
106+/pkgs/top-level/release-haskell.nix @cdepillabout @sternenseemann @maralorn @expipiplus1
107+/pkgs/top-level/haskell-packages.nix @cdepillabout @sternenseemann @maralorn @expipiplus1
84108
85109# Perl
86−/pkgs/development/interpreters/perl @volth @stigtsp
87−/pkgs/top-level/perl-packages.nix @volth @stigtsp
88−/pkgs/development/perl-modules @volth @stigtsp
110+/pkgs/development/interpreters/perl @stigtsp @zakame
111+/pkgs/top-level/perl-packages.nix @stigtsp @zakame
112+/pkgs/development/perl-modules @stigtsp @zakame
89113
90114# R
91−/pkgs/applications/science/math/R @peti
92−/pkgs/development/r-modules @peti
115+/pkgs/applications/science/math/R @jbedo
116+/pkgs/development/r-modules @jbedo
93117
94118# Ruby
95−/pkgs/development/interpreters/ruby @alyssais
96−/pkgs/development/ruby-modules @alyssais
119+/pkgs/development/interpreters/ruby @marsam
120+/pkgs/development/ruby-modules @marsam
97121
98122# Rust
99123/pkgs/development/compilers/rust @Mic92 @LnL7 @zowoq
100−/pkgs/build-support/rust @andir @zowoq
101−
102−# Darwin-related
103−/pkgs/stdenv/darwin @NixOS/darwin-maintainers
104−/pkgs/os-specific/darwin @NixOS/darwin-maintainers
124+/pkgs/build-support/rust @zowoq
125+/doc/languages-frameworks/rust.section.md @zowoq
105126
106127# C compilers
107128/pkgs/development/compilers/gcc @matthewbauer
@@ -111,21 +132,18 @@
111132/pkgs/top-level/unix-tools.nix @matthewbauer
112133/pkgs/development/tools/xcbuild @matthewbauer
113134
114−# Beam-related (Erlang, Elixir, LFE, etc)
115−/pkgs/development/beam-modules @gleber
116−/pkgs/development/interpreters/erlang @gleber
117−/pkgs/development/interpreters/lfe @gleber
118−/pkgs/development/interpreters/elixir @gleber
119−/pkgs/development/tools/build-managers/rebar @gleber
120−/pkgs/development/tools/build-managers/rebar3 @gleber
121−/pkgs/development/tools/erlang @gleber
135+# Audio
136+/nixos/modules/services/audio/botamusique.nix @mweinelt
137+/nixos/modules/services/audio/snapserver.nix @mweinelt
138+/nixos/tests/modules/services/audio/botamusique.nix @mweinelt
139+/nixos/tests/snapcast.nix @mweinelt
140+
141+# Browsers
142+/pkgs/applications/networking/browsers/firefox @mweinelt
122143
123144# Jetbrains
124145/pkgs/applications/editors/jetbrains @edwtjo
125146
126−# Eclipse
127−/pkgs/applications/editors/eclipse @rycee
128−
129147# Licenses
130148/lib/licenses.nix @alyssais
131149
@@ -136,7 +154,7 @@
136154/pkgs/development/libraries/qt-5 @ttuegel
137155
138156# PostgreSQL and related stuff
139−/pkgs/servers/sql/postgresql @thoughtpolice
157+/pkgs/servers/sql/postgresql @thoughtpolice @marsam
140158/nixos/modules/services/databases/postgresql.xml @thoughtpolice
141159/nixos/modules/services/databases/postgresql.nix @thoughtpolice
142160/nixos/tests/postgresql.nix @thoughtpolice
@@ -149,21 +167,39 @@
149167/nixos/tests/hardened.nix @joachifm
150168/pkgs/os-specific/linux/kernel/hardened-config.nix @joachifm
151169
170+# Home Automation
171+/nixos/modules/services/misc/home-assistant.nix @mweinelt
172+/nixos/modules/services/misc/zigbee2mqtt.nix @mweinelt
173+/nixos/tests/home-assistant.nix @mweinelt
174+/nixos/tests/zigbee2mqtt.nix @mweinelt
175+/pkgs/servers/home-assistant @mweinelt
176+/pkgs/tools/misc/esphome @mweinelt
177+
152178# Network Time Daemons
153179/pkgs/tools/networking/chrony @thoughtpolice
154180/pkgs/tools/networking/ntp @thoughtpolice
155181/pkgs/tools/networking/openntpd @thoughtpolice
156182/nixos/modules/services/networking/ntp @thoughtpolice
157183
184+# Network
185+/pkgs/tools/networking/kea/default.nix @mweinelt
186+/pkgs/tools/networking/babeld/default.nix @mweinelt
187+/nixos/modules/services/networking/babeld.nix @mweinelt
188+/nixos/modules/services/networking/kea.nix @mweinelt
189+/nixos/modules/services/networking/knot.nix @mweinelt
190+/nixos/tests/babeld.nix @mweinelt
191+/nixos/tests/kea.nix @mweinelt
192+/nixos/tests/knot.nix @mweinelt
193+
158194# Dhall
159−/pkgs/development/dhall-modules @Gabriel439 @Profpatsch
160−/pkgs/development/interpreters/dhall @Gabriel439 @Profpatsch
195+/pkgs/development/dhall-modules @Gabriel439 @Profpatsch @ehmry
196+/pkgs/development/interpreters/dhall @Gabriel439 @Profpatsch @ehmry
161197
162198# Idris
163199/pkgs/development/idris-modules @Infinisil
164200
165201# Bazel
166−/pkgs/development/tools/build-managers/bazel @mboes @Profpatsch
202+/pkgs/development/tools/build-managers/bazel @Profpatsch
167203
168204# NixOS modules for e-mail and dns services
169205/nixos/modules/services/mail/mailman.nix @peti
@@ -172,19 +208,18 @@
172208/nixos/modules/services/mail/rspamd.nix @peti
173209
174210# Emacs
175−/pkgs/applications/editors/emacs-modes @adisbladis
176−/pkgs/applications/editors/emacs @adisbladis
177−/pkgs/top-level/emacs-packages.nix @adisbladis
211+/pkgs/applications/editors/emacs/elisp-packages @adisbladis
212+/pkgs/applications/editors/emacs @adisbladis
213+/pkgs/top-level/emacs-packages.nix @adisbladis
178214
179215# Neovim
180−/pkgs/applications/editors/neovim @jonringer
181−/pkgs/applications/editors/neovim @teto
216+/pkgs/applications/editors/neovim @jonringer @teto
182217
183218# VimPlugins
184−/pkgs/misc/vim-plugins @jonringer @softinio
219+/pkgs/applications/editors/vim/plugins @jonringer
185220
186221# VsCode Extensions
187−/pkgs/misc/vscode-extensions @jonringer
222+/pkgs/applications/editors/vscode/extensions @jonringer
188223
189224# Prometheus exporter modules and tests
190225/nixos/modules/services/monitoring/prometheus/exporters.nix @WilliButz
@@ -192,30 +227,65 @@
192227/nixos/tests/prometheus-exporters.nix @WilliButz
193228
194229# PHP interpreter, packages, extensions, tests and documentation
195−/doc/languages-frameworks/php.section.md @NixOS/php
196−/nixos/tests/php @NixOS/php
197−/pkgs/build-support/build-pecl.nix @NixOS/php
198−/pkgs/development/interpreters/php @NixOS/php
199−/pkgs/development/php-packages @NixOS/php
200−/pkgs/top-level/php-packages.nix @NixOS/php
230+/doc/languages-frameworks/php.section.md @aanderse @etu @globin @ma27 @talyz
231+/nixos/tests/php @aanderse @etu @globin @ma27 @talyz
232+/pkgs/build-support/build-pecl.nix @aanderse @etu @globin @ma27 @talyz
233+/pkgs/development/interpreters/php @jtojnar @aanderse @etu @globin @ma27 @talyz
234+/pkgs/development/php-packages @aanderse @etu @globin @ma27 @talyz
235+/pkgs/top-level/php-packages.nix @jtojnar @aanderse @etu @globin @ma27 @talyz
201236
202237# Podman, CRI-O modules and related
203−/nixos/modules/virtualisation/containers.nix @NixOS/podman @zowoq
204−/nixos/modules/virtualisation/cri-o.nix @NixOS/podman @zowoq
205−/nixos/modules/virtualisation/podman.nix @NixOS/podman @zowoq
206−/nixos/tests/cri-o.nix @NixOS/podman @zowoq
207−/nixos/tests/podman.nix @NixOS/podman @zowoq
238+/nixos/modules/virtualisation/containers.nix @zowoq @adisbladis
239+/nixos/modules/virtualisation/cri-o.nix @zowoq @adisbladis
240+/nixos/modules/virtualisation/podman @zowoq @adisbladis
241+/nixos/tests/cri-o.nix @zowoq @adisbladis
242+/nixos/tests/podman @zowoq @adisbladis
208243
209244# Docker tools
210−/pkgs/build-support/docker @roberth @utdemir
211−/nixos/tests/docker-tools-overlay.nix @roberth
212−/nixos/tests/docker-tools.nix @roberth
213−/doc/builders/images/dockertools.xml @roberth
245+/pkgs/build-support/docker @roberth
246+/nixos/tests/docker-tools* @roberth
247+/doc/builders/images/dockertools.section.md @roberth
214248
215249# Blockchains
216250/pkgs/applications/blockchains @mmahut @RaghavSood
217251
218252# Go
253+/doc/languages-frameworks/go.section.md @kalbasit @Mic92 @zowoq
219254/pkgs/development/compilers/go @kalbasit @Mic92 @zowoq
220255/pkgs/development/go-modules @kalbasit @Mic92 @zowoq
221256/pkgs/development/go-packages @kalbasit @Mic92 @zowoq
257+
258+# GNOME
259+/pkgs/desktops/gnome @jtojnar @hedning
260+/pkgs/desktops/gnome/extensions @piegamesde @jtojnar @hedning
261+
262+# Cinnamon
263+/pkgs/desktops/cinnamon @mkg20001
264+
265+# nim
266+/pkgs/development/compilers/nim @ehmry
267+/pkgs/development/nim-packages @ehmry
268+/pkgs/top-level/nim-packages.nix @ehmry
269+
270+# terraform providers
271+/pkgs/applications/networking/cluster/terraform-providers @zowoq
272+
273+# kubernetes
274+/nixos/doc/manual/configuration/kubernetes.chapter.md @zowoq
275+/nixos/modules/services/cluster/kubernetes @zowoq
276+/nixos/tests/kubernetes @zowoq
277+/pkgs/applications/networking/cluster/kubernetes @zowoq
278+
279+# Matrix
280+/pkgs/servers/heisenbridge @piegamesde
281+/pkgs/servers/matrix-conduit @piegamesde
282+/pkgs/servers/matrix-synapse/matrix-appservice-irc @piegamesde
283+/nixos/modules/services/misc/heisenbridge.nix @piegamesde
284+/nixos/modules/services/misc/matrix-appservice-irc.nix @piegamesde
285+/nixos/modules/services/misc/matrix-conduit.nix @piegamesde
286+/nixos/tests/matrix-appservice-irc.nix @piegamesde
287+/nixos/tests/matrix-conduit.nix @piegamesde
288+
289+# Dotnet
290+/pkgs/build-support/dotnet @IvarWithoutBones
291+/pkgs/development/compilers/dotnet @IvarWithoutBones
.github/CONTRIBUTING.mddeleted−63
@@ -1,63 +0,0 @@
1−# How to contribute
2−
3−Note: contributing implies licensing those contributions
4−under the terms of [COPYING](../COPYING), which is an MIT-like license.
5−
6−## Opening issues
7−
8−* Make sure you have a [GitHub account](https://github.com/signup/free)
9−* Make sure there is no open issue on the topic
10−* [Submit a new issue](https://github.com/NixOS/nixpkgs/issues/new/choose) by choosing the kind of topic and fill out the template
11−
12−## Submitting changes
13−
14−* Format the commit messages in the following way:
15−
16− ```
17− (pkg-name | nixos/<module>): (from -> to | init at version | refactor | etc)
18−
19− (Motivation for change. Additional information.)
20− ```
21−
22− For consistency, there should not be a period at the end of the commit message's summary line (the first line of the commit message).
23−
24− Examples:
25−
26− * nginx: init at 2.0.1
27− * firefox: 54.0.1 -> 55.0
28− * nixos/hydra: add bazBaz option
29−
30− Dual baz behavior is needed to do foo.
31− * nixos/nginx: refactor config generation
32−
33− The old config generation system used impure shell scripts and could break in specific circumstances (see #1234).
34−
35−* `meta.description` should:
36− * Be capitalized.
37− * Not start with the package name.
38− * Not have a period at the end.
39−* `meta.license` must be set and fit the upstream license.
40− * If there is no upstream license, `meta.license` should default to `stdenv.lib.licenses.unfree`.
41−* `meta.maintainers` must be set.
42−
43−See the nixpkgs manual for more details on [standard meta-attributes](https://nixos.org/nixpkgs/manual/#sec-standard-meta-attributes) and on how to [submit changes to nixpkgs](https://nixos.org/nixpkgs/manual/#chap-submitting-changes).
44−
45−## Writing good commit messages
46−
47−In addition to writing properly formatted commit messages, it's important to include relevant information so other developers can later understand *why* a change was made. While this information usually can be found by digging code, mailing list/Discourse archives, pull request discussions or upstream changes, it may require a lot of work.
48−
49−For package version upgrades and such a one-line commit message is usually sufficient.
50−
51−## Backporting changes
52−
53−Follow these steps to backport a change into a release branch in compliance with the [commit policy](https://nixos.org/nixpkgs/manual/#submitting-changes-stable-release-branches).
54−
55−1. Take note of the commits in which the change was introduced into `master` branch.
56−2. Check out the target _release branch_, e.g. `release-20.09`. Do not use a _channel branch_ like `nixos-20.09` or `nixpkgs-20.09`.
57−3. Create a branch for your change, e.g. `git checkout -b backport`.
58−4. When the reason to backport is not obvious from the original commit message, use `git cherry-pick -xe <original commit>` and add a reason. Otherwise use `git cherry-pick -x <original commit>`. That's fine for minor version updates that only include security and bug fixes, commits that fixes an otherwise broken package or similar. Please also ensure the commits exists on the master branch; in the case of squashed or rebased merges, the commit hash will change and the new commits can be found in the merge message at the bottom of the master pull request.
59−5. Push to GitHub and open a backport pull request. Make sure to select the release branch (e.g. `release-20.09`) as the target branch of the pull request, and link to the pull request in which the original change was comitted to `master`. The pull request title should be the commit title with the release version as prefix, e.g. `[20.09]`.
60−
61−## Reviewing contributions
62−
63−See the nixpkgs manual for more details on how to [Review contributions](https://nixos.org/nixpkgs/manual/#chap-reviewing-contributions).
.github/ISSUE_TEMPLATE/bug_report.md+10−13
@@ -7,37 +7,34 @@ assignees: ''
77
88---
99
10−**Describe the bug**
10+### Describe the bug
1111A clear and concise description of what the bug is.
1212
13−**To Reproduce**
13+### Steps To Reproduce
1414Steps to reproduce the behavior:
15151. ...
16162. ...
17173. ...
1818
19−**Expected behavior**
19+### Expected behavior
2020A clear and concise description of what you expected to happen.
2121
22−**Screenshots**
22+### Screenshots
2323If applicable, add screenshots to help explain your problem.
2424
25−**Additional context**
25+### Additional context
2626Add any other context about the problem here.
2727
28−**Notify maintainers**
28+### Notify maintainers
2929<!--
3030Please @ people who are in the `meta.maintainers` list of the offending package or module.
3131If in doubt, check `git blame` for whoever last touched something.
3232-->
3333
34−**Metadata**
34+### Metadata
3535Please run `nix-shell -p nix-info --run "nix-info -m"` and paste the result.
3636
37−Maintainer information:
38−```yaml
39−# a list of nixpkgs attributes affected by the problem
40−attribute:
41−# a list of nixos modules affected by the problem
42−module:
37+```console
38+[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
39+output here
4340```
.github/ISSUE_TEMPLATE/out_of_date_package_report.md+3−3
@@ -13,10 +13,10 @@ assignees: ''
1313<!-- Note that these are hard requirements -->
1414
1515<!--
16−You can use the "Go to file" functionality on github to find the package
16+You can use the "Go to file" functionality on GitHub to find the package
1717Then you can go to the history for this package
1818Find the latest "package_name: old_version -> new_version" commit
19−The "new_version" is the the current version of the package
19+The "new_version" is the current version of the package
2020-->
2121- [ ] Checked the [nixpkgs master branch](https://github.com/NixOS/nixpkgs)
2222<!--
@@ -29,7 +29,7 @@ There's a high chance that you'll have the new version right away while helping
2929###### Project name
3030`nix search` name:
3131<!--
32−The current version can be found easily with the same process than above for checking the master branch
32+The current version can be found easily with the same process as above for checking the master branch
3333If an open PR is present for the package, take this version as the current one and link to the PR
3434-->
3535current version:
.github/PULL_REQUEST_TEMPLATE.md+32−19
@@ -1,28 +1,41 @@
1+###### Description of changes
2+
3+<!--
4+For package updates please link to a changelog or describe changes, this helps your fellow maintainers discover breaking updates.
5+For new packages please briefly describe the package or provide a link to its homepage.
6+-->
7+
8+###### Things done
9+
10+<!-- Please check what applies. Note that these are not hard requirements but merely serve as information for reviewers. -->
11+
12+- Built on platform(s)
13+ - [ ] x86_64-linux
14+ - [ ] aarch64-linux
15+ - [ ] x86_64-darwin
16+ - [ ] aarch64-darwin
17+- [ ] For non-Linux: Is `sandbox = true` set in `nix.conf`? (See [Nix manual](https://nixos.org/manual/nix/stable/command-ref/conf-file.html))
18+- [ ] Tested, as applicable:
19+ - [NixOS test(s)](https://nixos.org/manual/nixos/unstable/index.html#sec-nixos-tests) (look inside [nixos/tests](https://github.com/NixOS/nixpkgs/blob/master/nixos/tests))
20+ - and/or [package tests](https://nixos.org/manual/nixpkgs/unstable/#sec-package-tests)
21+ - or, for functions and "core" functionality, tests in [lib/tests](https://github.com/NixOS/nixpkgs/blob/master/lib/tests) or [pkgs/test](https://github.com/NixOS/nixpkgs/blob/master/pkgs/test)
22+ - made sure NixOS tests are [linked](https://nixos.org/manual/nixpkgs/unstable/#ssec-nixos-tests-linking) to the relevant packages
23+- [ ] Tested compilation of all packages that depend on this change using `nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"`. Note: all changes have to be committed, also see [nixpkgs-review usage](https://github.com/Mic92/nixpkgs-review#usage)
24+- [ ] Tested basic functionality of all binary files (usually in `./result/bin/`)
25+- [22.05 Release Notes (or backporting 21.11 Release notes)](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md#generating-2205-release-notes)
26+ - [ ] (Package updates) Added a release notes entry if the change is major or breaking
27+ - [ ] (Module updates) Added a release notes entry if the change is significant
28+ - [ ] (Module addition) Added a release notes entry if adding a new NixOS module
29+ - [ ] (Release notes changes) Ran `nixos/doc/manual/md-to-db.sh` to update generated release notes
30+- [ ] Fits [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md).
31+
132<!--
233To help with the large amounts of pull requests, we would appreciate your
334reviews of other pull requests, especially simple package updates. Just leave a
435comment describing what you have tested in the relevant package/service.
536Reviewing helps to reduce the average time-to-merge for everyone.
637Thanks a lot if you do!
38+
739List of open PRs: https://github.com/NixOS/nixpkgs/pulls
840Reviewing guidelines: https://nixos.org/manual/nixpkgs/unstable/#chap-reviewing-contributions
941-->
10−
11−###### Motivation for this change
12−
13−
14−###### Things done
15−
16−<!-- Please check what applies. Note that these are not hard requirements but merely serve as information for reviewers. -->
17−
18−- [ ] Tested using sandboxing ([nix.useSandbox](https://nixos.org/nixos/manual/options.html#opt-nix.useSandbox) on NixOS, or option `sandbox` in [`nix.conf`](https://nixos.org/nix/manual/#sec-conf-file) on non-NixOS linux)
19−- Built on platform(s)
20− - [ ] NixOS
21− - [ ] macOS
22− - [ ] other Linux distributions
23−- [ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside [nixos/tests](https://github.com/NixOS/nixpkgs/blob/master/nixos/tests))
24−- [ ] Tested compilation of all pkgs that depend on this change using `nix-shell -p nixpkgs-review --run "nixpkgs-review wip"`
25−- [ ] Tested execution of all binary files (usually in `./result/bin/`)
26−- [ ] Determined the impact on package closure size (by running `nix path-info -S` before and after)
27−- [ ] Ensured that relevant documentation is up to date
28−- [ ] Fits [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/.github/CONTRIBUTING.md).
.github/STALE-BOT.md+7−6
@@ -3,15 +3,16 @@
33- Thanks for your contribution!
44- To remove the stale label, just leave a new comment.
55- _How to find the right people to ping?_ &rarr; [`git blame`](https://git-scm.com/docs/git-blame) to the rescue! (or GitHub's history and blame buttons.)
6−- You can always ask for help on [our Discourse Forum](https://discourse.nixos.org/) or on the [#nixos IRC channel](https://webchat.freenode.net/#nixos).
6+- You can always ask for help on [our Discourse Forum](https://discourse.nixos.org/), [our Matrix room](https://matrix.to/#/#nix:nixos.org), or on the [#nixos IRC channel](https://web.libera.chat/#nixos).
77
88## Suggestions for PRs
99
10−1. If it is unfinished but you plan to finish it, please mark it as a draft.
11−2. If you don't expect to work on it any time soon, closing it with a short comment may encourage someone else to pick up your work.
12−3. To get things rolling again, rebase the PR against the target branch and address valid comments.
13−4. If you need a review to move forward, ask in [the Discourse thread for PRs that need help](https://discourse.nixos.org/t/prs-in-distress/3604).
14−5. If all you need is a merge, check the git history to find and [request reviews](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/requesting-a-pull-request-review) from people who usually merge related contributions.
10+1. GitHub sometimes doesn't notify people who commented / reviewed a PR previously, when you (force) push commits. If you have addressed the reviews you can [officially ask for a review](https://docs.github.com/en/free-pro-team@latest/github/collaborating-with-issues-and-pull-requests/requesting-a-pull-request-review) from those who commented to you or anyone else.
11+2. If it is unfinished but you plan to finish it, please mark it as a draft.
12+3. If you don't expect to work on it any time soon, closing it with a short comment may encourage someone else to pick up your work.
13+4. To get things rolling again, rebase the PR against the target branch and address valid comments.
14+5. If you need a review to move forward, ask in [the Discourse thread for PRs that need help](https://discourse.nixos.org/t/prs-in-distress/3604).
15+6. If all you need is a merge, check the git history to find and [request reviews](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/requesting-a-pull-request-review) from people who usually merge related contributions.
1516
1617## Suggestions for issues
1718
.github/labeler.ymlnew file+159
@@ -0,0 +1,159 @@
1+"6.topic: agda":
2+ - doc/languages-frameworks/agda.section.md
3+ - nixos/tests/agda.nix
4+ - pkgs/build-support/agda/**/*
5+ - pkgs/development/libraries/agda/**/*
6+ - pkgs/top-level/agda-packages.nix
7+
8+"6.topic: cinnamon":
9+ - pkgs/desktops/cinnamon/**/*
10+
11+"6.topic: emacs":
12+ - nixos/modules/services/editors/emacs.nix
13+ - nixos/modules/services/editors/emacs.xml
14+ - nixos/tests/emacs-daemon.nix
15+ - pkgs/applications/editors/emacs/elisp-packages/**/*
16+ - pkgs/applications/editors/emacs/**/*
17+ - pkgs/build-support/emacs/**/*
18+ - pkgs/top-level/emacs-packages.nix
19+
20+"6.topic: erlang":
21+ - doc/languages-frameworks/beam.section.md
22+ - pkgs/development/beam-modules/**/*
23+ - pkgs/development/interpreters/elixir/**/*
24+ - pkgs/development/interpreters/erlang/**/*
25+ - pkgs/development/tools/build-managers/rebar/**/*
26+ - pkgs/development/tools/build-managers/rebar3/**/*
27+ - pkgs/development/tools/erlang/**/*
28+ - pkgs/top-level/beam-packages.nix
29+
30+"6.topic: fetch":
31+ - pkgs/build-support/fetch*/**/*
32+
33+"6.topic: GNOME":
34+ - doc/languages-frameworks/gnome.section.md
35+ - nixos/modules/services/desktops/gnome/**/*
36+ - nixos/modules/services/x11/desktop-managers/gnome.nix
37+ - nixos/tests/gnome-xorg.nix
38+ - nixos/tests/gnome.nix
39+ - pkgs/desktops/gnome/**/*
40+
41+"6.topic: golang":
42+ - doc/languages-frameworks/go.section.md
43+ - pkgs/development/compilers/go/**/*
44+ - pkgs/development/go-modules/**/*
45+ - pkgs/development/go-packages/**/*
46+
47+"6.topic: haskell":
48+ - doc/languages-frameworks/haskell.section.md
49+ - maintainers/scripts/haskell/**/*
50+ - pkgs/development/compilers/ghc/**/*
51+ - pkgs/development/haskell-modules/**/*
52+ - pkgs/development/tools/haskell/**/*
53+ - pkgs/test/haskell/**/*
54+ - pkgs/top-level/haskell-packages.nix
55+ - pkgs/top-level/release-haskell.nix
56+
57+"6.topic: kernel":
58+ - pkgs/build-support/kernel/**/*
59+ - pkgs/os-specific/linux/kernel/**/*
60+
61+"6.topic: lua":
62+ - pkgs/development/interpreters/lua-5/**/*
63+ - pkgs/development/interpreters/luajit/**/*
64+ - pkgs/development/lua-modules/**/*
65+ - pkgs/top-level/lua-packages.nix
66+
67+"6.topic: nixos":
68+ - nixos/**/*
69+ - pkgs/os-specific/linux/nixos-rebuild/**/*
70+
71+"6.topic: nim":
72+ - doc/languages-frameworks/nim.section.md
73+ - pkgs/development/compilers/nim/*
74+ - pkgs/development/nim-packages/**/*
75+ - pkgs/top-level/nim-packages.nix
76+
77+"6.topic: ocaml":
78+ - doc/languages-frameworks/ocaml.section.md
79+ - pkgs/development/compilers/ocaml/**/*
80+ - pkgs/development/compilers/reason/**/*
81+ - pkgs/development/ocaml-modules/**/*
82+ - pkgs/development/tools/ocaml/**/*
83+ - pkgs/top-level/ocaml-packages.nix
84+
85+"6.topic: pantheon":
86+ - nixos/modules/services/desktops/pantheon/**/*
87+ - nixos/modules/services/x11/desktop-managers/pantheon.nix
88+ - nixos/modules/services/x11/display-managers/lightdm-greeters/pantheon.nix
89+ - nixos/tests/pantheon.nix
90+ - pkgs/desktops/pantheon/**/*
91+
92+"6.topic: policy discussion":
93+ - .github/**/*
94+
95+"6.topic: printing":
96+ - nixos/modules/services/printing/cupsd.nix
97+ - pkgs/misc/cups/**/*
98+
99+"6.topic: python":
100+ - doc/languages-frameworks/python.section.md
101+ - pkgs/development/interpreters/python/**/*
102+ - pkgs/development/python-modules/**/*
103+ - pkgs/top-level/python-packages.nix
104+
105+"6.topic: qt/kde":
106+ - doc/languages-frameworks/qt.section.md
107+ - nixos/modules/services/x11/desktop-managers/plasma5.nix
108+ - nixos/tests/plasma5.nix
109+ - pkgs/applications/kde/**/*
110+ - pkgs/desktops/plasma-5/**/*
111+ - pkgs/development/libraries/kde-frameworks/**/*
112+ - pkgs/development/libraries/qt-5/**/*
113+
114+"6.topic: ruby":
115+ - doc/languages-frameworks/ruby.section.md
116+ - pkgs/development/interpreters/ruby/**/*
117+ - pkgs/development/ruby-modules/**/*
118+
119+"6.topic: rust":
120+ - doc/languages-frameworks/rust.section.md
121+ - pkgs/build-support/rust/**/*
122+ - pkgs/development/compilers/rust/**/*
123+
124+"6.topic: stdenv":
125+ - pkgs/stdenv/**/*
126+
127+"6.topic: steam":
128+ - pkgs/games/steam/**/*
129+
130+"6.topic: systemd":
131+ - pkgs/os-specific/linux/systemd/**/*
132+ - nixos/modules/system/boot/systemd*/**/*
133+
134+"6.topic: TeX":
135+ - doc/languages-frameworks/texlive.section.md
136+ - pkgs/tools/typesetting/tex/**/*
137+
138+"6.topic: vim":
139+ - doc/languages-frameworks/vim.section.md
140+ - pkgs/applications/editors/vim/**/*
141+ - pkgs/applications/editors/vim/plugins/**/*
142+ - nixos/modules/programs/neovim.nix
143+ - pkgs/applications/editors/neovim/**/*
144+
145+"6.topic: xfce":
146+ - nixos/doc/manual/configuration/xfce.xml
147+ - nixos/modules/services/x11/desktop-managers/xfce.nix
148+ - nixos/tests/xfce.nix
149+ - pkgs/desktops/xfce/**/*
150+
151+"8.has: changelog":
152+ - nixos/doc/manual/release-notes/**/*
153+
154+"8.has: documentation":
155+ - doc/**/*
156+ - nixos/doc/**/*
157+
158+"8.has: module (update)":
159+ - nixos/modules/**/*
.github/workflows/backport.ymlnew file+35
@@ -0,0 +1,35 @@
1+name: Backport
2+on:
3+ pull_request_target:
4+ types: [closed, labeled]
5+
6+# WARNING:
7+# When extending this action, be aware that $GITHUB_TOKEN allows write access to
8+# the GitHub repository. This means that it should not evaluate user input in a
9+# way that allows code injection.
10+
11+jobs:
12+ backport:
13+ name: Backport Pull Request
14+ if: github.repository_owner == 'NixOS' && github.event.pull_request.merged == true && (github.event_name != 'labeled' || startsWith('backport', github.event.label.name))
15+ runs-on: ubuntu-latest
16+ steps:
17+ - uses: actions/checkout@v3
18+ with:
19+ # required to find all branches
20+ fetch-depth: 0
21+ ref: ${{ github.event.pull_request.head.sha }}
22+ - name: Create backport PRs
23+ # should be kept in sync with `version`
24+ uses: zeebe-io/backport-action@v0.0.5
25+ with:
26+ # Config README: https://github.com/zeebe-io/backport-action#backport-action
27+ github_token: ${{ secrets.GITHUB_TOKEN }}
28+ github_workspace: ${{ github.workspace }}
29+ # should be kept in sync with `uses`
30+ version: v0.0.5
31+ pull_description: |-
32+ Bot-based backport to `${target_branch}`, triggered by a label in #${pull_number}.
33+
34+ * [ ] Before merging, ensure that this backport complies with the [Criteria for Backporting](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md#criteria-for-backporting-changes).
35+ * Even as a non-commiter, if you find that it does not comply, leave a comment.
.github/workflows/basic-eval.ymlnew file+26
@@ -0,0 +1,26 @@
1+name: Basic evaluation checks
2+
3+on:
4+ workflow_dispatch
5+ # pull_request:
6+ # branches:
7+ # - master
8+ # - release-**
9+ # push:
10+ # branches:
11+ # - master
12+ # - release-**
13+jobs:
14+ tests:
15+ runs-on: ubuntu-latest
16+ # we don't limit this action to only NixOS repo since the checks are cheap and useful developer feedback
17+ steps:
18+ - uses: actions/checkout@v3
19+ - uses: cachix/install-nix-action@v17
20+ - uses: cachix/cachix-action@v10
21+ with:
22+ # This cache is for the nixpkgs repo checks and should not be trusted or used elsewhere.
23+ name: nixpkgs-ci
24+ signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
25+ # explicit list of supportedSystems is needed until aarch64-darwin becomes part of the trunk jobset
26+ - run: nix-build pkgs/top-level/release.nix -A tarball.nixpkgs-basic-release-checks --arg supportedSystems '[ "aarch64-darwin" "aarch64-linux" "x86_64-linux" "x86_64-darwin" ]'
.github/workflows/direct-push.ymlnew file+32
@@ -0,0 +1,32 @@
1+name: "Direct Push Warning"
2+on:
3+ push:
4+ branches:
5+ - master
6+ - release-**
7+jobs:
8+ build:
9+ runs-on: ubuntu-latest
10+ if: github.repository_owner == 'NixOS'
11+ env:
12+ GITHUB_SHA: ${{ github.sha }}
13+ GITHUB_REPOSITORY: ${{ github.repository }}
14+ steps:
15+ - name: Check if commit is a merge commit
16+ id: ismerge
17+ run: |
18+ ISMERGE=$(curl -H 'Accept: application/vnd.github.groot-preview+json' -H "authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/${{ env.GITHUB_REPOSITORY }}/commits/${{ env.GITHUB_SHA }}/pulls | jq -r '.[] | select(.merge_commit_sha == "${{ env.GITHUB_SHA }}") | any')
19+ echo "::set-output name=ismerge::$ISMERGE"
20+ # github events are eventually consistent, so wait until changes propagate to thier DB
21+ - run: sleep 60
22+ if: steps.ismerge.outputs.ismerge != 'true'
23+ - name: Warn if the commit was a direct push
24+ if: steps.ismerge.outputs.ismerge != 'true'
25+ uses: peter-evans/commit-comment@v2
26+ with:
27+ body: |
28+ @${{ github.actor }}, you pushed a commit directly to master/release branch
29+ instead of going through a Pull Request.
30+
31+ That's highly discouraged beyond the few exceptions listed
32+ on https://github.com/NixOS/nixpkgs/issues/118661
.github/workflows/editorconfig.yml+29−15
@@ -1,29 +1,43 @@
11name: "Checking EditorConfig"
22
3+permissions: read-all
4+
35on:
4− pull_request:
6+ # avoids approving first time contributors
7+ pull_request_target:
58 branches-ignore:
69 - 'release-**'
710
811jobs:
912 tests:
1013 runs-on: ubuntu-latest
14+ if: "github.repository_owner == 'NixOS' && !contains(github.event.pull_request.title, '[skip editorconfig]')"
1115 steps:
12− - uses: actions/checkout@v2
13− with:
14− fetch-depth: 0
15− - uses: technote-space/get-diff-action@v4.0.0
16− - name: Fetch editorconfig-checker
17− if: env.GIT_DIFF
16+ - name: Get list of changed files from PR
1817 env:
19− ECC_VERSION: "2.2.0"
20− ECC_URL: "https://github.com/editorconfig-checker/editorconfig-checker/releases/download"
18+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19+ run: |
20+ gh api \
21+ repos/NixOS/nixpkgs/pulls/${{github.event.number}}/files --paginate \
22+ | jq '.[] | select(.status != "removed") | .filename' \
23+ > "$HOME/changed_files"
24+ - name: print list of changed files
2125 run: |
22− curl -sSf -O -L -C - "$ECC_URL/$ECC_VERSION/ec-linux-amd64.tar.gz" && \
23− tar xzf ec-linux-amd64.tar.gz && \
24− mv ./bin/ec-linux-amd64 ./bin/editorconfig-checker
26+ cat "$HOME/changed_files"
27+ - uses: actions/checkout@v3
28+ with:
29+ # pull_request_target checks out the base branch by default
30+ ref: refs/pull/${{ github.event.pull_request.number }}/merge
31+ - uses: cachix/install-nix-action@v17
32+ with:
33+ # nixpkgs commit is pinned so that it doesn't break
34+ # editorconfig-checker 2.4.0
35+ nix_path: nixpkgs=https://github.com/NixOS/nixpkgs/archive/c473cc8714710179df205b153f4e9fa007107ff9.tar.gz
36+ - name: install editorconfig-checker
37+ run: nix-env -iA editorconfig-checker -f '<nixpkgs>'
2538 - name: Checking EditorConfig
26− if: env.GIT_DIFF
2739 run: |
28− ./bin/editorconfig-checker -disable-indent-size \
29− ${{ env.GIT_DIFF }}
40+ cat "$HOME/changed_files" | xargs -r editorconfig-checker -disable-indent-size
41+ - if: ${{ failure() }}
42+ run: |
43+ echo "::error :: Hey! It looks like your changes don't follow our editorconfig settings. Read https://editorconfig.org/#download to configure your editor so you never see this error again."
.github/workflows/labels.ymlnew file+24
@@ -0,0 +1,24 @@
1+name: "Label PR"
2+
3+on:
4+ pull_request_target:
5+ types: [edited, opened, synchronize, reopened]
6+
7+# WARNING:
8+# When extending this action, be aware that $GITHUB_TOKEN allows some write
9+# access to the GitHub API. This means that it should not evaluate user input in
10+# a way that allows code injection.
11+
12+permissions:
13+ contents: read
14+ pull-requests: write
15+
16+jobs:
17+ labels:
18+ runs-on: ubuntu-latest
19+ if: github.repository_owner == 'NixOS'
20+ steps:
21+ - uses: actions/labeler@v4
22+ with:
23+ repo-token: ${{ secrets.GITHUB_TOKEN }}
24+ sync-labels: true
.github/workflows/manual-nixos.ymlnew file+31
@@ -0,0 +1,31 @@
1+name: "Build NixOS manual"
2+
3+permissions: read-all
4+
5+on:
6+ pull_request_target:
7+ branches:
8+ - master
9+ paths:
10+ - 'nixos/**'
11+
12+jobs:
13+ nixos:
14+ runs-on: ubuntu-latest
15+ if: github.repository_owner == 'NixOS'
16+ steps:
17+ - uses: actions/checkout@v3
18+ with:
19+ # pull_request_target checks out the base branch by default
20+ ref: refs/pull/${{ github.event.pull_request.number }}/merge
21+ - uses: cachix/install-nix-action@v17
22+ with:
23+ # explicitly enable sandbox
24+ extra_nix_config: sandbox = true
25+ - uses: cachix/cachix-action@v10
26+ with:
27+ # This cache is for the nixpkgs repo checks and should not be trusted or used elsewhere.
28+ name: nixpkgs-ci
29+ signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
30+ - name: Building NixOS manual
31+ run: NIX_PATH=nixpkgs=$(pwd) nix-build --option restrict-eval true nixos/release.nix -A manual.x86_64-linux
.github/workflows/manual-nixpkgs.ymlnew file+31
@@ -0,0 +1,31 @@
1+name: "Build Nixpkgs manual"
2+
3+permissions: read-all
4+
5+on:
6+ pull_request_target:
7+ branches:
8+ - master
9+ paths:
10+ - 'doc/**'
11+
12+jobs:
13+ nixpkgs:
14+ runs-on: ubuntu-latest
15+ if: github.repository_owner == 'NixOS'
16+ steps:
17+ - uses: actions/checkout@v3
18+ with:
19+ # pull_request_target checks out the base branch by default
20+ ref: refs/pull/${{ github.event.pull_request.number }}/merge
21+ - uses: cachix/install-nix-action@v17
22+ with:
23+ # explicitly enable sandbox
24+ extra_nix_config: sandbox = true
25+ - uses: cachix/cachix-action@v10
26+ with:
27+ # This cache is for the nixpkgs repo checks and should not be trusted or used elsewhere.
28+ name: nixpkgs-ci
29+ signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
30+ - name: Building Nixpkgs manual
31+ run: NIX_PATH=nixpkgs=$(pwd) nix-build --option restrict-eval true pkgs/top-level/release.nix -A manual
.github/workflows/nixos-manual.ymlnew file+26
@@ -0,0 +1,26 @@
1+name: NixOS manual checks
2+
3+permissions: read-all
4+
5+on:
6+ pull_request_target:
7+ branches-ignore:
8+ - 'release-**'
9+ paths:
10+ - 'nixos/**/*.xml'
11+ - 'nixos/**/*.md'
12+
13+jobs:
14+ tests:
15+ runs-on: ubuntu-latest
16+ if: github.repository_owner == 'NixOS'
17+ steps:
18+ - uses: actions/checkout@v3
19+ with:
20+ # pull_request_target checks out the base branch by default
21+ ref: refs/pull/${{ github.event.pull_request.number }}/merge
22+ - uses: cachix/install-nix-action@v17
23+ - name: Check DocBook files generated from Markdown are consistent
24+ run: |
25+ nixos/doc/manual/md-to-db.sh
26+ git diff --exit-code
.github/workflows/no-channel.ymlnew file+21
@@ -0,0 +1,21 @@
1+name: "No channel PR"
2+
3+on:
4+ pull_request:
5+ branches:
6+ - 'nixos-**'
7+ - 'nixpkgs-**'
8+
9+jobs:
10+ fail:
11+ name: "This PR is is targeting a channel branch"
12+ runs-on: ubuntu-latest
13+ steps:
14+ - run: |
15+ cat <<EOF
16+ The nixos-* and nixpkgs-* branches are pushed to by the channel
17+ release script and should not be merged into directly.
18+
19+ Please target the equivalent release-* branch or master instead.
20+ EOF
21+ exit 1
.github/workflows/pending-set.yml+6−1
@@ -3,6 +3,11 @@ name: "set pending status"
33on:
44 pull_request_target:
55
6+# WARNING:
7+# When extending this action, be aware that $GITHUB_TOKEN allows write access to
8+# the GitHub repository. This means that it should not evaluate user input in a
9+# way that allows code injection.
10+
611jobs:
712 action:
813 runs-on: ubuntu-latest
@@ -16,5 +21,5 @@ jobs:
1621 -X POST \
1722 -H "Accept: application/vnd.github.v3+json" \
1823 -H "Authorization: token $GITHUB_TOKEN" \
19− -d '{"state": "failure", "target_url": " ", "description": "This failed status will be cleared when ofborg finishes eval.", "context": "Wait for ofborg"}' \
24+ -d '{"state": "pending", "target_url": " ", "description": "This pending status will be cleared when ofborg starts eval.", "context": "Wait for ofborg"}' \
2025 "https://api.github.com/repos/NixOS/nixpkgs/statuses/${{ github.event.pull_request.head.sha }}"
.github/workflows/periodic-merge-24h.ymlnew file+57
@@ -0,0 +1,57 @@
1+# This action periodically merges base branches into staging branches.
2+# This is done to
3+# * prevent conflicts or rather resolve them early
4+# * make all potential breakage happen on the staging branch
5+# * and make sure that all major rebuilds happen before the staging
6+# branch get’s merged back into its base branch.
7+
8+name: "Periodic Merges (24h)"
9+
10+
11+on:
12+ schedule:
13+ # * is a special character in YAML so you have to quote this string
14+ # Merge every 24 hours
15+ - cron: '0 0 * * *'
16+
17+jobs:
18+ periodic-merge:
19+ if: github.repository_owner == 'NixOS'
20+ runs-on: ubuntu-latest
21+ strategy:
22+ # don't fail fast, so that all pairs are tried
23+ fail-fast: false
24+ # certain branches need to be merged in order, like master->staging-next->staging
25+ # and disabling parallelism ensures the order of the pairs below.
26+ max-parallel: 1
27+ matrix:
28+ pairs:
29+ - from: master
30+ into: haskell-updates
31+ - from: release-21.05
32+ into: staging-next-21.05
33+ - from: staging-next-21.05
34+ into: staging-21.05
35+ - from: release-21.11
36+ into: staging-next-21.11
37+ - from: staging-next-21.11
38+ into: staging-21.11
39+ name: ${{ matrix.pairs.from }} → ${{ matrix.pairs.into }}
40+ steps:
41+ - uses: actions/checkout@v3
42+
43+ - name: ${{ matrix.pairs.from }} → ${{ matrix.pairs.into }}
44+ uses: devmasx/merge-branch@1.4.0
45+ with:
46+ type: now
47+ from_branch: ${{ matrix.pairs.from }}
48+ target_branch: ${{ matrix.pairs.into }}
49+ github_token: ${{ secrets.GITHUB_TOKEN }}
50+
51+ - name: Comment on failure
52+ uses: peter-evans/create-or-update-comment@v2
53+ if: ${{ failure() }}
54+ with:
55+ issue-number: 105153
56+ body: |
57+ Periodic merge from `${{ matrix.pairs.from }}` into `${{ matrix.pairs.into }}` has [failed](https://github.com/NixOS/nixpkgs/actions/runs/${{ github.run_id }}).
.github/workflows/periodic-merge-6h.ymlnew file+51
@@ -0,0 +1,51 @@
1+# This action periodically merges base branches into staging branches.
2+# This is done to
3+# * prevent conflicts or rather resolve them early
4+# * make all potential breakage happen on the staging branch
5+# * and make sure that all major rebuilds happen before the staging
6+# branch get’s merged back into its base branch.
7+
8+name: "Periodic Merges (6h)"
9+
10+
11+on:
12+ schedule:
13+ # * is a special character in YAML so you have to quote this string
14+ # Merge every 6 hours
15+ - cron: '0 */6 * * *'
16+
17+jobs:
18+ periodic-merge:
19+ if: github.repository_owner == 'NixOS'
20+ runs-on: ubuntu-latest
21+ strategy:
22+ # don't fail fast, so that all pairs are tried
23+ fail-fast: false
24+ # certain branches need to be merged in order, like master->staging-next->staging
25+ # and disabling parallelism ensures the order of the pairs below.
26+ max-parallel: 1
27+ matrix:
28+ pairs:
29+ - from: master
30+ into: staging-next
31+ - from: staging-next
32+ into: staging
33+ name: ${{ matrix.pairs.from }} → ${{ matrix.pairs.into }}
34+ steps:
35+ - uses: actions/checkout@v3
36+
37+ - name: ${{ matrix.pairs.from }} → ${{ matrix.pairs.into }}
38+ uses: devmasx/merge-branch@1.4.0
39+ with:
40+ type: now
41+ from_branch: ${{ matrix.pairs.from }}
42+ target_branch: ${{ matrix.pairs.into }}
43+ github_token: ${{ secrets.GITHUB_TOKEN }}
44+
45+ - name: Comment on failure
46+ uses: peter-evans/create-or-update-comment@v2
47+ if: ${{ failure() }}
48+ with:
49+ issue-number: 105153
50+ body: |
51+ Periodic merge from `${{ matrix.pairs.from }}` into `${{ matrix.pairs.into }}` has [failed](https://github.com/NixOS/nixpkgs/actions/runs/${{ github.run_id }}).
.github/workflows/update-terraform-providers.ymlnew file+48
@@ -0,0 +1,48 @@
1+name: "Update terraform-providers"
2+
3+on:
4+ schedule:
5+ - cron: "14 3 * * 1"
6+ workflow_dispatch:
7+
8+jobs:
9+ tf-providers:
10+ if: github.repository_owner == 'NixOS' && github.ref == 'refs/heads/master' # ensure workflow_dispatch only runs on master
11+ runs-on: ubuntu-latest
12+ steps:
13+ - uses: actions/checkout@v3
14+ - uses: cachix/install-nix-action@v17
15+ - name: setup
16+ id: setup
17+ run: |
18+ echo ::set-output name=title::"terraform-providers: update $(date -u +"%Y-%m-%d")"
19+ - name: update terraform-providers
20+ run: |
21+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
22+ git config user.name "github-actions[bot]"
23+ pushd pkgs/applications/networking/cluster/terraform-providers
24+ ./update-all-providers --no-build
25+ git commit -m "${{ steps.setup.outputs.title }}" providers.json
26+ popd
27+ - name: create PR
28+ uses: peter-evans/create-pull-request@v4
29+ with:
30+ body: |
31+ Automatic update by [update-terraform-providers](https://github.com/NixOS/nixpkgs/blob/master/.github/workflows/update-terraform-providers.yml) action.
32+
33+ Check that all providers build with:
34+ ```
35+ @ofborg build terraform-full
36+ ```
37+ branch: terraform-providers-update
38+ delete-branch: false
39+ labels: "2.status: work-in-progress"
40+ title: ${{ steps.setup.outputs.title }}
41+ token: ${{ secrets.GITHUB_TOKEN }}
42+ - name: comment on failure
43+ uses: peter-evans/create-or-update-comment@v2
44+ if: ${{ failure() }}
45+ with:
46+ issue-number: 153416
47+ body: |
48+ Automatic update of terraform providers [failed](https://github.com/NixOS/nixpkgs/actions/runs/${{ github.run_id }}).
.gitignore+7
@@ -2,8 +2,12 @@
22,*
33.*.swp
44.*.swo
5+.idea/
6+.vscode/
7+outputs/
58result
69result-*
10+source/
711/doc/NEWS.html
812/doc/NEWS.txt
913/doc/manual.html
@@ -20,3 +24,6 @@ __pycache__
2024
2125# generated by pkgs/common-updater/update-script.nix
2226update-git-commits.txt
27+
28+# JetBrains IDEA module declaration file
29+/nixpkgs.iml
.version+1−1
@@ -1 +1 @@
1−21.03
1+22.05
CONTRIBUTING.mdnew file+130
@@ -0,0 +1,130 @@
1+# How to contribute
2+
3+Note: contributing implies licensing those contributions
4+under the terms of [COPYING](COPYING), which is an MIT-like license.
5+
6+## Opening issues
7+
8+* Make sure you have a [GitHub account](https://github.com/signup/free)
9+* Make sure there is no open issue on the topic
10+* [Submit a new issue](https://github.com/NixOS/nixpkgs/issues/new/choose) by choosing the kind of topic and fill out the template
11+
12+## Submitting changes
13+
14+Read the ["Submitting changes"](https://nixos.org/nixpkgs/manual/#chap-submitting-changes) section of the nixpkgs manual. It explains how to write, test, and iterate on your change, and which branch to base your pull request against.
15+
16+Below is a short excerpt of some points in there:
17+
18+* Format the commit messages in the following way:
19+
20+ ```
21+ (pkg-name | nixos/<module>): (from -> to | init at version | refactor | etc)
22+
23+ (Motivation for change. Link to release notes. Additional information.)
24+ ```
25+
26+ For consistency, there should not be a period at the end of the commit message's summary line (the first line of the commit message).
27+
28+ Examples:
29+
30+ * nginx: init at 2.0.1
31+ * firefox: 54.0.1 -> 55.0
32+ https://www.mozilla.org/en-US/firefox/55.0/releasenotes/
33+ * nixos/hydra: add bazBaz option
34+
35+ Dual baz behavior is needed to do foo.
36+ * nixos/nginx: refactor config generation
37+
38+ The old config generation system used impure shell scripts and could break in specific circumstances (see #1234).
39+
40+* `meta.description` should:
41+ * Be capitalized.
42+ * Not start with the package name.
43+ * Not have a period at the end.
44+* `meta.license` must be set and fit the upstream license.
45+ * If there is no upstream license, `meta.license` should default to `lib.licenses.unfree`.
46+* `meta.maintainers` must be set.
47+
48+See the nixpkgs manual for more details on [standard meta-attributes](https://nixos.org/nixpkgs/manual/#sec-standard-meta-attributes).
49+
50+## Writing good commit messages
51+
52+In addition to writing properly formatted commit messages, it's important to include relevant information so other developers can later understand *why* a change was made. While this information usually can be found by digging code, mailing list/Discourse archives, pull request discussions or upstream changes, it may require a lot of work.
53+
54+For package version upgrades and such a one-line commit message is usually sufficient.
55+
56+## Rebasing between branches (i.e. from master to staging)
57+
58+From time to time, changes between branches must be rebased, for example, if the
59+number of new rebuilds they would cause is too large for the target branch. When
60+rebasing, care must be taken to include only the intended changes, otherwise
61+many CODEOWNERS will be inadvertently requested for review. To achieve this,
62+rebasing should not be performed directly on the target branch, but on the merge
63+base between the current and target branch.
64+
65+In the following example, we see a rebase from `master` onto the merge base
66+between `master` and `staging`, so that a change can eventually be retargeted to
67+`staging`. The example uses `upstream` as the remote for `NixOS/nixpkgs.git`
68+while the `origin` remote is used for the remote you are pushing to.
69+
70+
71+```console
72+# Find the common base between two branches
73+common=$(git merge-base upstream/master upstream/staging)
74+# Find the common base between your feature branch and master
75+commits=$(git merge-base $(git branch --show-current) upstream/master)
76+# Rebase all commits onto the common base
77+git rebase --onto=$common $commits
78+# Force push your changes
79+git push origin $(git branch --show-current) --force-with-lease
80+```
81+
82+Then change the base branch in the GitHub PR using the *Edit* button in the upper
83+right corner, and switch from `master` to `staging`. After the PR has been
84+retargeted it might be necessary to do a final rebase onto the target branch, to
85+resolve any outstanding merge conflicts.
86+
87+```console
88+# Rebase onto target branch
89+git rebase upstream/staging
90+# Review and fixup possible conflicts
91+git status
92+# Force push your changes
93+git push origin $(git branch --show-current) --force-with-lease
94+```
95+
96+## Backporting changes
97+
98+Follow these steps to backport a change into a release branch in compliance with the [commit policy](https://nixos.org/nixpkgs/manual/#submitting-changes-stable-release-branches).
99+
100+1. Take note of the commits in which the change was introduced into `master` branch.
101+2. Check out the target _release branch_, e.g. `release-21.11`. Do not use a _channel branch_ like `nixos-21.11` or `nixpkgs-21.11-darwin`.
102+3. Create a branch for your change, e.g. `git checkout -b backport`.
103+4. When the reason to backport is not obvious from the original commit message, use `git cherry-pick -xe <original commit>` and add a reason. Otherwise use `git cherry-pick -x <original commit>`. That's fine for minor version updates that only include security and bug fixes, commits that fixes an otherwise broken package or similar. Please also ensure the commits exists on the master branch; in the case of squashed or rebased merges, the commit hash will change and the new commits can be found in the merge message at the bottom of the master pull request.
104+5. Push to GitHub and open a backport pull request. Make sure to select the release branch (e.g. `release-21.11`) as the target branch of the pull request, and link to the pull request in which the original change was comitted to `master`. The pull request title should be the commit title with the release version as prefix, e.g. `[21.11]`.
105+6. When the backport pull request is merged and you have the necessary privileges you can also replace the label `9.needs: port to stable` with `8.has: port to stable` on the original pull request. This way maintainers can keep track of missing backports easier.
106+
107+## Criteria for Backporting changes
108+
109+Anything that does not cause user or downstream dependency regressions can be backported. This includes:
110+- New Packages / Modules
111+- Security / Patch updates
112+- Version updates which include new functionality (but no breaking changes)
113+- Services which require a client to be up-to-date regardless. (E.g. `spotify`, `steam`, or `discord`)
114+- Security critical applications (E.g. `firefox`)
115+
116+## Generating 22.05 Release Notes
117+
118+(This section also applies to backporting 21.11 release notes: substitute "rl-2205" for "rl-2111".)
119+
120+Documentation in nixpkgs is transitioning to a markdown-centric workflow. Release notes now require a translation step to convert from markdown to a compatible docbook document.
121+
122+Steps for updating 22.05 Release notes:
123+
124+1. Edit `nixos/doc/manual/release-notes/rl-2205.section.md` with the desired changes
125+2. Run `./nixos/doc/manual/md-to-db.sh` to render `nixos/doc/manual/from_md/release-notes/rl-2205.section.xml`
126+3. Include changes to `rl-2205.section.md` and `rl-2205.section.xml` in the same commit.
127+
128+## Reviewing contributions
129+
130+See the nixpkgs manual for more details on how to [Review contributions](https://nixos.org/nixpkgs/manual/#chap-reviewing-contributions).
COPYING+1−1
@@ -1,4 +1,4 @@
1−Copyright (c) 2003-2020 Eelco Dolstra and the Nixpkgs/NixOS contributors
1+Copyright (c) 2003-2022 Eelco Dolstra and the Nixpkgs/NixOS contributors
22
33Permission is hereby granted, free of charge, to any person obtaining
44a copy of this software and associated documentation files (the
README.md+18−12
@@ -1,14 +1,19 @@
11<p align="center">
2− <a href="https://nixos.org/nixos"><img src="https://nixos.org/logo/nixos-hires.png" width="500px" alt="NixOS logo" /></a>
2+ <a href="https://nixos.org#gh-light-mode-only">
3+ <img src="https://raw.githubusercontent.com/NixOS/nixos-homepage/master/logo/nixos-hires.png" width="500px" alt="NixOS logo"/>
4+ </a>
5+ <a href="https://nixos.org#gh-dark-mode-only">
6+ <img src="https://raw.githubusercontent.com/NixOS/nixos-artwork/master/logo/nixos-white.png" width="500px" alt="NixOS logo"/>
7+ </a>
38</p>
49
510<p align="center">
6− <a href="https://www.codetriage.com/nixos/nixpkgs"><img src="https://www.codetriage.com/nixos/nixpkgs/badges/users.svg" alt="Code Triagers badge" /></a>
7− <a href="https://opencollective.com/nixos"><img src="https://opencollective.com/nixos/tiers/supporter/badge.svg?label=Supporter&color=brightgreen" alt="Open Collective supporters" /></a>
11+ <a href="https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md"><img src="https://img.shields.io/github/contributors-anon/NixOS/nixpkgs" alt="Contributors badge" /></a>
12+ <a href="https://opencollective.com/nixos"><img src="https://opencollective.com/nixos/tiers/supporter/badge.svg?label=supporters&color=brightgreen" alt="Open Collective supporters" /></a>
813</p>
914
1015[Nixpkgs](https://github.com/nixos/nixpkgs) is a collection of over
11−60,000 software packages that can be installed with the
16+80,000 software packages that can be installed with the
1217[Nix](https://nixos.org/nix/) package manager. It also implements
1318[NixOS](https://nixos.org/nixos/), a purely-functional Linux distribution.
1419
@@ -21,10 +26,10 @@
2126# Community
2227
2328* [Discourse Forum](https://discourse.nixos.org/)
24−* [IRC - #nixos on freenode.net](irc://irc.freenode.net/#nixos)
29+* [Matrix Chat](https://matrix.to/#/#community:nixos.org)
2530* [NixOS Weekly](https://weekly.nixos.org/)
2631* [Community-maintained wiki](https://nixos.wiki/)
27−* [Community-maintained list of ways to get in touch](https://nixos.wiki/wiki/Get_In_Touch#Chat) (Discord, Matrix, Telegram, other IRC channels, etc.)
32+* [Community-maintained list of ways to get in touch](https://nixos.wiki/wiki/Get_In_Touch#Chat) (Discord, Telegram, IRC, etc.)
2833
2934# Other Project Repositories
3035
@@ -46,21 +51,21 @@ Nixpkgs and NixOS are built and tested by our continuous integration
4651system, [Hydra](https://hydra.nixos.org/).
4752
4853* [Continuous package builds for unstable/master](https://hydra.nixos.org/jobset/nixos/trunk-combined)
49−* [Continuous package builds for the NixOS 20.09 release](https://hydra.nixos.org/jobset/nixos/release-20.09)
54+* [Continuous package builds for the NixOS 21.11 release](https://hydra.nixos.org/jobset/nixos/release-21.11)
5055* [Tests for unstable/master](https://hydra.nixos.org/job/nixos/trunk-combined/tested#tabs-constituents)
51−* [Tests for the NixOS 20.09 release](https://hydra.nixos.org/job/nixos/release-20.09/tested#tabs-constituents)
56+* [Tests for the NixOS 21.11 release](https://hydra.nixos.org/job/nixos/release-21.11/tested#tabs-constituents)
5257
5358Artifacts successfully built with Hydra are published to cache at
5459https://cache.nixos.org/. When successful build and test criteria are
5560met, the Nixpkgs expressions are distributed via [Nix
56−channels](https://nixos.org/nix/manual/#sec-channels).
61+channels](https://nixos.org/manual/nix/stable/package-management/channels.html).
5762
5863# Contributing
5964
6065Nixpkgs is among the most active projects on GitHub. While thousands
6166of open issues and pull requests might seem a lot at first, it helps
6267consider it in the context of the scope of the project. Nixpkgs
63−describes how to build over 40,000 pieces of software and implements a
68+describes how to build tens of thousands of pieces of software and implements a
6469Linux distribution. The [GitHub Insights](https://github.com/NixOS/nixpkgs/pulse)
6570page gives a sense of the project activity.
6671
@@ -87,7 +92,7 @@ Most contributions are based on and merged into these branches:
8792 deemed of sufficiently high quality
8893
8994For more information about contributing to the project, please visit
90−the [contributing page](https://github.com/NixOS/nixpkgs/blob/master/.github/CONTRIBUTING.md).
95+the [contributing page](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md).
9196
9297# Donations
9398
@@ -97,7 +102,8 @@ Foundation](https://nixos.org/nixos/foundation.html). To ensure the
97102continuity and expansion of the NixOS infrastructure, we are looking
98103for donations to our organization.
99104
100−You can donate to the NixOS foundation by using Open Collective:
105+You can donate to the NixOS foundation through [SEPA bank
106+transfers](https://nixos.org/donate.html) or by using Open Collective:
101107
102108<a href="https://opencollective.com/nixos#support"><img src="https://opencollective.com/nixos/tiers/supporter.svg?width=890" /></a>
103109
doc/Makefile+26−20
@@ -1,4 +1,20 @@
1−MD_TARGETS=$(addsuffix .xml, $(basename $(shell find . -type f -regex '.*\.md$$')))
1+MD_TARGETS=$(addsuffix .xml, $(basename $(shell find . -type f -regex '.*\.md$$' -not -name README.md)))
2+
3+PANDOC ?= pandoc
4+
5+pandoc_media_dir = media
6+# NOTE: Keep in sync with NixOS manual (/nixos/doc/manual/md-to-db.sh) and conversion script (/maintainers/scripts/db-to-md.sh).
7+# TODO: Remove raw-attribute when we can get rid of DocBook altogether.
8+pandoc_commonmark_enabled_extensions = +attributes+fenced_divs+footnotes+bracketed_spans+definition_lists+pipe_tables+raw_attribute
9+# Not needed:
10+# - docbook-reader/citerefentry-to-rst-role.lua (only relevant for DocBook → MarkDown/rST/MyST)
11+pandoc_flags = --extract-media=$(pandoc_media_dir) \
12+ --lua-filter=$(PANDOC_LUA_FILTERS_DIR)/diagram-generator.lua \
13+ --lua-filter=build-aux/pandoc-filters/myst-reader/roles.lua \
14+ --lua-filter=build-aux/pandoc-filters/link-unix-man-references.lua \
15+ --lua-filter=build-aux/pandoc-filters/docbook-writer/rst-roles.lua \
16+ --lua-filter=build-aux/pandoc-filters/docbook-writer/labelless-link-is-xref.lua \
17+ -f commonmark$(pandoc_commonmark_enabled_extensions)+smart
218
319.PHONY: all
420all: validate format out/html/index.html out/epub/manual.epub
@@ -22,7 +38,7 @@ fix-misc-xml:
2238.PHONY: clean
2339clean:
2440 rm -f ${MD_TARGETS} doc-support/result .version manual-full.xml functions/library/locations.xml functions/library/generated
25− rm -rf ./out/ ./highlightjs
41+ rm -rf ./out/ ./highlightjs ./media
2642
2743.PHONY: validate
2844validate: manual-full.xml doc-support/result
@@ -39,6 +55,7 @@ out/html/index.html: doc-support/result manual-full.xml style.css highlightjs
3955 mkdir -p out/html/highlightjs/
4056 cp -r highlightjs out/html/
4157
58+ cp -r $(pandoc_media_dir) out/html/
4259 cp ./overrides.css out/html/
4360 cp ./style.css out/html/style.css
4461
@@ -53,6 +70,7 @@ out/epub/manual.epub: manual-full.xml
5370 doc-support/result/epub.xsl \
5471 ./manual-full.xml
5572
73+ cp -r $(pandoc_media_dir) out/epub/scratch/OEBPS
5674 cp ./overrides.css out/epub/scratch/OEBPS
5775 cp ./style.css out/epub/scratch/OEBPS
5876 mkdir -p out/epub/scratch/OEBPS/images/callouts/
@@ -87,24 +105,12 @@ functions/library/generated: doc-support/result
87105 ln -rfs ./doc-support/result/function-docs functions/library/generated
88106
89107%.section.xml: %.section.md
90− pandoc $^ -w docbook \
91− -f markdown+smart \
92− | sed -e 's|<ulink url=|<link xlink:href=|' \
93− -e 's|</ulink>|</link>|' \
94− -e 's|<sect. id=|<section xml:id=|' \
95− -e 's|</sect[0-9]>|</section>|' \
96− -e '1s| id=| xml:id=|' \
97− -e '1s|\(<[^ ]* \)|\1xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" |' \
98− | cat > $@
108+ $(PANDOC) $^ -t docbook \
109+ $(pandoc_flags) \
110+ -o $@
99111
100112%.chapter.xml: %.chapter.md
101− pandoc $^ -w docbook \
113+ $(PANDOC) $^ -t docbook \
102114 --top-level-division=chapter \
103− -f markdown+smart \
104− | sed -e 's|<ulink url=|<link xlink:href=|' \
105− -e 's|</ulink>|</link>|' \
106− -e 's|<sect. id=|<section xml:id=|' \
107− -e 's|</sect[0-9]>|</section>|' \
108− -e '1s| id=| xml:id=|' \
109− -e '1s|\(<[^ ]* \)|\1|' \
110− | cat > $@
115+ $(pandoc_flags) \
116+ -o $@
doc/README.mdnew file+12
@@ -0,0 +1,12 @@
1+
2+# Nixpkgs/doc
3+
4+This directory houses the sources files for the Nixpkgs manual.
5+
6+You can find the [rendered documentation for Nixpkgs `unstable` on nixos.org](https://nixos.org/manual/nixpkgs/unstable/).
7+
8+[Docs for Nixpkgs stable](https://nixos.org/manual/nixpkgs/stable/) are also available.
9+
10+If you want to contribute to the documentation, [here's how to do it](https://nixos.org/manual/nixpkgs/unstable/#chap-contributing).
11+
12+If you're only getting started with Nix, go to [nixos.org/learn](https://nixos.org/learn).
doc/build-aux/pandoc-filters/docbook-reader/citerefentry-to-rst-role.luanew file+23
@@ -0,0 +1,23 @@
1+--[[
2+Converts Code AST nodes produced by pandoc’s DocBook reader
3+from citerefentry elements into AST for corresponding role
4+for reStructuredText.
5+
6+We use subset of MyST syntax (CommonMark with features from rST)
7+so let’s use the rST AST for rST features.
8+
9+Reference: https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-manpage
10+]]
11+
12+function Code(elem)
13+ elem.classes = elem.classes:map(function (x)
14+ if x == 'citerefentry' then
15+ elem.attributes['role'] = 'manpage'
16+ return 'interpreted-text'
17+ else
18+ return x
19+ end
20+ end)
21+
22+ return elem
23+end
doc/build-aux/pandoc-filters/docbook-writer/labelless-link-is-xref.luanew file+34
@@ -0,0 +1,34 @@
1+--[[
2+Converts Link AST nodes with empty label to DocBook xref elements.
3+
4+This is a temporary script to be able use cross-references conveniently
5+using syntax taken from MyST, while we still use docbook-xsl
6+for generating the documentation.
7+
8+Reference: https://myst-parser.readthedocs.io/en/latest/using/syntax.html#targets-and-cross-referencing
9+]]
10+
11+local function starts_with(start, str)
12+ return str:sub(1, #start) == start
13+end
14+
15+local function escape_xml_arg(arg)
16+ amps = arg:gsub('&', '&amp;')
17+ amps_quotes = amps:gsub('"', '&quot;')
18+ amps_quotes_lt = amps_quotes:gsub('<', '&lt;')
19+
20+ return amps_quotes_lt
21+end
22+
23+function Link(elem)
24+ has_no_content = #elem.content == 0
25+ targets_anchor = starts_with('#', elem.target)
26+ has_no_attributes = elem.title == '' and elem.identifier == '' and #elem.classes == 0 and #elem.attributes == 0
27+
28+ if has_no_content and targets_anchor and has_no_attributes then
29+ -- xref expects idref without the pound-sign
30+ target_without_hash = elem.target:sub(2, #elem.target)
31+
32+ return pandoc.RawInline('docbook', '<xref linkend="' .. escape_xml_arg(target_without_hash) .. '" />')
33+ end
34+end
doc/build-aux/pandoc-filters/docbook-writer/rst-roles.luanew file+36
@@ -0,0 +1,36 @@
1+--[[
2+Converts AST for reStructuredText roles into corresponding
3+DocBook elements.
4+
5+Currently, only a subset of roles is supported.
6+
7+Reference:
8+ List of roles:
9+ https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html
10+ manpage:
11+ https://tdg.docbook.org/tdg/5.1/citerefentry.html
12+ file:
13+ https://tdg.docbook.org/tdg/5.1/filename.html
14+]]
15+
16+function Code(elem)
17+ if elem.classes:includes('interpreted-text') then
18+ local tag = nil
19+ local content = elem.text
20+ if elem.attributes['role'] == 'manpage' then
21+ tag = 'citerefentry'
22+ local title, volnum = content:match('^(.+)%((%w+)%)$')
23+ if title == nil then
24+ -- No volnum in parentheses.
25+ title = content
26+ end
27+ content = '<refentrytitle>' .. title .. '</refentrytitle>' .. (volnum ~= nil and ('<manvolnum>' .. volnum .. '</manvolnum>') or '')
28+ elseif elem.attributes['role'] == 'file' then
29+ tag = 'filename'
30+ end
31+
32+ if tag ~= nil then
33+ return pandoc.RawInline('docbook', '<' .. tag .. '>' .. content .. '</' .. tag .. '>')
34+ end
35+ end
36+end
doc/build-aux/pandoc-filters/link-unix-man-references.luanew file+17
@@ -0,0 +1,17 @@
1+--[[
2+Turns a manpage reference into a link, when a mapping is defined below.
3+]]
4+
5+local man_urls = {
6+ ["tmpfiles.d(5)"] = "https://www.freedesktop.org/software/systemd/man/tmpfiles.d.html",
7+ ["nix.conf(5)"] = "https://nixos.org/manual/nix/stable/#sec-conf-file",
8+ ["systemd.time(7)"] = "https://www.freedesktop.org/software/systemd/man/systemd.time.html",
9+ ["systemd.timer(5)"] = "https://www.freedesktop.org/software/systemd/man/systemd.timer.html",
10+}
11+
12+function Code(elem)
13+ local is_man_role = elem.classes:includes('interpreted-text') and elem.attributes['role'] == 'manpage'
14+ if is_man_role and man_urls[elem.text] ~= nil then
15+ return pandoc.Link(elem, man_urls[elem.text])
16+ end
17+end
doc/build-aux/pandoc-filters/myst-reader/roles.luanew file+29
@@ -0,0 +1,29 @@
1+--[[
2+Replaces Str AST nodes containing {role}, followed by a Code node
3+by a Code node with attrs that would be produced by rST reader
4+from the role syntax.
5+
6+This is to emulate MyST syntax in Pandoc.
7+(MyST is a CommonMark flavour with rST features mixed in.)
8+
9+Reference: https://myst-parser.readthedocs.io/en/latest/syntax/syntax.html#roles-an-in-line-extension-point
10+]]
11+
12+function Inlines(inlines)
13+ for i = #inlines-1,1,-1 do
14+ local first = inlines[i]
15+ local second = inlines[i+1]
16+ local correct_tags = first.tag == 'Str' and second.tag == 'Code'
17+ if correct_tags then
18+ -- docutils supports alphanumeric strings separated by [-._:]
19+ -- We are slightly more liberal for simplicity.
20+ local role = first.text:match('^{([-._+:%w]+)}$')
21+ if role ~= nil then
22+ inlines:remove(i)
23+ second.attributes['role'] = role
24+ second.classes:insert('interpreted-text')
25+ end
26+ end
27+ end
28+ return inlines
29+end
doc/build-aux/pandoc-filters/myst-writer/roles.luanew file+25
@@ -0,0 +1,25 @@
1+--[[
2+Replaces Code nodes with attrs that would be produced by rST reader
3+from the role syntax by a Str AST node containing {role}, followed by a Code node.
4+
5+This is to emulate MyST syntax in Pandoc.
6+(MyST is a CommonMark flavour with rST features mixed in.)
7+
8+Reference: https://myst-parser.readthedocs.io/en/latest/syntax/syntax.html#roles-an-in-line-extension-point
9+]]
10+
11+function Code(elem)
12+ local role = elem.attributes['role']
13+
14+ if elem.classes:includes('interpreted-text') and role ~= nil then
15+ elem.classes = elem.classes:filter(function (c)
16+ return c ~= 'interpreted-text'
17+ end)
18+ elem.attributes['role'] = nil
19+
20+ return {
21+ pandoc.Str('{' .. role .. '}'),
22+ elem,
23+ }
24+ end
25+end
doc/builders/fetchers.chapter.mdnew file+114
@@ -0,0 +1,114 @@
1+# Fetchers {#chap-pkgs-fetchers}
2+
3+When using Nix, you will frequently need to download source code and other files from the internet. For this purpose, Nix provides the [_fixed output derivation_](https://nixos.org/manual/nix/stable/#fixed-output-drvs) feature and Nixpkgs provides various functions that implement the actual fetching from various protocols and services.
4+
5+## Caveats
6+
7+Because fixed output derivations are _identified_ by their hash, a common mistake is to update a fetcher's URL or a version parameter, without updating the hash. **This will cause the old contents to be used.** So remember to always invalidate the hash argument.
8+
9+For those who develop and maintain fetchers, a similar problem arises with changes to the implementation of a fetcher. These may cause a fixed output derivation to fail, but won't normally be caught by tests because the supposed output is already in the store or cache. For the purpose of testing, you can use a trick that is embodied by the [`invalidateFetcherByDrvHash`](#tester-invalidateFetcherByDrvHash) function. It uses the derivation `name` to create a unique output path per fetcher implementation, defeating the caching precisely where it would be harmful.
10+
11+## `fetchurl` and `fetchzip` {#fetchurl}
12+
13+Two basic fetchers are `fetchurl` and `fetchzip`. Both of these have two required arguments, a URL and a hash. The hash is typically `sha256`, although many more hash algorithms are supported. Nixpkgs contributors are currently recommended to use `sha256`. This hash will be used by Nix to identify your source. A typical usage of `fetchurl` is provided below.
14+
15+```nix
16+{ stdenv, fetchurl }:
17+
18+stdenv.mkDerivation {
19+ name = "hello";
20+ src = fetchurl {
21+ url = "http://www.example.org/hello.tar.gz";
22+ sha256 = "1111111111111111111111111111111111111111111111111111";
23+ };
24+}
25+```
26+
27+The main difference between `fetchurl` and `fetchzip` is in how they store the contents. `fetchurl` will store the unaltered contents of the URL within the Nix store. `fetchzip` on the other hand, will decompress the archive for you, making files and directories directly accessible in the future. `fetchzip` can only be used with archives. Despite the name, `fetchzip` is not limited to .zip files and can also be used with any tarball.
28+
29+`fetchpatch` works very similarly to `fetchurl` with the same arguments expected. It expects patch files as a source and performs normalization on them before computing the checksum. For example, it will remove comments or other unstable parts that are sometimes added by version control systems and can change over time.
30+
31+Most other fetchers return a directory rather than a single file.
32+
33+## `fetchsvn` {#fetchsvn}
34+
35+Used with Subversion. Expects `url` to a Subversion directory, `rev`, and `sha256`.
36+
37+## `fetchgit` {#fetchgit}
38+
39+Used with Git. Expects `url` to a Git repo, `rev`, and `sha256`. `rev` in this case can be full the git commit id (SHA1 hash) or a tag name like `refs/tags/v1.0`.
40+
41+Additionally, the following optional arguments can be given: `fetchSubmodules = true` makes `fetchgit` also fetch the submodules of a repository. If `deepClone` is set to true, the entire repository is cloned as opposing to just creating a shallow clone. `deepClone = true` also implies `leaveDotGit = true` which means that the `.git` directory of the clone won't be removed after checkout.
42+
43+If only parts of the repository are needed, `sparseCheckout` can be used. This will prevent git from fetching unnecessary blobs from server, see [git sparse-checkout](https://git-scm.com/docs/git-sparse-checkout) and [git clone --filter](https://git-scm.com/docs/git-clone#Documentation/git-clone.txt---filterltfilter-specgt) for more information:
44+
45+```nix
46+{ stdenv, fetchgit }:
47+
48+stdenv.mkDerivation {
49+ name = "hello";
50+ src = fetchgit {
51+ url = "https://...";
52+ sparseCheckout = ''
53+ path/to/be/included
54+ another/path
55+ '';
56+ sha256 = "0000000000000000000000000000000000000000000000000000";
57+ };
58+}
59+```
60+
61+## `fetchfossil` {#fetchfossil}
62+
63+Used with Fossil. Expects `url` to a Fossil archive, `rev`, and `sha256`.
64+
65+## `fetchcvs` {#fetchcvs}
66+
67+Used with CVS. Expects `cvsRoot`, `tag`, and `sha256`.
68+
69+## `fetchhg` {#fetchhg}
70+
71+Used with Mercurial. Expects `url`, `rev`, and `sha256`.
72+
73+A number of fetcher functions wrap part of `fetchurl` and `fetchzip`. They are mainly convenience functions intended for commonly used destinations of source code in Nixpkgs. These wrapper fetchers are listed below.
74+
75+## `fetchFromGitea` {#fetchfromgitea}
76+
77+`fetchFromGitea` expects five arguments. `domain` is the gitea server name. `owner` is a string corresponding to the Gitea user or organization that controls this repository. `repo` corresponds to the name of the software repository. These are located at the top of every Gitea HTML page as `owner`/`repo`. `rev` corresponds to the Git commit hash or tag (e.g `v1.0`) that will be downloaded from Git. Finally, `sha256` corresponds to the hash of the extracted directory. Again, other hash algorithms are also available but `sha256` is currently preferred.
78+
79+## `fetchFromGitHub` {#fetchfromgithub}
80+
81+`fetchFromGitHub` expects four arguments. `owner` is a string corresponding to the GitHub user or organization that controls this repository. `repo` corresponds to the name of the software repository. These are located at the top of every GitHub HTML page as `owner`/`repo`. `rev` corresponds to the Git commit hash or tag (e.g `v1.0`) that will be downloaded from Git. Finally, `sha256` corresponds to the hash of the extracted directory. Again, other hash algorithms are also available, but `sha256` is currently preferred.
82+
83+`fetchFromGitHub` uses `fetchzip` to download the source archive generated by GitHub for the specified revision. If `leaveDotGit`, `deepClone` or `fetchSubmodules` are set to `true`, `fetchFromGitHub` will use `fetchgit` instead. Refer to its section for documentation of these options.
84+
85+## `fetchFromGitLab` {#fetchfromgitlab}
86+
87+This is used with GitLab repositories. The arguments expected are very similar to `fetchFromGitHub` above.
88+
89+## `fetchFromGitiles` {#fetchfromgitiles}
90+
91+This is used with Gitiles repositories. The arguments expected are similar to `fetchgit`.
92+
93+## `fetchFromBitbucket` {#fetchfrombitbucket}
94+
95+This is used with BitBucket repositories. The arguments expected are very similar to fetchFromGitHub above.
96+
97+## `fetchFromSavannah` {#fetchfromsavannah}
98+
99+This is used with Savannah repositories. The arguments expected are very similar to `fetchFromGitHub` above.
100+
101+## `fetchFromRepoOrCz` {#fetchfromrepoorcz}
102+
103+This is used with repo.or.cz repositories. The arguments expected are very similar to `fetchFromGitHub` above.
104+
105+## `fetchFromSourcehut` {#fetchfromsourcehut}
106+
107+This is used with sourcehut repositories. Similar to `fetchFromGitHub` above,
108+it expects `owner`, `repo`, `rev` and `sha256`, but don't forget the tilde (~)
109+in front of the username! Expected arguments also include `vc` ("git" (default)
110+or "hg"), `domain` and `fetchSubmodules`.
111+
112+If `fetchSubmodules` is `true`, `fetchFromSourcehut` uses `fetchgit`
113+or `fetchhg` with `fetchSubmodules` or `fetchSubrepos` set to `true`,
114+respectively. Otherwise, the fetcher uses `fetchzip`.
doc/builders/fetchers.xmldeleted−150
@@ -1,150 +0,0 @@
1−<chapter xmlns="http://docbook.org/ns/docbook"
2− xmlns:xlink="http://www.w3.org/1999/xlink"
3− xmlns:xi="http://www.w3.org/2001/XInclude"
4− xml:id="chap-pkgs-fetchers">
5− <title>Fetchers</title>
6− <para>
7− When using Nix, you will frequently need to download source code and other files from the internet. Nixpkgs comes with a few helper functions that allow you to fetch fixed-output derivations in a structured way.
8− </para>
9− <para>
10− The two fetcher primitives are <function>fetchurl</function> and <function>fetchzip</function>. Both of these have two required arguments, a URL and a hash. The hash is typically <literal>sha256</literal>, although many more hash algorithms are supported. Nixpkgs contributors are currently recommended to use <literal>sha256</literal>. This hash will be used by Nix to identify your source. A typical usage of fetchurl is provided below.
11− </para>
12−<programlisting><![CDATA[
13−{ stdenv, fetchurl }:
14−
15−stdenv.mkDerivation {
16− name = "hello";
17− src = fetchurl {
18− url = "http://www.example.org/hello.tar.gz";
19− sha256 = "1111111111111111111111111111111111111111111111111111";
20− };
21−}
22−]]></programlisting>
23− <para>
24− The main difference between <function>fetchurl</function> and <function>fetchzip</function> is in how they store the contents. <function>fetchurl</function> will store the unaltered contents of the URL within the Nix store. <function>fetchzip</function> on the other hand will decompress the archive for you, making files and directories directly accessible in the future. <function>fetchzip</function> can only be used with archives. Despite the name, <function>fetchzip</function> is not limited to .zip files and can also be used with any tarball.
25− </para>
26− <para>
27− <function>fetchpatch</function> works very similarly to <function>fetchurl</function> with the same arguments expected. It expects patch files as a source and and performs normalization on them before computing the checksum. For example it will remove comments or other unstable parts that are sometimes added by version control systems and can change over time.
28− </para>
29− <para>
30− Other fetcher functions allow you to add source code directly from a VCS such as subversion or git. These are mostly straightforward names based on the name of the command used with the VCS system. Because they give you a working repository, they act most like <function>fetchzip</function>.
31− </para>
32− <variablelist>
33− <varlistentry>
34− <term>
35− <literal>fetchsvn</literal>
36− </term>
37− <listitem>
38− <para>
39− Used with Subversion. Expects <literal>url</literal> to a Subversion directory, <literal>rev</literal>, and <literal>sha256</literal>.
40− </para>
41− </listitem>
42− </varlistentry>
43− <varlistentry>
44− <term>
45− <literal>fetchgit</literal>
46− </term>
47− <listitem>
48− <para>
49− Used with Git. Expects <literal>url</literal> to a Git repo, <literal>rev</literal>, and <literal>sha256</literal>. <literal>rev</literal> in this case can be full the git commit id (SHA1 hash) or a tag name like <literal>refs/tags/v1.0</literal>.
50− </para>
51− </listitem>
52− </varlistentry>
53− <varlistentry>
54− <term>
55− <literal>fetchfossil</literal>
56− </term>
57− <listitem>
58− <para>
59− Used with Fossil. Expects <literal>url</literal> to a Fossil archive, <literal>rev</literal>, and <literal>sha256</literal>.
60− </para>
61− </listitem>
62− </varlistentry>
63− <varlistentry>
64− <term>
65− <literal>fetchcvs</literal>
66− </term>
67− <listitem>
68− <para>
69− Used with CVS. Expects <literal>cvsRoot</literal>, <literal>tag</literal>, and <literal>sha256</literal>.
70− </para>
71− </listitem>
72− </varlistentry>
73− <varlistentry>
74− <term>
75− <literal>fetchhg</literal>
76− </term>
77− <listitem>
78− <para>
79− Used with Mercurial. Expects <literal>url</literal>, <literal>rev</literal>, and <literal>sha256</literal>.
80− </para>
81− </listitem>
82− </varlistentry>
83− </variablelist>
84− <para>
85− A number of fetcher functions wrap part of <function>fetchurl</function> and <function>fetchzip</function>. They are mainly convenience functions intended for commonly used destinations of source code in Nixpkgs. These wrapper fetchers are listed below.
86− </para>
87− <variablelist>
88− <varlistentry>
89− <term>
90− <literal>fetchFromGitHub</literal>
91− </term>
92− <listitem>
93− <para>
94− <function>fetchFromGitHub</function> expects four arguments. <literal>owner</literal> is a string corresponding to the GitHub user or organization that controls this repository. <literal>repo</literal> corresponds to the name of the software repository. These are located at the top of every GitHub HTML page as <literal>owner</literal>/<literal>repo</literal>. <literal>rev</literal> corresponds to the Git commit hash or tag (e.g <literal>v1.0</literal>) that will be downloaded from Git. Finally, <literal>sha256</literal> corresponds to the hash of the extracted directory. Again, other hash algorithms are also available but <literal>sha256</literal> is currently preferred.
95− </para>
96− </listitem>
97− </varlistentry>
98− <varlistentry>
99− <term>
100− <literal>fetchFromGitLab</literal>
101− </term>
102− <listitem>
103− <para>
104− This is used with GitLab repositories. The arguments expected are very similar to fetchFromGitHub above.
105− </para>
106− </listitem>
107− </varlistentry>
108− <varlistentry>
109− <term>
110− <literal>fetchFromGitiles</literal>
111− </term>
112− <listitem>
113− <para>
114− This is used with Gitiles repositories. The arguments expected
115− are similar to fetchgit.
116− </para>
117− </listitem>
118− </varlistentry>
119− <varlistentry>
120− <term>
121− <literal>fetchFromBitbucket</literal>
122− </term>
123− <listitem>
124− <para>
125− This is used with BitBucket repositories. The arguments expected are very similar to fetchFromGitHub above.
126− </para>
127− </listitem>
128− </varlistentry>
129− <varlistentry>
130− <term>
131− <literal>fetchFromSavannah</literal>
132− </term>
133− <listitem>
134− <para>
135− This is used with Savannah repositories. The arguments expected are very similar to fetchFromGitHub above.
136− </para>
137− </listitem>
138− </varlistentry>
139− <varlistentry>
140− <term>
141− <literal>fetchFromRepoOrCz</literal>
142− </term>
143− <listitem>
144− <para>
145− This is used with repo.or.cz repositories. The arguments expected are very similar to fetchFromGitHub above.
146− </para>
147− </listitem>
148− </varlistentry>
149− </variablelist>
150−</chapter>
doc/builders/images.xml+4−4
@@ -5,8 +5,8 @@
55 <para>
66 This chapter describes tools for creating various types of images.
77 </para>
8− <xi:include href="images/appimagetools.xml" />
9− <xi:include href="images/dockertools.xml" />
10− <xi:include href="images/ocitools.xml" />
11− <xi:include href="images/snaptools.xml" />
8+ <xi:include href="images/appimagetools.section.xml" />
9+ <xi:include href="images/dockertools.section.xml" />
10+ <xi:include href="images/ocitools.section.xml" />
11+ <xi:include href="images/snaptools.section.xml" />
1212</chapter>
doc/builders/images/appimagetools.section.mdnew file+48
@@ -0,0 +1,48 @@
1+# pkgs.appimageTools {#sec-pkgs-appimageTools}
2+
3+`pkgs.appimageTools` is a set of functions for extracting and wrapping [AppImage](https://appimage.org/) files. They are meant to be used if traditional packaging from source is infeasible, or it would take too long. To quickly run an AppImage file, `pkgs.appimage-run` can be used as well.
4+
5+::: {.warning}
6+The `appimageTools` API is unstable and may be subject to backwards-incompatible changes in the future.
7+:::
8+
9+## AppImage formats {#ssec-pkgs-appimageTools-formats}
10+
11+There are different formats for AppImages, see [the specification](https://github.com/AppImage/AppImageSpec/blob/74ad9ca2f94bf864a4a0dac1f369dd4f00bd1c28/draft.md#image-format) for details.
12+
13+- Type 1 images are ISO 9660 files that are also ELF executables.
14+- Type 2 images are ELF executables with an appended filesystem.
15+
16+They can be told apart with `file -k`:
17+
18+```ShellSession
19+$ file -k type1.AppImage
20+type1.AppImage: ELF 64-bit LSB executable, x86-64, version 1 (SYSV) ISO 9660 CD-ROM filesystem data 'AppImage' (Lepton 3.x), scale 0-0,
21+spot sensor temperature 0.000000, unit celsius, color scheme 0, calibration: offset 0.000000, slope 0.000000, dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.18, BuildID[sha1]=d629f6099d2344ad82818172add1d38c5e11bc6d, stripped\012- data
22+
23+$ file -k type2.AppImage
24+type2.AppImage: ELF 64-bit LSB executable, x86-64, version 1 (SYSV) (Lepton 3.x), scale 232-60668, spot sensor temperature -4.187500, color scheme 15, show scale bar, calibration: offset -0.000000, slope 0.000000 (Lepton 2.x), scale 4111-45000, spot sensor temperature 412442.250000, color scheme 3, minimum point enabled, calibration: offset -75402534979642766821519867692934234112.000000, slope 5815371847733706829839455140374904832.000000, dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.18, BuildID[sha1]=79dcc4e55a61c293c5e19edbd8d65b202842579f, stripped\012- data
25+```
26+
27+Note how the type 1 AppImage is described as an `ISO 9660 CD-ROM filesystem`, and the type 2 AppImage is not.
28+
29+## Wrapping {#ssec-pkgs-appimageTools-wrapping}
30+
31+Depending on the type of AppImage you're wrapping, you'll have to use `wrapType1` or `wrapType2`.
32+
33+```nix
34+appimageTools.wrapType2 { # or wrapType1
35+ name = "patchwork";
36+ src = fetchurl {
37+ url = "https://github.com/ssbc/patchwork/releases/download/v3.11.4/Patchwork-3.11.4-linux-x86_64.AppImage";
38+ sha256 = "1blsprpkvm0ws9b96gb36f0rbf8f5jgmw4x6dsb1kswr4ysf591s";
39+ };
40+ extraPkgs = pkgs: with pkgs; [ ];
41+}
42+```
43+
44+- `name` specifies the name of the resulting image.
45+- `src` specifies the AppImage file to extract.
46+- `extraPkgs` allows you to pass a function to include additional packages inside the FHS environment your AppImage is going to run in. There are a few ways to learn which dependencies an application needs:
47+ - Looking through the extracted AppImage files, reading its scripts and running `patchelf` and `ldd` on its executables. This can also be done in `appimage-run`, by setting `APPIMAGE_DEBUG_EXEC=bash`.
48+ - Running `strace -vfefile` on the wrapped executable, looking for libraries that can't be found.
doc/builders/images/appimagetools.xmldeleted−102
@@ -1,102 +0,0 @@
1−<section xmlns="http://docbook.org/ns/docbook"
2− xmlns:xlink="http://www.w3.org/1999/xlink"
3− xmlns:xi="http://www.w3.org/2001/XInclude"
4− xml:id="sec-pkgs-appimageTools">
5− <title>pkgs.appimageTools</title>
6−
7− <para>
8− <varname>pkgs.appimageTools</varname> is a set of functions for extracting and wrapping <link xlink:href="https://appimage.org/">AppImage</link> files. They are meant to be used if traditional packaging from source is infeasible, or it would take too long. To quickly run an AppImage file, <literal>pkgs.appimage-run</literal> can be used as well.
9− </para>
10−
11− <warning>
12− <para>
13− The <varname>appimageTools</varname> API is unstable and may be subject to backwards-incompatible changes in the future.
14− </para>
15− </warning>
16−
17− <section xml:id="ssec-pkgs-appimageTools-formats">
18− <title>AppImage formats</title>
19−
20− <para>
21− There are different formats for AppImages, see <link xlink:href="https://github.com/AppImage/AppImageSpec/blob/74ad9ca2f94bf864a4a0dac1f369dd4f00bd1c28/draft.md#image-format">the specification</link> for details.
22− </para>
23−
24− <itemizedlist>
25− <listitem>
26− <para>
27− Type 1 images are ISO 9660 files that are also ELF executables.
28− </para>
29− </listitem>
30− <listitem>
31− <para>
32− Type 2 images are ELF executables with an appended filesystem.
33− </para>
34− </listitem>
35− </itemizedlist>
36−
37− <para>
38− They can be told apart with <command>file -k</command>:
39− </para>
40−
41−<screen>
42−<prompt>$ </prompt>file -k type1.AppImage
43−type1.AppImage: ELF 64-bit LSB executable, x86-64, version 1 (SYSV) ISO 9660 CD-ROM filesystem data 'AppImage' (Lepton 3.x), scale 0-0,
44−spot sensor temperature 0.000000, unit celsius, color scheme 0, calibration: offset 0.000000, slope 0.000000, dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.18, BuildID[sha1]=d629f6099d2344ad82818172add1d38c5e11bc6d, stripped\012- data
45−
46−<prompt>$ </prompt>file -k type2.AppImage
47−type2.AppImage: ELF 64-bit LSB executable, x86-64, version 1 (SYSV) (Lepton 3.x), scale 232-60668, spot sensor temperature -4.187500, color scheme 15, show scale bar, calibration: offset -0.000000, slope 0.000000 (Lepton 2.x), scale 4111-45000, spot sensor temperature 412442.250000, color scheme 3, minimum point enabled, calibration: offset -75402534979642766821519867692934234112.000000, slope 5815371847733706829839455140374904832.000000, dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.18, BuildID[sha1]=79dcc4e55a61c293c5e19edbd8d65b202842579f, stripped\012- data
48−</screen>
49−
50− <para>
51− Note how the type 1 AppImage is described as an <literal>ISO 9660 CD-ROM filesystem</literal>, and the type 2 AppImage is not.
52− </para>
53− </section>
54−
55− <section xml:id="ssec-pkgs-appimageTools-wrapping">
56− <title>Wrapping</title>
57−
58− <para>
59− Depending on the type of AppImage you're wrapping, you'll have to use <varname>wrapType1</varname> or <varname>wrapType2</varname>.
60− </para>
61−
62−<programlisting>
63−appimageTools.wrapType2 { # or wrapType1
64− name = "patchwork"; <co xml:id='ex-appimageTools-wrapping-1' />
65− src = fetchurl { <co xml:id='ex-appimageTools-wrapping-2' />
66− url = "https://github.com/ssbc/patchwork/releases/download/v3.11.4/Patchwork-3.11.4-linux-x86_64.AppImage";
67− sha256 = "1blsprpkvm0ws9b96gb36f0rbf8f5jgmw4x6dsb1kswr4ysf591s";
68− };
69− extraPkgs = pkgs: with pkgs; [ ]; <co xml:id='ex-appimageTools-wrapping-3' />
70−}</programlisting>
71−
72− <calloutlist>
73− <callout arearefs='ex-appimageTools-wrapping-1'>
74− <para>
75− <varname>name</varname> specifies the name of the resulting image.
76− </para>
77− </callout>
78− <callout arearefs='ex-appimageTools-wrapping-2'>
79− <para>
80− <varname>src</varname> specifies the AppImage file to extract.
81− </para>
82− </callout>
83− <callout arearefs='ex-appimageTools-wrapping-3'>
84− <para>
85− <varname>extraPkgs</varname> allows you to pass a function to include additional packages inside the FHS environment your AppImage is going to run in. There are a few ways to learn which dependencies an application needs:
86− <itemizedlist>
87− <listitem>
88− <para>
89− Looking through the extracted AppImage files, reading its scripts and running <command>patchelf</command> and <command>ldd</command> on its executables. This can also be done in <command>appimage-run</command>, by setting <command>APPIMAGE_DEBUG_EXEC=bash</command>.
90− </para>
91− </listitem>
92− <listitem>
93− <para>
94− Running <command>strace -vfefile</command> on the wrapped executable, looking for libraries that can't be found.
95− </para>
96− </listitem>
97− </itemizedlist>
98− </para>
99− </callout>
100− </calloutlist>
101− </section>
102−</section>
doc/builders/images/dockertools.section.mdnew file+314
@@ -0,0 +1,314 @@
1+# pkgs.dockerTools {#sec-pkgs-dockerTools}
2+
3+`pkgs.dockerTools` is a set of functions for creating and manipulating Docker images according to the [Docker Image Specification v1.2.0](https://github.com/moby/moby/blob/master/image/spec/v1.2.md#docker-image-specification-v120). Docker itself is not used to perform any of the operations done by these functions.
4+
5+## buildImage {#ssec-pkgs-dockerTools-buildImage}
6+
7+This function is analogous to the `docker build` command, in that it can be used to build a Docker-compatible repository tarball containing a single image with one or multiple layers. As such, the result is suitable for being loaded in Docker with `docker load`.
8+
9+The parameters of `buildImage` with relative example values are described below:
10+
11+[]{#ex-dockerTools-buildImage}
12+[]{#ex-dockerTools-buildImage-runAsRoot}
13+
14+```nix
15+buildImage {
16+ name = "redis";
17+ tag = "latest";
18+
19+ fromImage = someBaseImage;
20+ fromImageName = null;
21+ fromImageTag = "latest";
22+
23+ contents = pkgs.redis;
24+ runAsRoot = ''
25+ #!${pkgs.runtimeShell}
26+ mkdir -p /data
27+ '';
28+
29+ config = {
30+ Cmd = [ "/bin/redis-server" ];
31+ WorkingDir = "/data";
32+ Volumes = { "/data" = { }; };
33+ };
34+}
35+```
36+
37+The above example will build a Docker image `redis/latest` from the given base image. Loading and running this image in Docker results in `redis-server` being started automatically.
38+
39+- `name` specifies the name of the resulting image. This is the only required argument for `buildImage`.
40+
41+- `tag` specifies the tag of the resulting image. By default it's `null`, which indicates that the nix output hash will be used as tag.
42+
43+- `fromImage` is the repository tarball containing the base image. It must be a valid Docker image, such as exported by `docker save`. By default it's `null`, which can be seen as equivalent to `FROM scratch` of a `Dockerfile`.
44+
45+- `fromImageName` can be used to further specify the base image within the repository, in case it contains multiple images. By default it's `null`, in which case `buildImage` will peek the first image available in the repository.
46+
47+- `fromImageTag` can be used to further specify the tag of the base image within the repository, in case an image contains multiple tags. By default it's `null`, in which case `buildImage` will peek the first tag available for the base image.
48+
49+- `contents` is a derivation that will be copied in the new layer of the resulting image. This can be similarly seen as `ADD contents/ /` in a `Dockerfile`. By default it's `null`.
50+
51+- `runAsRoot` is a bash script that will run as root in an environment that overlays the existing layers of the base image with the new resulting layer, including the previously copied `contents` derivation. This can be similarly seen as `RUN ...` in a `Dockerfile`.
52+
53+> **_NOTE:_** Using this parameter requires the `kvm` device to be available.
54+
55+- `config` is used to specify the configuration of the containers that will be started off the built image in Docker. The available options are listed in the [Docker Image Specification v1.2.0](https://github.com/moby/moby/blob/master/image/spec/v1.2.md#image-json-field-descriptions).
56+
57+After the new layer has been created, its closure (to which `contents`, `config` and `runAsRoot` contribute) will be copied in the layer itself. Only new dependencies that are not already in the existing layers will be copied.
58+
59+At the end of the process, only one new single layer will be produced and added to the resulting image.
60+
61+The resulting repository will only list the single image `image/tag`. In the case of [the `buildImage` example](#ex-dockerTools-buildImage), it would be `redis/latest`.
62+
63+It is possible to inspect the arguments with which an image was built using its `buildArgs` attribute.
64+
65+> **_NOTE:_** If you see errors similar to `getProtocolByName: does not exist (no such protocol name: tcp)` you may need to add `pkgs.iana-etc` to `contents`.
66+
67+> **_NOTE:_** If you see errors similar to `Error_Protocol ("certificate has unknown CA",True,UnknownCa)` you may need to add `pkgs.cacert` to `contents`.
68+
69+By default `buildImage` will use a static date of one second past the UNIX Epoch. This allows `buildImage` to produce binary reproducible images. When listing images with `docker images`, the newly created images will be listed like this:
70+
71+```ShellSession
72+$ docker images
73+REPOSITORY TAG IMAGE ID CREATED SIZE
74+hello latest 08c791c7846e 48 years ago 25.2MB
75+```
76+
77+You can break binary reproducibility but have a sorted, meaningful `CREATED` column by setting `created` to `now`.
78+
79+```nix
80+pkgs.dockerTools.buildImage {
81+ name = "hello";
82+ tag = "latest";
83+ created = "now";
84+ contents = pkgs.hello;
85+
86+ config.Cmd = [ "/bin/hello" ];
87+}
88+```
89+
90+Now the Docker CLI will display a reasonable date and sort the images as expected:
91+
92+```ShellSession
93+$ docker images
94+REPOSITORY TAG IMAGE ID CREATED SIZE
95+hello latest de2bf4786de6 About a minute ago 25.2MB
96+```
97+
98+However, the produced images will not be binary reproducible.
99+
100+## buildLayeredImage {#ssec-pkgs-dockerTools-buildLayeredImage}
101+
102+Create a Docker image with many of the store paths being on their own layer to improve sharing between images. The image is realized into the Nix store as a gzipped tarball. Depending on the intended usage, many users might prefer to use `streamLayeredImage` instead, which this function uses internally.
103+
104+`name`
105+
106+: The name of the resulting image.
107+
108+`tag` _optional_
109+
110+: Tag of the generated image.
111+
112+ *Default:* the output path's hash
113+
114+`fromImage` _optional_
115+
116+: The repository tarball containing the base image. It must be a valid Docker image, such as one exported by `docker save`.
117+
118+ *Default:* `null`, which can be seen as equivalent to `FROM scratch` of a `Dockerfile`.
119+
120+`contents` _optional_
121+
122+: Top-level paths in the container. Either a single derivation, or a list of derivations.
123+
124+ *Default:* `[]`
125+
126+`config` _optional_
127+
128+: Run-time configuration of the container. A full list of the options are available at in the [Docker Image Specification v1.2.0](https://github.com/moby/moby/blob/master/image/spec/v1.2.md#image-json-field-descriptions).
129+
130+ *Default:* `{}`
131+
132+`created` _optional_
133+
134+: Date and time the layers were created. Follows the same `now` exception supported by `buildImage`.
135+
136+ *Default:* `1970-01-01T00:00:01Z`
137+
138+`maxLayers` _optional_
139+
140+: Maximum number of layers to create.
141+
142+ *Default:* `100`
143+
144+ *Maximum:* `125`
145+
146+`extraCommands` _optional_
147+
148+: Shell commands to run while building the final layer, without access to most of the layer contents. Changes to this layer are "on top" of all the other layers, so can create additional directories and files.
149+
150+`fakeRootCommands` _optional_
151+
152+: Shell commands to run while creating the archive for the final layer in a fakeroot environment. Unlike `extraCommands`, you can run `chown` to change the owners of the files in the archive, changing fakeroot's state instead of the real filesystem. The latter would require privileges that the build user does not have. Static binaries do not interact with the fakeroot environment. By default all files in the archive will be owned by root.
153+
154+`enableFakechroot` _optional_
155+
156+: Whether to run in `fakeRootCommands` in `fakechroot`, making programs behave as though `/` is the root of the image being created, while files in the Nix store are available as usual. This allows scripts that perform installation in `/` to work as expected. Considering that `fakechroot` is implemented via the same mechanism as `fakeroot`, the same caveats apply.
157+
158+ *Default:* `false`
159+
160+### Behavior of `contents` in the final image {#dockerTools-buildLayeredImage-arg-contents}
161+
162+Each path directly listed in `contents` will have a symlink in the root of the image.
163+
164+For example:
165+
166+```nix
167+pkgs.dockerTools.buildLayeredImage {
168+ name = "hello";
169+ contents = [ pkgs.hello ];
170+}
171+```
172+
173+will create symlinks for all the paths in the `hello` package:
174+
175+```ShellSession
176+/bin/hello -> /nix/store/h1zb1padqbbb7jicsvkmrym3r6snphxg-hello-2.10/bin/hello
177+/share/info/hello.info -> /nix/store/h1zb1padqbbb7jicsvkmrym3r6snphxg-hello-2.10/share/info/hello.info
178+/share/locale/bg/LC_MESSAGES/hello.mo -> /nix/store/h1zb1padqbbb7jicsvkmrym3r6snphxg-hello-2.10/share/locale/bg/LC_MESSAGES/hello.mo
179+```
180+
181+### Automatic inclusion of `config` references {#dockerTools-buildLayeredImage-arg-config}
182+
183+The closure of `config` is automatically included in the closure of the final image.
184+
185+This allows you to make very simple Docker images with very little code. This container will start up and run `hello`:
186+
187+```nix
188+pkgs.dockerTools.buildLayeredImage {
189+ name = "hello";
190+ config.Cmd = [ "${pkgs.hello}/bin/hello" ];
191+}
192+```
193+
194+### Adjusting `maxLayers` {#dockerTools-buildLayeredImage-arg-maxLayers}
195+
196+Increasing the `maxLayers` increases the number of layers which have a chance to be shared between different images.
197+
198+Modern Docker installations support up to 128 layers, but older versions support as few as 42.
199+
200+If the produced image will not be extended by other Docker builds, it is safe to set `maxLayers` to `128`. However, it will be impossible to extend the image further.
201+
202+The first (`maxLayers-2`) most "popular" paths will have their own individual layers, then layer \#`maxLayers-1` will contain all the remaining "unpopular" paths, and finally layer \#`maxLayers` will contain the Image configuration.
203+
204+Docker's Layers are not inherently ordered, they are content-addressable and are not explicitly layered until they are composed in to an Image.
205+
206+## streamLayeredImage {#ssec-pkgs-dockerTools-streamLayeredImage}
207+
208+Builds a script which, when run, will stream an uncompressed tarball of a Docker image to stdout. The arguments to this function are as for `buildLayeredImage`. This method of constructing an image does not realize the image into the Nix store, so it saves on IO and disk/cache space, particularly with large images.
209+
210+The image produced by running the output script can be piped directly into `docker load`, to load it into the local docker daemon:
211+
212+```ShellSession
213+$(nix-build) | docker load
214+```
215+
216+Alternatively, the image be piped via `gzip` into `skopeo`, e.g., to copy it into a registry:
217+
218+```ShellSession
219+$(nix-build) | gzip --fast | skopeo copy docker-archive:/dev/stdin docker://some_docker_registry/myimage:tag
220+```
221+
222+## pullImage {#ssec-pkgs-dockerTools-fetchFromRegistry}
223+
224+This function is analogous to the `docker pull` command, in that it can be used to pull a Docker image from a Docker registry. By default [Docker Hub](https://hub.docker.com/) is used to pull images.
225+
226+Its parameters are described in the example below:
227+
228+```nix
229+pullImage {
230+ imageName = "nixos/nix";
231+ imageDigest =
232+ "sha256:20d9485b25ecfd89204e843a962c1bd70e9cc6858d65d7f5fadc340246e2116b";
233+ finalImageName = "nix";
234+ finalImageTag = "1.11";
235+ sha256 = "0mqjy3zq2v6rrhizgb9nvhczl87lcfphq9601wcprdika2jz7qh8";
236+ os = "linux";
237+ arch = "x86_64";
238+}
239+```
240+
241+- `imageName` specifies the name of the image to be downloaded, which can also include the registry namespace (e.g. `nixos`). This argument is required.
242+
243+- `imageDigest` specifies the digest of the image to be downloaded. This argument is required.
244+
245+- `finalImageName`, if specified, this is the name of the image to be created. Note it is never used to fetch the image since we prefer to rely on the immutable digest ID. By default it's equal to `imageName`.
246+
247+- `finalImageTag`, if specified, this is the tag of the image to be created. Note it is never used to fetch the image since we prefer to rely on the immutable digest ID. By default it's `latest`.
248+
249+- `sha256` is the checksum of the whole fetched image. This argument is required.
250+
251+- `os`, if specified, is the operating system of the fetched image. By default it's `linux`.
252+
253+- `arch`, if specified, is the cpu architecture of the fetched image. By default it's `x86_64`.
254+
255+`nix-prefetch-docker` command can be used to get required image parameters:
256+
257+```ShellSession
258+$ nix run nixpkgs.nix-prefetch-docker -c nix-prefetch-docker --image-name mysql --image-tag 5
259+```
260+
261+Since a given `imageName` may transparently refer to a manifest list of images which support multiple architectures and/or operating systems, you can supply the `--os` and `--arch` arguments to specify exactly which image you want. By default it will match the OS and architecture of the host the command is run on.
262+
263+```ShellSession
264+$ nix-prefetch-docker --image-name mysql --image-tag 5 --arch x86_64 --os linux
265+```
266+
267+Desired image name and tag can be set using `--final-image-name` and `--final-image-tag` arguments:
268+
269+```ShellSession
270+$ nix-prefetch-docker --image-name mysql --image-tag 5 --final-image-name eu.gcr.io/my-project/mysql --final-image-tag prod
271+```
272+
273+## exportImage {#ssec-pkgs-dockerTools-exportImage}
274+
275+This function is analogous to the `docker export` command, in that it can be used to flatten a Docker image that contains multiple layers. It is in fact the result of the merge of all the layers of the image. As such, the result is suitable for being imported in Docker with `docker import`.
276+
277+> **_NOTE:_** Using this function requires the `kvm` device to be available.
278+
279+The parameters of `exportImage` are the following:
280+
281+```nix
282+exportImage {
283+ fromImage = someLayeredImage;
284+ fromImageName = null;
285+ fromImageTag = null;
286+
287+ name = someLayeredImage.name;
288+}
289+```
290+
291+The parameters relative to the base image have the same synopsis as described in [buildImage](#ssec-pkgs-dockerTools-buildImage), except that `fromImage` is the only required argument in this case.
292+
293+The `name` argument is the name of the derivation output, which defaults to `fromImage.name`.
294+
295+## shadowSetup {#ssec-pkgs-dockerTools-shadowSetup}
296+
297+This constant string is a helper for setting up the base files for managing users and groups, only if such files don't exist already. It is suitable for being used in a [`buildImage` `runAsRoot`](#ex-dockerTools-buildImage-runAsRoot) script for cases like in the example below:
298+
299+```nix
300+buildImage {
301+ name = "shadow-basic";
302+
303+ runAsRoot = ''
304+ #!${pkgs.runtimeShell}
305+ ${shadowSetup}
306+ groupadd -r redis
307+ useradd -r -g redis redis
308+ mkdir /data
309+ chown redis:redis /data
310+ '';
311+}
312+```
313+
314+Creating base files like `/etc/passwd` or `/etc/login.defs` is necessary for shadow-utils to manipulate users and groups.
doc/builders/images/dockertools.xmldeleted−499
@@ -1,499 +0,0 @@
1−<section xmlns="http://docbook.org/ns/docbook"
2− xmlns:xlink="http://www.w3.org/1999/xlink"
3− xmlns:xi="http://www.w3.org/2001/XInclude"
4− xml:id="sec-pkgs-dockerTools">
5− <title>pkgs.dockerTools</title>
6−
7− <para>
8− <varname>pkgs.dockerTools</varname> is a set of functions for creating and manipulating Docker images according to the <link xlink:href="https://github.com/moby/moby/blob/master/image/spec/v1.2.md#docker-image-specification-v120"> Docker Image Specification v1.2.0 </link>. Docker itself is not used to perform any of the operations done by these functions.
9− </para>
10−
11− <section xml:id="ssec-pkgs-dockerTools-buildImage">
12− <title>buildImage</title>
13−
14− <para>
15− This function is analogous to the <command>docker build</command> command, in that it can be used to build a Docker-compatible repository tarball containing a single image with one or multiple layers. As such, the result is suitable for being loaded in Docker with <command>docker load</command>.
16− </para>
17−
18− <para>
19− The parameters of <varname>buildImage</varname> with relative example values are described below:
20− </para>
21−
22− <example xml:id='ex-dockerTools-buildImage'>
23− <title>Docker build</title>
24−<programlisting>
25−buildImage {
26− name = "redis"; <co xml:id='ex-dockerTools-buildImage-1' />
27− tag = "latest"; <co xml:id='ex-dockerTools-buildImage-2' />
28−
29− fromImage = someBaseImage; <co xml:id='ex-dockerTools-buildImage-3' />
30− fromImageName = null; <co xml:id='ex-dockerTools-buildImage-4' />
31− fromImageTag = "latest"; <co xml:id='ex-dockerTools-buildImage-5' />
32−
33− contents = pkgs.redis; <co xml:id='ex-dockerTools-buildImage-6' />
34− runAsRoot = '' <co xml:id='ex-dockerTools-buildImage-runAsRoot' />
35− #!${pkgs.runtimeShell}
36− mkdir -p /data
37− '';
38−
39− config = { <co xml:id='ex-dockerTools-buildImage-8' />
40− Cmd = [ "/bin/redis-server" ];
41− WorkingDir = "/data";
42− Volumes = {
43− "/data" = {};
44− };
45− };
46−}
47−</programlisting>
48− </example>
49−
50− <para>
51− The above example will build a Docker image <literal>redis/latest</literal> from the given base image. Loading and running this image in Docker results in <literal>redis-server</literal> being started automatically.
52− </para>
53−
54− <calloutlist>
55− <callout arearefs='ex-dockerTools-buildImage-1'>
56− <para>
57− <varname>name</varname> specifies the name of the resulting image. This is the only required argument for <varname>buildImage</varname>.
58− </para>
59− </callout>
60− <callout arearefs='ex-dockerTools-buildImage-2'>
61− <para>
62− <varname>tag</varname> specifies the tag of the resulting image. By default it's <literal>null</literal>, which indicates that the nix output hash will be used as tag.
63− </para>
64− </callout>
65− <callout arearefs='ex-dockerTools-buildImage-3'>
66− <para>
67− <varname>fromImage</varname> is the repository tarball containing the base image. It must be a valid Docker image, such as exported by <command>docker save</command>. By default it's <literal>null</literal>, which can be seen as equivalent to <literal>FROM scratch</literal> of a <filename>Dockerfile</filename>.
68− </para>
69− </callout>
70− <callout arearefs='ex-dockerTools-buildImage-4'>
71− <para>
72− <varname>fromImageName</varname> can be used to further specify the base image within the repository, in case it contains multiple images. By default it's <literal>null</literal>, in which case <varname>buildImage</varname> will peek the first image available in the repository.
73− </para>
74− </callout>
75− <callout arearefs='ex-dockerTools-buildImage-5'>
76− <para>
77− <varname>fromImageTag</varname> can be used to further specify the tag of the base image within the repository, in case an image contains multiple tags. By default it's <literal>null</literal>, in which case <varname>buildImage</varname> will peek the first tag available for the base image.
78− </para>
79− </callout>
80− <callout arearefs='ex-dockerTools-buildImage-6'>
81− <para>
82− <varname>contents</varname> is a derivation that will be copied in the new layer of the resulting image. This can be similarly seen as <command>ADD contents/ /</command> in a <filename>Dockerfile</filename>. By default it's <literal>null</literal>.
83− </para>
84− </callout>
85− <callout arearefs='ex-dockerTools-buildImage-runAsRoot'>
86− <para>
87− <varname>runAsRoot</varname> is a bash script that will run as root in an environment that overlays the existing layers of the base image with the new resulting layer, including the previously copied <varname>contents</varname> derivation. This can be similarly seen as <command>RUN ...</command> in a <filename>Dockerfile</filename>.
88− <note>
89− <para>
90− Using this parameter requires the <literal>kvm</literal> device to be available.
91− </para>
92− </note>
93− </para>
94− </callout>
95− <callout arearefs='ex-dockerTools-buildImage-8'>
96− <para>
97− <varname>config</varname> is used to specify the configuration of the containers that will be started off the built image in Docker. The available options are listed in the <link xlink:href="https://github.com/moby/moby/blob/master/image/spec/v1.2.md#image-json-field-descriptions"> Docker Image Specification v1.2.0 </link>.
98− </para>
99− </callout>
100− </calloutlist>
101−
102− <para>
103− After the new layer has been created, its closure (to which <varname>contents</varname>, <varname>config</varname> and <varname>runAsRoot</varname> contribute) will be copied in the layer itself. Only new dependencies that are not already in the existing layers will be copied.
104− </para>
105−
106− <para>
107− At the end of the process, only one new single layer will be produced and added to the resulting image.
108− </para>
109−
110− <para>
111− The resulting repository will only list the single image <varname>image/tag</varname>. In the case of <xref linkend='ex-dockerTools-buildImage'/> it would be <varname>redis/latest</varname>.
112− </para>
113−
114− <para>
115− It is possible to inspect the arguments with which an image was built using its <varname>buildArgs</varname> attribute.
116− </para>
117−
118− <note>
119− <para>
120− If you see errors similar to <literal>getProtocolByName: does not exist (no such protocol name: tcp)</literal> you may need to add <literal>pkgs.iana-etc</literal> to <varname>contents</varname>.
121− </para>
122− </note>
123−
124− <note>
125− <para>
126− If you see errors similar to <literal>Error_Protocol ("certificate has unknown CA",True,UnknownCa)</literal> you may need to add <literal>pkgs.cacert</literal> to <varname>contents</varname>.
127− </para>
128− </note>
129−
130− <example xml:id="example-pkgs-dockerTools-buildImage-creation-date">
131− <title>Impurely Defining a Docker Layer's Creation Date</title>
132− <para>
133− By default <function>buildImage</function> will use a static date of one second past the UNIX Epoch. This allows <function>buildImage</function> to produce binary reproducible images. When listing images with <command>docker images</command>, the newly created images will be listed like this:
134− </para>
135−<screen>
136−<prompt>$ </prompt>docker images
137−REPOSITORY TAG IMAGE ID CREATED SIZE
138−hello latest 08c791c7846e 48 years ago 25.2MB
139−</screen>
140− <para>
141− You can break binary reproducibility but have a sorted, meaningful <literal>CREATED</literal> column by setting <literal>created</literal> to <literal>now</literal>.
142− </para>
143−<programlisting><![CDATA[
144−pkgs.dockerTools.buildImage {
145− name = "hello";
146− tag = "latest";
147− created = "now";
148− contents = pkgs.hello;
149−
150− config.Cmd = [ "/bin/hello" ];
151−}
152−]]></programlisting>
153− <para>
154− and now the Docker CLI will display a reasonable date and sort the images as expected:
155−<screen>
156−<prompt>$ </prompt>docker images
157−REPOSITORY TAG IMAGE ID CREATED SIZE
158−hello latest de2bf4786de6 About a minute ago 25.2MB
159−</screen>
160− however, the produced images will not be binary reproducible.
161− </para>
162− </example>
163− </section>
164−
165− <section xml:id="ssec-pkgs-dockerTools-buildLayeredImage">
166− <title>buildLayeredImage</title>
167−
168− <para>
169− Create a Docker image with many of the store paths being on their own layer to improve sharing between images. The image is realized into the Nix store as a gzipped tarball. Depending on the intended usage, many users might prefer to use <function>streamLayeredImage</function> instead, which this function uses internally.
170− </para>
171−
172− <variablelist>
173− <varlistentry>
174− <term>
175− <varname>name</varname>
176− </term>
177− <listitem>
178− <para>
179− The name of the resulting image.
180− </para>
181− </listitem>
182− </varlistentry>
183− <varlistentry>
184− <term>
185− <varname>tag</varname> <emphasis>optional</emphasis>
186− </term>
187− <listitem>
188− <para>
189− Tag of the generated image.
190− </para>
191− <para>
192− <emphasis>Default:</emphasis> the output path's hash
193− </para>
194− </listitem>
195− </varlistentry>
196− <varlistentry>
197− <term>
198− <varname>contents</varname> <emphasis>optional</emphasis>
199− </term>
200− <listitem>
201− <para>
202− Top level paths in the container. Either a single derivation, or a list of derivations.
203− </para>
204− <para>
205− <emphasis>Default:</emphasis> <literal>[]</literal>
206− </para>
207− </listitem>
208− </varlistentry>
209− <varlistentry>
210− <term>
211− <varname>config</varname> <emphasis>optional</emphasis>
212− </term>
213− <listitem>
214− <para>
215− Run-time configuration of the container. A full list of the options are available at in the <link xlink:href="https://github.com/moby/moby/blob/master/image/spec/v1.2.md#image-json-field-descriptions"> Docker Image Specification v1.2.0 </link>.
216− </para>
217− <para>
218− <emphasis>Default:</emphasis> <literal>{}</literal>
219− </para>
220− </listitem>
221− </varlistentry>
222− <varlistentry>
223− <term>
224− <varname>created</varname> <emphasis>optional</emphasis>
225− </term>
226− <listitem>
227− <para>
228− Date and time the layers were created. Follows the same <literal>now</literal> exception supported by <literal>buildImage</literal>.
229− </para>
230− <para>
231− <emphasis>Default:</emphasis> <literal>1970-01-01T00:00:01Z</literal>
232− </para>
233− </listitem>
234− </varlistentry>
235− <varlistentry>
236− <term>
237− <varname>maxLayers</varname> <emphasis>optional</emphasis>
238− </term>
239− <listitem>
240− <para>
241− Maximum number of layers to create.
242− </para>
243− <para>
244− <emphasis>Default:</emphasis> <literal>100</literal>
245− </para>
246− <para>
247− <emphasis>Maximum:</emphasis> <literal>125</literal>
248− </para>
249− </listitem>
250− </varlistentry>
251− <varlistentry>
252− <term>
253− <varname>extraCommands</varname> <emphasis>optional</emphasis>
254− </term>
255− <listitem>
256− <para>
257− Shell commands to run while building the final layer, without access to most of the layer contents. Changes to this layer are "on top" of all the other layers, so can create additional directories and files.
258− </para>
259− </listitem>
260− </varlistentry>
261− </variablelist>
262−
263− <section xml:id="dockerTools-buildLayeredImage-arg-contents">
264− <title>Behavior of <varname>contents</varname> in the final image</title>
265−
266− <para>
267− Each path directly listed in <varname>contents</varname> will have a symlink in the root of the image.
268− </para>
269−
270− <para>
271− For example:
272−<programlisting><![CDATA[
273−pkgs.dockerTools.buildLayeredImage {
274− name = "hello";
275− contents = [ pkgs.hello ];
276−}
277−]]></programlisting>
278− will create symlinks for all the paths in the <literal>hello</literal> package:
279−<screen><![CDATA[
280−/bin/hello -> /nix/store/h1zb1padqbbb7jicsvkmrym3r6snphxg-hello-2.10/bin/hello
281−/share/info/hello.info -> /nix/store/h1zb1padqbbb7jicsvkmrym3r6snphxg-hello-2.10/share/info/hello.info
282−/share/locale/bg/LC_MESSAGES/hello.mo -> /nix/store/h1zb1padqbbb7jicsvkmrym3r6snphxg-hello-2.10/share/locale/bg/LC_MESSAGES/hello.mo
283−]]></screen>
284− </para>
285− </section>
286−
287− <section xml:id="dockerTools-buildLayeredImage-arg-config">
288− <title>Automatic inclusion of <varname>config</varname> references</title>
289−
290− <para>
291− The closure of <varname>config</varname> is automatically included in the closure of the final image.
292− </para>
293−
294− <para>
295− This allows you to make very simple Docker images with very little code. This container will start up and run <command>hello</command>:
296−<programlisting><![CDATA[
297−pkgs.dockerTools.buildLayeredImage {
298− name = "hello";
299− config.Cmd = [ "${pkgs.hello}/bin/hello" ];
300−}
301−]]></programlisting>
302− </para>
303− </section>
304−
305− <section xml:id="dockerTools-buildLayeredImage-arg-maxLayers">
306− <title>Adjusting <varname>maxLayers</varname></title>
307−
308− <para>
309− Increasing the <varname>maxLayers</varname> increases the number of layers which have a chance to be shared between different images.
310− </para>
311−
312− <para>
313− Modern Docker installations support up to 128 layers, however older versions support as few as 42.
314− </para>
315−
316− <para>
317− If the produced image will not be extended by other Docker builds, it is safe to set <varname>maxLayers</varname> to <literal>128</literal>. However it will be impossible to extend the image further.
318− </para>
319−
320− <para>
321− The first (<literal>maxLayers-2</literal>) most "popular" paths will have their own individual layers, then layer #<literal>maxLayers-1</literal> will contain all the remaining "unpopular" paths, and finally layer #<literal>maxLayers</literal> will contain the Image configuration.
322− </para>
323−
324− <para>
325− Docker's Layers are not inherently ordered, they are content-addressable and are not explicitly layered until they are composed in to an Image.
326− </para>
327− </section>
328− </section>
329−
330− <section xml:id="ssec-pkgs-dockerTools-streamLayeredImage">
331− <title>streamLayeredImage</title>
332−
333− <para>
334− Builds a script which, when run, will stream an uncompressed tarball of a Docker image to stdout. The arguments to this function are as for <function>buildLayeredImage</function>. This method of constructing an image does not realize the image into the Nix store, so it saves on IO and disk/cache space, particularly with large images.
335− </para>
336−
337− <para>
338− The image produced by running the output script can be piped directly into <command>docker load</command>, to load it into the local docker daemon:
339− <screen><![CDATA[
340−$(nix-build) | docker load
341− ]]></screen>
342− </para>
343− <para>
344− Alternatively, the image be piped via <command>gzip</command> into <command>skopeo</command>, e.g. to copy it into a registry:
345− <screen><![CDATA[
346−$(nix-build) | gzip --fast | skopeo copy docker-archive:/dev/stdin docker://some_docker_registry/myimage:tag
347− ]]></screen>
348− </para>
349− </section>
350−
351− <section xml:id="ssec-pkgs-dockerTools-fetchFromRegistry">
352− <title>pullImage</title>
353−
354− <para>
355− This function is analogous to the <command>docker pull</command> command, in that it can be used to pull a Docker image from a Docker registry. By default <link xlink:href="https://hub.docker.com/">Docker Hub</link> is used to pull images.
356− </para>
357−
358− <para>
359− Its parameters are described in the example below:
360− </para>
361−
362− <example xml:id='ex-dockerTools-pullImage'>
363− <title>Docker pull</title>
364−<programlisting>
365−pullImage {
366− imageName = "nixos/nix"; <co xml:id='ex-dockerTools-pullImage-1' />
367− imageDigest = "sha256:20d9485b25ecfd89204e843a962c1bd70e9cc6858d65d7f5fadc340246e2116b"; <co xml:id='ex-dockerTools-pullImage-2' />
368− finalImageName = "nix"; <co xml:id='ex-dockerTools-pullImage-3' />
369− finalImageTag = "1.11"; <co xml:id='ex-dockerTools-pullImage-4' />
370− sha256 = "0mqjy3zq2v6rrhizgb9nvhczl87lcfphq9601wcprdika2jz7qh8"; <co xml:id='ex-dockerTools-pullImage-5' />
371− os = "linux"; <co xml:id='ex-dockerTools-pullImage-6' />
372− arch = "x86_64"; <co xml:id='ex-dockerTools-pullImage-7' />
373−}
374−</programlisting>
375− </example>
376−
377− <calloutlist>
378− <callout arearefs='ex-dockerTools-pullImage-1'>
379− <para>
380− <varname>imageName</varname> specifies the name of the image to be downloaded, which can also include the registry namespace (e.g. <literal>nixos</literal>). This argument is required.
381− </para>
382− </callout>
383− <callout arearefs='ex-dockerTools-pullImage-2'>
384− <para>
385− <varname>imageDigest</varname> specifies the digest of the image to be downloaded. This argument is required.
386− </para>
387− </callout>
388− <callout arearefs='ex-dockerTools-pullImage-3'>
389− <para>
390− <varname>finalImageName</varname>, if specified, this is the name of the image to be created. Note it is never used to fetch the image since we prefer to rely on the immutable digest ID. By default it's equal to <varname>imageName</varname>.
391− </para>
392− </callout>
393− <callout arearefs='ex-dockerTools-pullImage-4'>
394− <para>
395− <varname>finalImageTag</varname>, if specified, this is the tag of the image to be created. Note it is never used to fetch the image since we prefer to rely on the immutable digest ID. By default it's <literal>latest</literal>.
396− </para>
397− </callout>
398− <callout arearefs='ex-dockerTools-pullImage-5'>
399− <para>
400− <varname>sha256</varname> is the checksum of the whole fetched image. This argument is required.
401− </para>
402− </callout>
403− <callout arearefs='ex-dockerTools-pullImage-6'>
404− <para>
405− <varname>os</varname>, if specified, is the operating system of the fetched image. By default it's <literal>linux</literal>.
406− </para>
407− </callout>
408− <callout arearefs='ex-dockerTools-pullImage-7'>
409− <para>
410− <varname>arch</varname>, if specified, is the cpu architecture of the fetched image. By default it's <literal>x86_64</literal>.
411− </para>
412− </callout>
413− </calloutlist>
414−
415− <para>
416− <literal>nix-prefetch-docker</literal> command can be used to get required image parameters:
417−<screen>
418−<prompt>$ </prompt>nix run nixpkgs.nix-prefetch-docker -c nix-prefetch-docker --image-name mysql --image-tag 5
419−</screen>
420− Since a given <varname>imageName</varname> may transparently refer to a manifest list of images which support multiple architectures and/or operating systems, you can supply the <option>--os</option> and <option>--arch</option> arguments to specify exactly which image you want. By default it will match the OS and architecture of the host the command is run on.
421−<screen>
422−<prompt>$ </prompt>nix-prefetch-docker --image-name mysql --image-tag 5 --arch x86_64 --os linux
423−</screen>
424− Desired image name and tag can be set using <option>--final-image-name</option> and <option>--final-image-tag</option> arguments:
425−<screen>
426−<prompt>$ </prompt>nix-prefetch-docker --image-name mysql --image-tag 5 --final-image-name eu.gcr.io/my-project/mysql --final-image-tag prod
427−</screen>
428− </para>
429− </section>
430−
431− <section xml:id="ssec-pkgs-dockerTools-exportImage">
432− <title>exportImage</title>
433−
434− <para>
435− This function is analogous to the <command>docker export</command> command, in that it can be used to flatten a Docker image that contains multiple layers. It is in fact the result of the merge of all the layers of the image. As such, the result is suitable for being imported in Docker with <command>docker import</command>.
436− </para>
437−
438− <note>
439− <para>
440− Using this function requires the <literal>kvm</literal> device to be available.
441− </para>
442− </note>
443−
444− <para>
445− The parameters of <varname>exportImage</varname> are the following:
446− </para>
447−
448− <example xml:id='ex-dockerTools-exportImage'>
449− <title>Docker export</title>
450−<programlisting>
451−exportImage {
452− fromImage = someLayeredImage;
453− fromImageName = null;
454− fromImageTag = null;
455−
456− name = someLayeredImage.name;
457−}
458−</programlisting>
459− </example>
460−
461− <para>
462− The parameters relative to the base image have the same synopsis as described in <xref linkend='ssec-pkgs-dockerTools-buildImage'/>, except that <varname>fromImage</varname> is the only required argument in this case.
463− </para>
464−
465− <para>
466− The <varname>name</varname> argument is the name of the derivation output, which defaults to <varname>fromImage.name</varname>.
467− </para>
468− </section>
469−
470− <section xml:id="ssec-pkgs-dockerTools-shadowSetup">
471− <title>shadowSetup</title>
472−
473− <para>
474− This constant string is a helper for setting up the base files for managing users and groups, only if such files don't exist already. It is suitable for being used in a <varname>runAsRoot</varname> <xref linkend='ex-dockerTools-buildImage-runAsRoot'/> script for cases like in the example below:
475− </para>
476−
477− <example xml:id='ex-dockerTools-shadowSetup'>
478− <title>Shadow base files</title>
479−<programlisting>
480−buildImage {
481− name = "shadow-basic";
482−
483− runAsRoot = ''
484− #!${pkgs.runtimeShell}
485− ${shadowSetup}
486− groupadd -r redis
487− useradd -r -g redis redis
488− mkdir /data
489− chown redis:redis /data
490− '';
491−}
492−</programlisting>
493− </example>
494−
495− <para>
496− Creating base files like <literal>/etc/passwd</literal> or <literal>/etc/login.defs</literal> is necessary for shadow-utils to manipulate users and groups.
497− </para>
498− </section>
499−</section>
doc/builders/images/ocitools.section.mdnew file+37
@@ -0,0 +1,37 @@
1+# pkgs.ociTools {#sec-pkgs-ociTools}
2+
3+`pkgs.ociTools` is a set of functions for creating containers according to the [OCI container specification v1.0.0](https://github.com/opencontainers/runtime-spec). Beyond that, it makes no assumptions about the container runner you choose to use to run the created container.
4+
5+## buildContainer {#ssec-pkgs-ociTools-buildContainer}
6+
7+This function creates a simple OCI container that runs a single command inside of it. An OCI container consists of a `config.json` and a rootfs directory. The nix store of the container will contain all referenced dependencies of the given command.
8+
9+The parameters of `buildContainer` with an example value are described below:
10+
11+```nix
12+buildContainer {
13+ args = [
14+ (with pkgs;
15+ writeScript "run.sh" ''
16+ #!${bash}/bin/bash
17+ exec ${bash}/bin/bash
18+ '').outPath
19+ ];
20+
21+ mounts = {
22+ "/data" = {
23+ type = "none";
24+ source = "/var/lib/mydata";
25+ options = [ "bind" ];
26+ };
27+ };
28+
29+ readonly = false;
30+}
31+```
32+
33+- `args` specifies a set of arguments to run inside the container. This is the only required argument for `buildContainer`. All referenced packages inside the derivation will be made available inside the container.
34+
35+- `mounts` specifies additional mount points chosen by the user. By default only a minimal set of necessary filesystems are mounted into the container (e.g procfs, cgroupfs)
36+
37+- `readonly` makes the container\'s rootfs read-only if it is set to true. The default value is false `false`.
doc/builders/images/ocitools.xmldeleted−61
@@ -1,61 +0,0 @@
1−<section xmlns="http://docbook.org/ns/docbook"
2− xmlns:xlink="http://www.w3.org/1999/xlink"
3− xmlns:xi="http://www.w3.org/2001/XInclude"
4− xml:id="sec-pkgs-ociTools">
5− <title>pkgs.ociTools</title>
6−
7− <para>
8− <varname>pkgs.ociTools</varname> is a set of functions for creating containers according to the <link xlink:href="https://github.com/opencontainers/runtime-spec">OCI container specification v1.0.0</link>. Beyond that it makes no assumptions about the container runner you choose to use to run the created container.
9− </para>
10−
11− <section xml:id="ssec-pkgs-ociTools-buildContainer">
12− <title>buildContainer</title>
13−
14− <para>
15− This function creates a simple OCI container that runs a single command inside of it. An OCI container consists of a <varname>config.json</varname> and a rootfs directory.The nix store of the container will contain all referenced dependencies of the given command.
16− </para>
17−
18− <para>
19− The parameters of <varname>buildContainer</varname> with an example value are described below:
20− </para>
21−
22− <example xml:id='ex-ociTools-buildContainer'>
23− <title>Build Container</title>
24−<programlisting>
25−buildContainer {
26− args = [ (with pkgs; writeScript "run.sh" ''
27− #!${bash}/bin/bash
28− exec ${bash}/bin/bash
29− '').outPath ]; <co xml:id='ex-ociTools-buildContainer-1' />
30−
31− mounts = {
32− "/data" = {
33− type = "none";
34− source = "/var/lib/mydata";
35− options = [ "bind" ];
36− };
37− };<co xml:id='ex-ociTools-buildContainer-2' />
38−
39− readonly = false; <co xml:id='ex-ociTools-buildContainer-3' />
40−}
41−</programlisting>
42− <calloutlist>
43− <callout arearefs='ex-ociTools-buildContainer-1'>
44− <para>
45− <varname>args</varname> specifies a set of arguments to run inside the container. This is the only required argument for <varname>buildContainer</varname>. All referenced packages inside the derivation will be made available inside the container
46− </para>
47− </callout>
48− <callout arearefs='ex-ociTools-buildContainer-2'>
49− <para>
50− <varname>mounts</varname> specifies additional mount points chosen by the user. By default only a minimal set of necessary filesystems are mounted into the container (e.g procfs, cgroupfs)
51− </para>
52− </callout>
53− <callout arearefs='ex-ociTools-buildContainer-3'>
54− <para>
55− <varname>readonly</varname> makes the container's rootfs read-only if it is set to true. The default value is false <literal>false</literal>.
56− </para>
57− </callout>
58− </calloutlist>
59− </example>
60− </section>
61−</section>
doc/builders/images/snap/example-firefox.nixdeleted−28
@@ -1,28 +0,0 @@
1−let
2− inherit (import <nixpkgs> { }) snapTools firefox;
3−in snapTools.makeSnap {
4− meta = {
5− name = "nix-example-firefox";
6− summary = firefox.meta.description;
7− architectures = [ "amd64" ];
8− apps.nix-example-firefox = {
9− command = "${firefox}/bin/firefox";
10− plugs = [
11− "pulseaudio"
12− "camera"
13− "browser-support"
14− "avahi-observe"
15− "cups-control"
16− "desktop"
17− "desktop-legacy"
18− "gsettings"
19− "home"
20− "network"
21− "mount-observe"
22− "removable-media"
23− "x11"
24− ];
25− };
26− confinement = "strict";
27− };
28−}
doc/builders/images/snap/example-hello.nixdeleted−12
@@ -1,12 +0,0 @@
1−let
2− inherit (import <nixpkgs> { }) snapTools hello;
3−in snapTools.makeSnap {
4− meta = {
5− name = "hello";
6− summary = hello.meta.description;
7− description = hello.meta.longDescription;
8− architectures = [ "amd64" ];
9− confinement = "strict";
10− apps.hello.command = "${hello}/bin/hello";
11− };
12−}
doc/builders/images/snaptools.section.mdnew file+71
@@ -0,0 +1,71 @@
1+# pkgs.snapTools {#sec-pkgs-snapTools}
2+
3+`pkgs.snapTools` is a set of functions for creating Snapcraft images. Snap and Snapcraft is not used to perform these operations.
4+
5+## The makeSnap Function {#ssec-pkgs-snapTools-makeSnap-signature}
6+
7+`makeSnap` takes a single named argument, `meta`. This argument mirrors [the upstream `snap.yaml` format](https://docs.snapcraft.io/snap-format) exactly.
8+
9+The `base` should not be specified, as `makeSnap` will force set it.
10+
11+Currently, `makeSnap` does not support creating GUI stubs.
12+
13+## Build a Hello World Snap {#ssec-pkgs-snapTools-build-a-snap-hello}
14+
15+The following expression packages GNU Hello as a Snapcraft snap.
16+
17+``` {#ex-snapTools-buildSnap-hello .nix}
18+let
19+ inherit (import <nixpkgs> { }) snapTools hello;
20+in snapTools.makeSnap {
21+ meta = {
22+ name = "hello";
23+ summary = hello.meta.description;
24+ description = hello.meta.longDescription;
25+ architectures = [ "amd64" ];
26+ confinement = "strict";
27+ apps.hello.command = "${hello}/bin/hello";
28+ };
29+}
30+```
31+
32+`nix-build` this expression and install it with `snap install ./result --dangerous`. `hello` will now be the Snapcraft version of the package.
33+
34+## Build a Graphical Snap {#ssec-pkgs-snapTools-build-a-snap-firefox}
35+
36+Graphical programs require many more integrations with the host. This example uses Firefox as an example because it is one of the most complicated programs we could package.
37+
38+``` {#ex-snapTools-buildSnap-firefox .nix}
39+let
40+ inherit (import <nixpkgs> { }) snapTools firefox;
41+in snapTools.makeSnap {
42+ meta = {
43+ name = "nix-example-firefox";
44+ summary = firefox.meta.description;
45+ architectures = [ "amd64" ];
46+ apps.nix-example-firefox = {
47+ command = "${firefox}/bin/firefox";
48+ plugs = [
49+ "pulseaudio"
50+ "camera"
51+ "browser-support"
52+ "avahi-observe"
53+ "cups-control"
54+ "desktop"
55+ "desktop-legacy"
56+ "gsettings"
57+ "home"
58+ "network"
59+ "mount-observe"
60+ "removable-media"
61+ "x11"
62+ ];
63+ };
64+ confinement = "strict";
65+ };
66+}
67+```
68+
69+`nix-build` this expression and install it with `snap install ./result --dangerous`. `nix-example-firefox` will now be the Snapcraft version of the Firefox package.
70+
71+The specific meaning behind plugs can be looked up in the [Snapcraft interface documentation](https://docs.snapcraft.io/supported-interfaces).
doc/builders/images/snaptools.xmldeleted−59
@@ -1,59 +0,0 @@
1−<section xmlns="http://docbook.org/ns/docbook"
2− xmlns:xlink="http://www.w3.org/1999/xlink"
3− xmlns:xi="http://www.w3.org/2001/XInclude"
4− xml:id="sec-pkgs-snapTools">
5− <title>pkgs.snapTools</title>
6−
7− <para>
8− <varname>pkgs.snapTools</varname> is a set of functions for creating Snapcraft images. Snap and Snapcraft is not used to perform these operations.
9− </para>
10−
11− <section xml:id="ssec-pkgs-snapTools-makeSnap-signature">
12− <title>The makeSnap Function</title>
13−
14− <para>
15− <function>makeSnap</function> takes a single named argument, <parameter>meta</parameter>. This argument mirrors <link xlink:href="https://docs.snapcraft.io/snap-format">the upstream <filename>snap.yaml</filename> format</link> exactly.
16− </para>
17−
18− <para>
19− The <parameter>base</parameter> should not be be specified, as <function>makeSnap</function> will force set it.
20− </para>
21−
22− <para>
23− Currently, <function>makeSnap</function> does not support creating GUI stubs.
24− </para>
25− </section>
26−
27− <section xml:id="ssec-pkgs-snapTools-build-a-snap-hello">
28− <title>Build a Hello World Snap</title>
29−
30− <example xml:id="ex-snapTools-buildSnap-hello">
31− <title>Making a Hello World Snap</title>
32− <para>
33− The following expression packages GNU Hello as a Snapcraft snap.
34− </para>
35−<programlisting><xi:include href="./snap/example-hello.nix" parse="text" /></programlisting>
36− <para>
37− <command>nix-build</command> this expression and install it with <command>snap install ./result --dangerous</command>. <command>hello</command> will now be the Snapcraft version of the package.
38− </para>
39− </example>
40− </section>
41−
42− <section xml:id="ssec-pkgs-snapTools-build-a-snap-firefox">
43− <title>Build a Hello World Snap</title>
44−
45− <example xml:id="ex-snapTools-buildSnap-firefox">
46− <title>Making a Graphical Snap</title>
47− <para>
48− Graphical programs require many more integrations with the host. This example uses Firefox as an example, because it is one of the most complicated programs we could package.
49− </para>
50−<programlisting><xi:include href="./snap/example-firefox.nix" parse="text" /></programlisting>
51− <para>
52− <command>nix-build</command> this expression and install it with <command>snap install ./result --dangerous</command>. <command>nix-example-firefox</command> will now be the Snapcraft version of the Firefox package.
53− </para>
54− <para>
55− The specific meaning behind plugs can be looked up in the <link xlink:href="https://docs.snapcraft.io/supported-interfaces">Snapcraft interface documentation</link>.
56− </para>
57− </example>
58− </section>
59−</section>
doc/builders/packages/cataclysm-dda.section.md+38−3
@@ -1,6 +1,6 @@
1−# Cataclysm: Dark Days Ahead
1+# Cataclysm: Dark Days Ahead {#cataclysm-dark-days-ahead}
22
3−## How to install Cataclysm DDA
3+## How to install Cataclysm DDA {#how-to-install-cataclysm-dda}
44
55To install the latest stable release of Cataclysm DDA to your profile, execute
66`nix-env -f "<nixpkgs>" -iA cataclysm-dda`. For the curses build (build
@@ -34,7 +34,42 @@ cataclysm-dda.override {
3434}
3535```
3636
37−## Customizing with mods
37+## Important note for overriding packages {#important-note-for-overriding-packages}
38+
39+After applying `overrideAttrs`, you need to fix `passthru.pkgs` and
40+`passthru.withMods` attributes either manually or by using `attachPkgs`:
41+
42+```nix
43+let
44+ # You enabled parallel building.
45+ myCDDA = cataclysm-dda-git.overrideAttrs (_: {
46+ enableParallelBuilding = true;
47+ });
48+
49+ # Unfortunately, this refers to the package before overriding and
50+ # parallel building is still disabled.
51+ badExample = myCDDA.withMods (_: []);
52+
53+ inherit (cataclysmDDA) attachPkgs pkgs wrapCDDA;
54+
55+ # You can fix it by hand
56+ goodExample1 = myCDDA.overrideAttrs (old: {
57+ passthru = old.passthru // {
58+ pkgs = pkgs.override { build = goodExample1; };
59+ withMods = wrapCDDA goodExample1;
60+ };
61+ });
62+
63+ # or by using a helper function `attachPkgs`.
64+ goodExample2 = attachPkgs pkgs myCDDA;
65+in
66+
67+# badExample # parallel building disabled
68+# goodExample1.withMods (_: []) # parallel building enabled
69+goodExample2.withMods (_: []) # parallel building enabled
70+```
71+
72+## Customizing with mods {#customizing-with-mods}
3873
3974To install Cataclysm DDA with mods of your choice, you can use `withMods`
4075attribute:
doc/builders/packages/citrix.section.mdnew file+32
@@ -0,0 +1,32 @@
1+# Citrix Workspace {#sec-citrix}
2+
3+The [Citrix Workspace App](https://www.citrix.com/products/workspace-app/) is a remote desktop viewer which provides access to [XenDesktop](https://www.citrix.com/products/xenapp-xendesktop/) installations.
4+
5+## Basic usage {#sec-citrix-base}
6+
7+The tarball archive needs to be downloaded manually, as the license agreements of the vendor for [Citrix Workspace](https://www.citrix.de/downloads/workspace-app/linux/workspace-app-for-linux-latest.html) needs to be accepted first. Then run `nix-prefetch-url file://$PWD/linuxx64-$version.tar.gz`. With the archive available in the store, the package can be built and installed with Nix.
8+
9+## Citrix Self-service {#sec-citrix-selfservice}
10+
11+The [self-service](https://support.citrix.com/article/CTX200337) is an application managing Citrix desktops and applications. Please note that this feature only works with at least citrix_workspace_20_06_0 and later versions.
12+
13+In order to set this up, you first have to [download the `.cr` file from the Netscaler Gateway](https://its.uiowa.edu/support/article/102186). After that, you can configure the `selfservice` like this:
14+
15+```ShellSession
16+$ storebrowse -C ~/Downloads/receiverconfig.cr
17+$ selfservice
18+```
19+
20+## Custom certificates {#sec-citrix-custom-certs}
21+
22+The `Citrix Workspace App` in `nixpkgs` trusts several certificates [from the Mozilla database](https://curl.haxx.se/docs/caextract.html) by default. However, several companies using Citrix might require their own corporate certificate. On distros with imperative packaging, these certs can be stored easily in [`$ICAROOT`](https://developer-docs.citrix.com/projects/receiver-for-linux-command-reference/en/13.7/), however this directory is a store path in `nixpkgs`. In order to work around this issue, the package provides a simple mechanism to add custom certificates without rebuilding the entire package using `symlinkJoin`:
23+
24+```nix
25+with import <nixpkgs> { config.allowUnfree = true; };
26+let
27+ extraCerts = [
28+ ./custom-cert-1.pem
29+ ./custom-cert-2.pem # ...
30+ ];
31+in citrix_workspace.override { inherit extraCerts; }
32+```
doc/builders/packages/citrix.xmldeleted−46
@@ -1,46 +0,0 @@
1−<section xmlns="http://docbook.org/ns/docbook"
2− xmlns:xlink="http://www.w3.org/1999/xlink"
3− xml:id="sec-citrix">
4− <title>Citrix Workspace</title>
5−
6− <para>
7− The <link xlink:href="https://www.citrix.com/products/workspace-app/">Citrix Workspace App</link> is a remote desktop viewer which provides access to <link xlink:href="https://www.citrix.com/products/xenapp-xendesktop/">XenDesktop</link> installations.
8− </para>
9−
10− <section xml:id="sec-citrix-base">
11− <title>Basic usage</title>
12−
13− <para>
14− The tarball archive needs to be downloaded manually as the license agreements of the vendor for <link xlink:href="https://www.citrix.de/downloads/workspace-app/linux/workspace-app-for-linux-latest.html">Citrix Workspace</link> needs to be accepted first. Then run <command>nix-prefetch-url file://$PWD/linuxx64-$version.tar.gz</command>. With the archive available in the store the package can be built and installed with Nix.
15− </para>
16− </section>
17−
18− <section xml:id="sec-citrix-selfservice">
19− <title>Citrix Selfservice</title>
20− <para>
21− The <link xlink:href="https://support.citrix.com/article/CTX200337">selfservice</link> is an application managing Citrix desktops and applications. Please note that this feature only works with at least <package>citrix_workspace_20_06_0</package> and later versions.
22− </para>
23− <para>
24− In order to set this up, you first have to <link xlink:href="https://its.uiowa.edu/support/article/102186">download the <literal>.cr</literal> file from the Netscaler Gateway</link>. After that you can configure the <command>selfservice</command> like this:
25−<screen>
26−<prompt>$ </prompt>storebrowse -C ~/Downloads/receiverconfig.cr
27−<prompt>$ </prompt>selfservice
28−</screen>
29− </para>
30− </section>
31−
32− <section xml:id="sec-citrix-custom-certs">
33− <title>Custom certificates</title>
34−
35− <para>
36− The <literal>Citrix Workspace App</literal> in <literal>nixpkgs</literal> trusts several certificates <link xlink:href="https://curl.haxx.se/docs/caextract.html">from the Mozilla database</link> by default. However several companies using Citrix might require their own corporate certificate. On distros with imperative packaging these certs can be stored easily in <link xlink:href="https://developer-docs.citrix.com/projects/receiver-for-linux-command-reference/en/13.7/"><literal>$ICAROOT</literal></link>, however this directory is a store path in <literal>nixpkgs</literal>. In order to work around this issue the package provides a simple mechanism to add custom certificates without rebuilding the entire package using <literal>symlinkJoin</literal>:
37−<programlisting>
38−<![CDATA[with import <nixpkgs> { config.allowUnfree = true; };
39−let extraCerts = [ ./custom-cert-1.pem ./custom-cert-2.pem /* ... */ ]; in
40−citrix_workspace.override {
41− inherit extraCerts;
42−}]]>
43−</programlisting>
44− </para>
45− </section>
46−</section>
doc/builders/packages/dlib.section.mdnew file+13
@@ -0,0 +1,13 @@
1+# DLib {#dlib}
2+
3+[DLib](http://dlib.net/) is a modern, C++-based toolkit which provides several machine learning algorithms.
4+
5+## Compiling without AVX support {#compiling-without-avx-support}
6+
7+Especially older CPUs don\'t support [AVX](https://en.wikipedia.org/wiki/Advanced_Vector_Extensions) (Advanced Vector Extensions) instructions that are used by DLib to optimize their algorithms.
8+
9+On the affected hardware errors like `Illegal instruction` will occur. In those cases AVX support needs to be disabled:
10+
11+```nix
12+self: super: { dlib = super.dlib.override { avxSupport = false; }; }
13+```
doc/builders/packages/dlib.xmldeleted−24
@@ -1,24 +0,0 @@
1−<section xmlns="http://docbook.org/ns/docbook"
2− xmlns:xlink="http://www.w3.org/1999/xlink"
3− xml:id="dlib">
4− <title>DLib</title>
5−
6− <para>
7− <link xlink:href="http://dlib.net/">DLib</link> is a modern, C++-based toolkit which provides several machine learning algorithms.
8− </para>
9−
10− <section xml:id="compiling-without-avx-support">
11− <title>Compiling without AVX support</title>
12−
13− <para>
14− Especially older CPUs don't support <link xlink:href="https://en.wikipedia.org/wiki/Advanced_Vector_Extensions">AVX</link> (<abbrev>Advanced Vector Extensions</abbrev>) instructions that are used by DLib to optimize their algorithms.
15− </para>
16−
17− <para>
18− On the affected hardware errors like <literal>Illegal instruction</literal> will occur. In those cases AVX support needs to be disabled:
19−<programlisting>self: super: {
20− dlib = super.dlib.override { avxSupport = false; };
21−}</programlisting>
22− </para>
23− </section>
24−</section>
doc/builders/packages/eclipse.section.mdnew file+64
@@ -0,0 +1,64 @@
1+# Eclipse {#sec-eclipse}
2+
3+The Nix expressions related to the Eclipse platform and IDE are in [`pkgs/applications/editors/eclipse`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/eclipse).
4+
5+Nixpkgs provides a number of packages that will install Eclipse in its various forms. These range from the bare-bones Eclipse Platform to the more fully featured Eclipse SDK or Scala-IDE packages and multiple version are often available. It is possible to list available Eclipse packages by issuing the command:
6+
7+```ShellSession
8+$ nix-env -f '<nixpkgs>' -qaP -A eclipses --description
9+```
10+
11+Once an Eclipse variant is installed, it can be run using the `eclipse` command, as expected. From within Eclipse, it is then possible to install plugins in the usual manner by either manually specifying an Eclipse update site or by installing the Marketplace Client plugin and using it to discover and install other plugins. This installation method provides an Eclipse installation that closely resemble a manually installed Eclipse.
12+
13+If you prefer to install plugins in a more declarative manner, then Nixpkgs also offer a number of Eclipse plugins that can be installed in an _Eclipse environment_. This type of environment is created using the function `eclipseWithPlugins` found inside the `nixpkgs.eclipses` attribute set. This function takes as argument `{ eclipse, plugins ? [], jvmArgs ? [] }` where `eclipse` is a one of the Eclipse packages described above, `plugins` is a list of plugin derivations, and `jvmArgs` is a list of arguments given to the JVM running the Eclipse. For example, say you wish to install the latest Eclipse Platform with the popular Eclipse Color Theme plugin and also allow Eclipse to use more RAM. You could then add:
14+
15+```nix
16+packageOverrides = pkgs: {
17+ myEclipse = with pkgs.eclipses; eclipseWithPlugins {
18+ eclipse = eclipse-platform;
19+ jvmArgs = [ "-Xmx2048m" ];
20+ plugins = [ plugins.color-theme ];
21+ };
22+}
23+```
24+
25+to your Nixpkgs configuration (`~/.config/nixpkgs/config.nix`) and install it by running `nix-env -f '<nixpkgs>' -iA myEclipse` and afterward run Eclipse as usual. It is possible to find out which plugins are available for installation using `eclipseWithPlugins` by running:
26+
27+```ShellSession
28+$ nix-env -f '<nixpkgs>' -qaP -A eclipses.plugins --description
29+```
30+
31+If there is a need to install plugins that are not available in Nixpkgs then it may be possible to define these plugins outside Nixpkgs using the `buildEclipseUpdateSite` and `buildEclipsePlugin` functions found in the `nixpkgs.eclipses.plugins` attribute set. Use the `buildEclipseUpdateSite` function to install a plugin distributed as an Eclipse update site. This function takes `{ name, src }` as argument, where `src` indicates the Eclipse update site archive. All Eclipse features and plugins within the downloaded update site will be installed. When an update site archive is not available, then the `buildEclipsePlugin` function can be used to install a plugin that consists of a pair of feature and plugin JARs. This function takes an argument `{ name, srcFeature, srcPlugin }` where `srcFeature` and `srcPlugin` are the feature and plugin JARs, respectively.
32+
33+Expanding the previous example with two plugins using the above functions, we have:
34+
35+```nix
36+packageOverrides = pkgs: {
37+ myEclipse = with pkgs.eclipses; eclipseWithPlugins {
38+ eclipse = eclipse-platform;
39+ jvmArgs = [ "-Xmx2048m" ];
40+ plugins = [
41+ plugins.color-theme
42+ (plugins.buildEclipsePlugin {
43+ name = "myplugin1-1.0";
44+ srcFeature = fetchurl {
45+ url = "http://…/features/myplugin1.jar";
46+ sha256 = "123…";
47+ };
48+ srcPlugin = fetchurl {
49+ url = "http://…/plugins/myplugin1.jar";
50+ sha256 = "123…";
51+ };
52+ });
53+ (plugins.buildEclipseUpdateSite {
54+ name = "myplugin2-1.0";
55+ src = fetchurl {
56+ stripRoot = false;
57+ url = "http://…/myplugin2.zip";
58+ sha256 = "123…";
59+ };
60+ });
61+ ];
62+ };
63+}
64+```
doc/builders/packages/eclipse.xmldeleted−72
@@ -1,72 +0,0 @@
1−<section xmlns="http://docbook.org/ns/docbook"
2− xmlns:xlink="http://www.w3.org/1999/xlink"
3− xml:id="sec-eclipse">
4− <title>Eclipse</title>
5−
6− <para>
7− The Nix expressions related to the Eclipse platform and IDE are in <link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/eclipse"><filename>pkgs/applications/editors/eclipse</filename></link>.
8− </para>
9−
10− <para>
11− Nixpkgs provides a number of packages that will install Eclipse in its various forms. These range from the bare-bones Eclipse Platform to the more fully featured Eclipse SDK or Scala-IDE packages and multiple version are often available. It is possible to list available Eclipse packages by issuing the command:
12−<screen>
13−<prompt>$ </prompt>nix-env -f '&lt;nixpkgs&gt;' -qaP -A eclipses --description
14−</screen>
15− Once an Eclipse variant is installed it can be run using the <command>eclipse</command> command, as expected. From within Eclipse it is then possible to install plugins in the usual manner by either manually specifying an Eclipse update site or by installing the Marketplace Client plugin and using it to discover and install other plugins. This installation method provides an Eclipse installation that closely resemble a manually installed Eclipse.
16− </para>
17−
18− <para>
19− If you prefer to install plugins in a more declarative manner then Nixpkgs also offer a number of Eclipse plugins that can be installed in an <emphasis>Eclipse environment</emphasis>. This type of environment is created using the function <varname>eclipseWithPlugins</varname> found inside the <varname>nixpkgs.eclipses</varname> attribute set. This function takes as argument <literal>{ eclipse, plugins ? [], jvmArgs ? [] }</literal> where <varname>eclipse</varname> is a one of the Eclipse packages described above, <varname>plugins</varname> is a list of plugin derivations, and <varname>jvmArgs</varname> is a list of arguments given to the JVM running the Eclipse. For example, say you wish to install the latest Eclipse Platform with the popular Eclipse Color Theme plugin and also allow Eclipse to use more RAM. You could then add
20−<screen>
21−packageOverrides = pkgs: {
22− myEclipse = with pkgs.eclipses; eclipseWithPlugins {
23− eclipse = eclipse-platform;
24− jvmArgs = [ "-Xmx2048m" ];
25− plugins = [ plugins.color-theme ];
26− };
27−}
28−</screen>
29− to your Nixpkgs configuration (<filename>~/.config/nixpkgs/config.nix</filename>) and install it by running <command>nix-env -f '&lt;nixpkgs&gt;' -iA myEclipse</command> and afterward run Eclipse as usual. It is possible to find out which plugins are available for installation using <varname>eclipseWithPlugins</varname> by running
30−<screen>
31−<prompt>$ </prompt>nix-env -f '&lt;nixpkgs&gt;' -qaP -A eclipses.plugins --description
32−</screen>
33− </para>
34−
35− <para>
36− If there is a need to install plugins that are not available in Nixpkgs then it may be possible to define these plugins outside Nixpkgs using the <varname>buildEclipseUpdateSite</varname> and <varname>buildEclipsePlugin</varname> functions found in the <varname>nixpkgs.eclipses.plugins</varname> attribute set. Use the <varname>buildEclipseUpdateSite</varname> function to install a plugin distributed as an Eclipse update site. This function takes <literal>{ name, src }</literal> as argument where <literal>src</literal> indicates the Eclipse update site archive. All Eclipse features and plugins within the downloaded update site will be installed. When an update site archive is not available then the <varname>buildEclipsePlugin</varname> function can be used to install a plugin that consists of a pair of feature and plugin JARs. This function takes an argument <literal>{ name, srcFeature, srcPlugin }</literal> where <literal>srcFeature</literal> and <literal>srcPlugin</literal> are the feature and plugin JARs, respectively.
37− </para>
38−
39− <para>
40− Expanding the previous example with two plugins using the above functions we have
41−<screen>
42−packageOverrides = pkgs: {
43− myEclipse = with pkgs.eclipses; eclipseWithPlugins {
44− eclipse = eclipse-platform;
45− jvmArgs = [ "-Xmx2048m" ];
46− plugins = [
47− plugins.color-theme
48− (plugins.buildEclipsePlugin {
49− name = "myplugin1-1.0";
50− srcFeature = fetchurl {
51− url = "http://…/features/myplugin1.jar";
52− sha256 = "123…";
53− };
54− srcPlugin = fetchurl {
55− url = "http://…/plugins/myplugin1.jar";
56− sha256 = "123…";
57− };
58− });
59− (plugins.buildEclipseUpdateSite {
60− name = "myplugin2-1.0";
61− src = fetchurl {
62− stripRoot = false;
63− url = "http://…/myplugin2.zip";
64− sha256 = "123…";
65− };
66− });
67− ];
68− };
69−}
70−</screen>
71− </para>
72−</section>
doc/builders/packages/elm.section.mdnew file+11
@@ -0,0 +1,11 @@
1+# Elm {#sec-elm}
2+
3+To start a development environment, run:
4+
5+```ShellSession
6+nix-shell -p elmPackages.elm elmPackages.elm-format
7+```
8+
9+To update the Elm compiler, see `nixpkgs/pkgs/development/compilers/elm/README.md`.
10+
11+To package Elm applications, [read about elm2nix](https://github.com/hercules-ci/elm2nix#elm2nix).
doc/builders/packages/elm.xmldeleted−17
@@ -1,17 +0,0 @@
1−<section xmlns="http://docbook.org/ns/docbook"
2− xmlns:xlink="http://www.w3.org/1999/xlink"
3− xml:id="sec-elm">
4− <title>Elm</title>
5−
6− <para>
7− To start a development environment do <command>nix-shell -p elmPackages.elm elmPackages.elm-format</command>
8− </para>
9−
10− <para>
11− To update Elm compiler, see <filename>nixpkgs/pkgs/development/compilers/elm/README.md</filename>.
12− </para>
13−
14− <para>
15− To package Elm applications, <link xlink:href="https://github.com/hercules-ci/elm2nix#elm2nix">read about elm2nix</link>.
16− </para>
17−</section>
doc/builders/packages/emacs.section.mdnew file+119
@@ -0,0 +1,119 @@
1+# Emacs {#sec-emacs}
2+
3+## Configuring Emacs {#sec-emacs-config}
4+
5+The Emacs package comes with some extra helpers to make it easier to configure. `emacs.pkgs.withPackages` allows you to manage packages from ELPA. This means that you will not have to install that packages from within Emacs. For instance, if you wanted to use `company` `counsel`, `flycheck`, `ivy`, `magit`, `projectile`, and `use-package` you could use this as a `~/.config/nixpkgs/config.nix` override:
6+
7+```nix
8+{
9+ packageOverrides = pkgs: with pkgs; {
10+ myEmacs = emacs.pkgs.withPackages (epkgs: (with epkgs.melpaStablePackages; [
11+ company
12+ counsel
13+ flycheck
14+ ivy
15+ magit
16+ projectile
17+ use-package
18+ ]));
19+ }
20+}
21+```
22+
23+You can install it like any other packages via `nix-env -iA myEmacs`. However, this will only install those packages. It will not `configure` them for us. To do this, we need to provide a configuration file. Luckily, it is possible to do this from within Nix! By modifying the above example, we can make Emacs load a custom config file. The key is to create a package that provides a `default.el` file in `/share/emacs/site-start/`. Emacs knows to load this file automatically when it starts.
24+
25+```nix
26+{
27+ packageOverrides = pkgs: with pkgs; rec {
28+ myEmacsConfig = writeText "default.el" ''
29+ ;; initialize package
30+
31+ (require 'package)
32+ (package-initialize 'noactivate)
33+ (eval-when-compile
34+ (require 'use-package))
35+
36+ ;; load some packages
37+
38+ (use-package company
39+ :bind ("<C-tab>" . company-complete)
40+ :diminish company-mode
41+ :commands (company-mode global-company-mode)
42+ :defer 1
43+ :config
44+ (global-company-mode))
45+
46+ (use-package counsel
47+ :commands (counsel-descbinds)
48+ :bind (([remap execute-extended-command] . counsel-M-x)
49+ ("C-x C-f" . counsel-find-file)
50+ ("C-c g" . counsel-git)
51+ ("C-c j" . counsel-git-grep)
52+ ("C-c k" . counsel-ag)
53+ ("C-x l" . counsel-locate)
54+ ("M-y" . counsel-yank-pop)))
55+
56+ (use-package flycheck
57+ :defer 2
58+ :config (global-flycheck-mode))
59+
60+ (use-package ivy
61+ :defer 1
62+ :bind (("C-c C-r" . ivy-resume)
63+ ("C-x C-b" . ivy-switch-buffer)
64+ :map ivy-minibuffer-map
65+ ("C-j" . ivy-call))
66+ :diminish ivy-mode
67+ :commands ivy-mode
68+ :config
69+ (ivy-mode 1))
70+
71+ (use-package magit
72+ :defer
73+ :if (executable-find "git")
74+ :bind (("C-x g" . magit-status)
75+ ("C-x G" . magit-dispatch-popup))
76+ :init
77+ (setq magit-completing-read-function 'ivy-completing-read))
78+
79+ (use-package projectile
80+ :commands projectile-mode
81+ :bind-keymap ("C-c p" . projectile-command-map)
82+ :defer 5
83+ :config
84+ (projectile-global-mode))
85+ '';
86+
87+ myEmacs = emacs.pkgs.withPackages (epkgs: (with epkgs.melpaStablePackages; [
88+ (runCommand "default.el" {} ''
89+ mkdir -p $out/share/emacs/site-lisp
90+ cp ${myEmacsConfig} $out/share/emacs/site-lisp/default.el
91+ '')
92+ company
93+ counsel
94+ flycheck
95+ ivy
96+ magit
97+ projectile
98+ use-package
99+ ]));
100+ };
101+}
102+```
103+
104+This provides a fairly full Emacs start file. It will load in addition to the user's personal config. You can always disable it by passing `-q` to the Emacs command.
105+
106+Sometimes `emacs.pkgs.withPackages` is not enough, as this package set has some priorities imposed on packages (with the lowest priority assigned to Melpa Unstable, and the highest for packages manually defined in `pkgs/top-level/emacs-packages.nix`). But you can't control these priorities when some package is installed as a dependency. You can override it on a per-package-basis, providing all the required dependencies manually, but it's tedious and there is always a possibility that an unwanted dependency will sneak in through some other package. To completely override such a package, you can use `overrideScope'`.
107+
108+```nix
109+overrides = self: super: rec {
110+ haskell-mode = self.melpaPackages.haskell-mode;
111+ ...
112+};
113+((emacsPackagesFor emacs).overrideScope' overrides).withPackages
114+ (p: with p; [
115+ # here both these package will use haskell-mode of our own choice
116+ ghc-mod
117+ dante
118+ ])
119+```
doc/builders/packages/emacs.xmldeleted−131
@@ -1,131 +0,0 @@
1−<section xmlns="http://docbook.org/ns/docbook"
2− xmlns:xlink="http://www.w3.org/1999/xlink"
3− xml:id="sec-emacs">
4− <title>Emacs</title>
5−
6− <section xml:id="sec-emacs-config">
7− <title>Configuring Emacs</title>
8−
9− <para>
10− The Emacs package comes with some extra helpers to make it easier to configure. <varname>emacsWithPackages</varname> allows you to manage packages from ELPA. This means that you will not have to install that packages from within Emacs. For instance, if you wanted to use <literal>company</literal>, <literal>counsel</literal>, <literal>flycheck</literal>, <literal>ivy</literal>, <literal>magit</literal>, <literal>projectile</literal>, and <literal>use-package</literal> you could use this as a <filename>~/.config/nixpkgs/config.nix</filename> override:
11− </para>
12−
13−<screen>
14−{
15− packageOverrides = pkgs: with pkgs; {
16− myEmacs = emacsWithPackages (epkgs: (with epkgs.melpaStablePackages; [
17− company
18− counsel
19− flycheck
20− ivy
21− magit
22− projectile
23− use-package
24− ]));
25− }
26−}
27−</screen>
28−
29− <para>
30− You can install it like any other packages via <command>nix-env -iA myEmacs</command>. However, this will only install those packages. It will not <literal>configure</literal> them for us. To do this, we need to provide a configuration file. Luckily, it is possible to do this from within Nix! By modifying the above example, we can make Emacs load a custom config file. The key is to create a package that provide a <filename>default.el</filename> file in <filename>/share/emacs/site-start/</filename>. Emacs knows to load this file automatically when it starts.
31− </para>
32−
33−<screen>
34−{
35− packageOverrides = pkgs: with pkgs; rec {
36− myEmacsConfig = writeText "default.el" ''
37−;; initialize package
38−
39−(require 'package)
40−(package-initialize 'noactivate)
41−(eval-when-compile
42− (require 'use-package))
43−
44−;; load some packages
45−
46−(use-package company
47− :bind ("&lt;C-tab&gt;" . company-complete)
48− :diminish company-mode
49− :commands (company-mode global-company-mode)
50− :defer 1
51− :config
52− (global-company-mode))
53−
54−(use-package counsel
55− :commands (counsel-descbinds)
56− :bind (([remap execute-extended-command] . counsel-M-x)
57− ("C-x C-f" . counsel-find-file)
58− ("C-c g" . counsel-git)
59− ("C-c j" . counsel-git-grep)
60− ("C-c k" . counsel-ag)
61− ("C-x l" . counsel-locate)
62− ("M-y" . counsel-yank-pop)))
63−
64−(use-package flycheck
65− :defer 2
66− :config (global-flycheck-mode))
67−
68−(use-package ivy
69− :defer 1
70− :bind (("C-c C-r" . ivy-resume)
71− ("C-x C-b" . ivy-switch-buffer)
72− :map ivy-minibuffer-map
73− ("C-j" . ivy-call))
74− :diminish ivy-mode
75− :commands ivy-mode
76− :config
77− (ivy-mode 1))
78−
79−(use-package magit
80− :defer
81− :if (executable-find "git")
82− :bind (("C-x g" . magit-status)
83− ("C-x G" . magit-dispatch-popup))
84− :init
85− (setq magit-completing-read-function 'ivy-completing-read))
86−
87−(use-package projectile
88− :commands projectile-mode
89− :bind-keymap ("C-c p" . projectile-command-map)
90− :defer 5
91− :config
92− (projectile-global-mode))
93− '';
94− myEmacs = emacsWithPackages (epkgs: (with epkgs.melpaStablePackages; [
95− (runCommand "default.el" {} ''
96−mkdir -p $out/share/emacs/site-lisp
97−cp ${myEmacsConfig} $out/share/emacs/site-lisp/default.el
98−'')
99− company
100− counsel
101− flycheck
102− ivy
103− magit
104− projectile
105− use-package
106− ]));
107− };
108−}
109−</screen>
110−
111− <para>
112− This provides a fairly full Emacs start file. It will load in addition to the user's presonal config. You can always disable it by passing <command>-q</command> to the Emacs command.
113− </para>
114−
115− <para>
116− Sometimes <varname>emacsWithPackages</varname> is not enough, as this package set has some priorities imposed on packages (with the lowest priority assigned to Melpa Unstable, and the highest for packages manually defined in <filename>pkgs/top-level/emacs-packages.nix</filename>). But you can't control this priorities when some package is installed as a dependency. You can override it on per-package-basis, providing all the required dependencies manually - but it's tedious and there is always a possibility that an unwanted dependency will sneak in through some other package. To completely override such a package you can use <varname>overrideScope'</varname>.
117− </para>
118−
119−<screen>
120−overrides = self: super: rec {
121− haskell-mode = self.melpaPackages.haskell-mode;
122− ...
123−};
124−((emacsPackagesGen emacs).overrideScope' overrides).emacsWithPackages (p: with p; [
125− # here both these package will use haskell-mode of our own choice
126− ghc-mod
127− dante
128−])
129−</screen>
130− </section>
131−</section>
doc/builders/packages/etc-files.section.mdnew file+18
@@ -0,0 +1,18 @@
1+# /etc files {#etc}
2+
3+Certain calls in glibc require access to runtime files found in `/etc` such as `/etc/protocols` or `/etc/services` -- [getprotobyname](https://linux.die.net/man/3/getprotobyname) is one such function.
4+
5+On non-NixOS distributions these files are typically provided by packages (i.e., [netbase](https://packages.debian.org/sid/netbase)) if not already pre-installed in your distribution. This can cause non-reproducibility for code if they rely on these files being present.
6+
7+If [iana-etc](https://hydra.nixos.org/job/nixos/trunk-combined/nixpkgs.iana-etc.x86_64-linux) is part of your `buildInputs`, then it will set the environment variables `NIX_ETC_PROTOCOLS` and `NIX_ETC_SERVICES` to the corresponding files in the package through a setup hook.
8+
9+
10+```bash
11+> nix-shell -p iana-etc
12+
13+[nix-shell:~]$ env | grep NIX_ETC
14+NIX_ETC_SERVICES=/nix/store/aj866hr8fad8flnggwdhrldm0g799ccz-iana-etc-20210225/etc/services
15+NIX_ETC_PROTOCOLS=/nix/store/aj866hr8fad8flnggwdhrldm0g799ccz-iana-etc-20210225/etc/protocols
16+```
17+
18+Nixpkg's version of [glibc](https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/libraries/glibc/default.nix) has been patched to check for the existence of these environment variables. If the environment variables are *not* set, then it will attempt to find the files at the default location within `/etc`.
doc/builders/packages/firefox.section.mdnew file+51
@@ -0,0 +1,51 @@
1+# Firefox {#sec-firefox}
2+
3+## Build wrapped Firefox with extensions and policies {#build-wrapped-firefox-with-extensions-and-policies}
4+
5+The `wrapFirefox` function allows to pass policies, preferences and extensions that are available to Firefox. With the help of `fetchFirefoxAddon` this allows to build a Firefox version that already comes with add-ons pre-installed:
6+
7+```nix
8+{
9+ # Nix firefox addons only work with the firefox-esr package.
10+ myFirefox = wrapFirefox firefox-esr-unwrapped {
11+ nixExtensions = [
12+ (fetchFirefoxAddon {
13+ name = "ublock"; # Has to be unique!
14+ url = "https://addons.mozilla.org/firefox/downloads/file/3679754/ublock_origin-1.31.0-an+fx.xpi";
15+ sha256 = "1h768ljlh3pi23l27qp961v1hd0nbj2vasgy11bmcrlqp40zgvnr";
16+ })
17+ ];
18+
19+ extraPolicies = {
20+ CaptivePortal = false;
21+ DisableFirefoxStudies = true;
22+ DisablePocket = true;
23+ DisableTelemetry = true;
24+ DisableFirefoxAccounts = true;
25+ FirefoxHome = {
26+ Pocket = false;
27+ Snippets = false;
28+ };
29+ UserMessaging = {
30+ ExtensionRecommendations = false;
31+ SkipOnboarding = true;
32+ };
33+ };
34+
35+ extraPrefs = ''
36+ // Show more ssl cert infos
37+ lockPref("security.identityblock.show_extended_validation", true);
38+ '';
39+ };
40+}
41+```
42+
43+If `nixExtensions != null`, then all manually installed add-ons will be uninstalled from your browser profile.
44+To view available enterprise policies, visit [enterprise policies](https://github.com/mozilla/policy-templates#enterprisepoliciesenabled)
45+or type into the Firefox URL bar: `about:policies#documentation`.
46+Nix installed add-ons do not have a valid signature, which is why signature verification is disabled. This does not compromise security because downloaded add-ons are checksummed and manual add-ons can't be installed. Also, make sure that the `name` field of `fetchFirefoxAddon` is unique. If you remove an add-on from the `nixExtensions` array, rebuild and start Firefox: the removed add-on will be completely removed with all of its settings.
47+
48+## Troubleshooting {#sec-firefox-troubleshooting}
49+If add-ons are marked as broken or the signature is invalid, make sure you have Firefox ESR installed. Normal Firefox does not provide the ability anymore to disable signature verification for add-ons thus nix add-ons get disabled by the normal Firefox binary.
50+
51+If add-ons do not appear installed despite being defined in your nix configuration file, reset the local add-on state of your Firefox profile by clicking `Help -> More Troubleshooting Information -> Refresh Firefox`. This can happen if you switch from manual add-on mode to nix add-on mode and then back to manual mode and then again to nix add-on mode.
doc/builders/packages/fish.section.mdnew file+50
@@ -0,0 +1,50 @@
1+# Fish {#sec-fish}
2+
3+Fish is a "smart and user-friendly command line shell" with support for plugins.
4+
5+
6+## Vendor Fish scripts {#sec-fish-vendor}
7+
8+Any package may ship its own Fish completions, configuration snippets, and
9+functions. Those should be installed to
10+`$out/share/fish/vendor_{completions,conf,functions}.d` respectively.
11+
12+When the `programs.fish.enable` and
13+`programs.fish.vendor.{completions,config,functions}.enable` options from the
14+NixOS Fish module are set to true, those paths are symlinked in the current
15+system environment and automatically loaded by Fish.
16+
17+
18+## Packaging Fish plugins {#sec-fish-plugins-pkg}
19+
20+While packages providing standalone executables belong to the top level,
21+packages which have the sole purpose of extending Fish belong to the
22+`fishPlugins` scope and should be registered in
23+`pkgs/shells/fish/plugins/default.nix`.
24+
25+The `buildFishPlugin` utility function can be used to automatically copy Fish
26+scripts from `$src/{completions,conf,conf.d,functions}` to the standard vendor
27+installation paths. It also sets up the test environment so that the optional
28+`checkPhase` is executed in a Fish shell with other already packaged plugins
29+and package-local Fish functions specified in `checkPlugins` and
30+`checkFunctionDirs` respectively.
31+
32+See `pkgs/shells/fish/plugins/pure.nix` for an example of Fish plugin package
33+using `buildFishPlugin` and running unit tests with the `fishtape` test runner.
34+
35+
36+## Fish wrapper {#sec-fish-wrapper}
37+
38+The `wrapFish` package is a wrapper around Fish which can be used to create
39+Fish shells initialized with some plugins as well as completions, configuration
40+snippets and functions sourced from the given paths. This provides a convenient
41+way to test Fish plugins and scripts without having to alter the environment.
42+
43+```nix
44+wrapFish {
45+ pluginPkgs = with fishPlugins; [ pure foreign-env ];
46+ completionDirs = [];
47+ functionDirs = [];
48+ confDirs = [ "/path/to/some/fish/init/dir/" ];
49+}
50+```
doc/builders/packages/fuse.section.mdnew file+45
@@ -0,0 +1,45 @@
1+# FUSE {#sec-fuse}
2+
3+Some packages rely on
4+[FUSE](https://www.kernel.org/doc/html/latest/filesystems/fuse.html) to provide
5+support for additional filesystems not supported by the kernel.
6+
7+In general, FUSE software are primarily developed for Linux but many of them can
8+also run on macOS. Nixpkgs supports FUSE packages on macOS, but it requires
9+[macFUSE](https://osxfuse.github.io) to be installed outside of Nix. macFUSE
10+currently isn't packaged in Nixpkgs mainly because it includes a kernel
11+extension, which isn't supported by Nix outside of NixOS.
12+
13+If a package fails to run on macOS with an error message similar to the
14+following, it's a likely sign that you need to have macFUSE installed.
15+
16+ dyld: Library not loaded: /usr/local/lib/libfuse.2.dylib
17+ Referenced from: /nix/store/w8bi72bssv0bnxhwfw3xr1mvn7myf37x-sshfs-fuse-2.10/bin/sshfs
18+ Reason: image not found
19+ [1] 92299 abort /nix/store/w8bi72bssv0bnxhwfw3xr1mvn7myf37x-sshfs-fuse-2.10/bin/sshfs
20+
21+Package maintainers may often encounter the following error when building FUSE
22+packages on macOS:
23+
24+ checking for fuse.h... no
25+ configure: error: No fuse.h found.
26+
27+This happens on autoconf based projects that use `AC_CHECK_HEADERS` or
28+`AC_CHECK_LIBS` to detect libfuse, and will occur even when the `fuse` package
29+is included in `buildInputs`. It happens because libfuse headers throw an error
30+on macOS if the `FUSE_USE_VERSION` macro is undefined. Many projects do define
31+`FUSE_USE_VERSION`, but only inside C source files. This results in the above
32+error at configure time because the configure script would attempt to compile
33+sample FUSE programs without defining `FUSE_USE_VERSION`.
34+
35+There are two possible solutions for this problem in Nixpkgs:
36+
37+1. Pass `FUSE_USE_VERSION` to the configure script by adding
38+ `CFLAGS=-DFUSE_USE_VERSION=25` in `configureFlags`. The actual value would
39+ have to match the definition used in the upstream source code.
40+2. Remove `AC_CHECK_HEADERS` / `AC_CHECK_LIBS` for libfuse.
41+
42+However, a better solution might be to fix the build script upstream to use
43+`PKG_CHECK_MODULES` instead. This approach wouldn't suffer from the problem that
44+`AC_CHECK_HEADERS`/`AC_CHECK_LIBS` has at the price of introducing a dependency
45+on pkg-config.
doc/builders/packages/ibus.section.mdnew file+38
@@ -0,0 +1,38 @@
1+# ibus-engines.typing-booster {#sec-ibus-typing-booster}
2+
3+This package is an ibus-based completion method to speed up typing.
4+
5+## Activating the engine {#sec-ibus-typing-booster-activate}
6+
7+IBus needs to be configured accordingly to activate `typing-booster`. The configuration depends on the desktop manager in use. For detailed instructions, please refer to the [upstream docs](https://mike-fabian.github.io/ibus-typing-booster/documentation.html).
8+
9+On NixOS, you need to explicitly enable `ibus` with given engines before customizing your desktop to use `typing-booster`. This can be achieved using the `ibus` module:
10+
11+```nix
12+{ pkgs, ... }: {
13+ i18n.inputMethod = {
14+ enabled = "ibus";
15+ ibus.engines = with pkgs.ibus-engines; [ typing-booster ];
16+ };
17+}
18+```
19+
20+## Using custom hunspell dictionaries {#sec-ibus-typing-booster-customize-hunspell}
21+
22+The IBus engine is based on `hunspell` to support completion in many languages. By default, the dictionaries `de-de`, `en-us`, `fr-moderne` `es-es`, `it-it`, `sv-se` and `sv-fi` are in use. To add another dictionary, the package can be overridden like this:
23+
24+```nix
25+ibus-engines.typing-booster.override { langs = [ "de-at" "en-gb" ]; }
26+```
27+
28+_Note: each language passed to `langs` must be an attribute name in `pkgs.hunspellDicts`._
29+
30+## Built-in emoji picker {#sec-ibus-typing-booster-emoji-picker}
31+
32+The `ibus-engines.typing-booster` package contains a program named `emoji-picker`. To display all emojis correctly, a special font such as `noto-fonts-emoji` is needed:
33+
34+On NixOS, it can be installed using the following expression:
35+
36+```nix
37+{ pkgs, ... }: { fonts.fonts = with pkgs; [ noto-fonts-emoji ]; }
38+```
doc/builders/packages/ibus.xmldeleted−57
@@ -1,57 +0,0 @@
1−<section xmlns="http://docbook.org/ns/docbook"
2− xmlns:xlink="http://www.w3.org/1999/xlink"
3− xml:id="sec-ibus-typing-booster">
4− <title>ibus-engines.typing-booster</title>
5−
6− <para>
7− This package is an ibus-based completion method to speed up typing.
8− </para>
9−
10− <section xml:id="sec-ibus-typing-booster-activate">
11− <title>Activating the engine</title>
12−
13− <para>
14− IBus needs to be configured accordingly to activate <literal>typing-booster</literal>. The configuration depends on the desktop manager in use. For detailed instructions, please refer to the <link xlink:href="https://mike-fabian.github.io/ibus-typing-booster/documentation.html">upstream docs</link>.
15− </para>
16−
17− <para>
18− On NixOS you need to explicitly enable <literal>ibus</literal> with given engines before customizing your desktop to use <literal>typing-booster</literal>. This can be achieved using the <literal>ibus</literal> module:
19−<programlisting>{ pkgs, ... }: {
20− i18n.inputMethod = {
21− enabled = "ibus";
22− ibus.engines = with pkgs.ibus-engines; [ typing-booster ];
23− };
24−}</programlisting>
25− </para>
26− </section>
27−
28− <section xml:id="sec-ibus-typing-booster-customize-hunspell">
29− <title>Using custom hunspell dictionaries</title>
30−
31− <para>
32− The IBus engine is based on <literal>hunspell</literal> to support completion in many languages. By default the dictionaries <literal>de-de</literal>, <literal>en-us</literal>, <literal>fr-moderne</literal> <literal>es-es</literal>, <literal>it-it</literal>, <literal>sv-se</literal> and <literal>sv-fi</literal> are in use. To add another dictionary, the package can be overridden like this:
33−<programlisting>ibus-engines.typing-booster.override {
34− langs = [ "de-at" "en-gb" ];
35−}</programlisting>
36− </para>
37−
38− <para>
39− <emphasis>Note: each language passed to <literal>langs</literal> must be an attribute name in <literal>pkgs.hunspellDicts</literal>.</emphasis>
40− </para>
41− </section>
42−
43− <section xml:id="sec-ibus-typing-booster-emoji-picker">
44− <title>Built-in emoji picker</title>
45−
46− <para>
47− The <literal>ibus-engines.typing-booster</literal> package contains a program named <literal>emoji-picker</literal>. To display all emojis correctly, a special font such as <literal>noto-fonts-emoji</literal> is needed:
48− </para>
49−
50− <para>
51− On NixOS it can be installed using the following expression:
52−<programlisting>{ pkgs, ... }: {
53− fonts.fonts = with pkgs; [ noto-fonts-emoji ];
54−}</programlisting>
55− </para>
56− </section>
57−</section>
doc/builders/packages/index.xml+20−16
@@ -5,21 +5,25 @@
55 <para>
66 This chapter contains information about how to use and maintain the Nix expressions for a number of specific packages, such as the Linux kernel or X.org.
77 </para>
8− <xi:include href="citrix.xml" />
9− <xi:include href="dlib.xml" />
10− <xi:include href="eclipse.xml" />
11− <xi:include href="elm.xml" />
12− <xi:include href="emacs.xml" />
13− <xi:include href="ibus.xml" />
14− <xi:include href="kakoune.xml" />
15− <xi:include href="linux.xml" />
16− <xi:include href="locales.xml" />
17− <xi:include href="nginx.xml" />
18− <xi:include href="opengl.xml" />
19− <xi:include href="shell-helpers.xml" />
20− <xi:include href="steam.xml" />
8+ <xi:include href="citrix.section.xml" />
9+ <xi:include href="dlib.section.xml" />
10+ <xi:include href="eclipse.section.xml" />
11+ <xi:include href="elm.section.xml" />
12+ <xi:include href="emacs.section.xml" />
13+ <xi:include href="firefox.section.xml" />
14+ <xi:include href="fish.section.xml" />
15+ <xi:include href="fuse.section.xml" />
16+ <xi:include href="ibus.section.xml" />
17+ <xi:include href="kakoune.section.xml" />
18+ <xi:include href="linux.section.xml" />
19+ <xi:include href="locales.section.xml" />
20+ <xi:include href="etc-files.section.xml" />
21+ <xi:include href="nginx.section.xml" />
22+ <xi:include href="opengl.section.xml" />
23+ <xi:include href="shell-helpers.section.xml" />
24+ <xi:include href="steam.section.xml" />
2125 <xi:include href="cataclysm-dda.section.xml" />
22− <xi:include href="urxvt.xml" />
23− <xi:include href="weechat.xml" />
24− <xi:include href="xorg.xml" />
26+ <xi:include href="urxvt.section.xml" />
27+ <xi:include href="weechat.section.xml" />
28+ <xi:include href="xorg.section.xml" />
2529</chapter>
doc/builders/packages/kakoune.section.mdnew file+9
@@ -0,0 +1,9 @@
1+# Kakoune {#sec-kakoune}
2+
3+Kakoune can be built to autoload plugins:
4+
5+```nix
6+(kakoune.override {
7+ plugins = with pkgs.kakounePlugins; [ parinfer-rust ];
8+})
9+```
doc/builders/packages/kakoune.xmldeleted−12
@@ -1,12 +0,0 @@
1−<section xmlns="http://docbook.org/ns/docbook"
2− xmlns:xlink="http://www.w3.org/1999/xlink"
3− xml:id="sec-kakoune">
4− <title>Kakoune</title>
5−
6− <para>
7− Kakoune can be built to autoload plugins:
8−<programlisting>(kakoune.override {
9− plugins = with pkgs.kakounePlugins; [ parinfer-rust ];
10−})</programlisting>
11− </para>
12−</section>
doc/builders/packages/linux.section.mdnew file+41
@@ -0,0 +1,41 @@
1+# Linux kernel {#sec-linux-kernel}
2+
3+The Nix expressions to build the Linux kernel are in [`pkgs/os-specific/linux/kernel`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/os-specific/linux/kernel).
4+
5+The function that builds the kernel has an argument `kernelPatches` which should be a list of `{name, patch, extraConfig}` attribute sets, where `name` is the name of the patch (which is included in the kernel’s `meta.description` attribute), `patch` is the patch itself (possibly compressed), and `extraConfig` (optional) is a string specifying extra options to be concatenated to the kernel configuration file (`.config`).
6+
7+The kernel derivation exports an attribute `features` specifying whether optional functionality is or isn’t enabled. This is used in NixOS to implement kernel-specific behaviour. For instance, if the kernel has the `iwlwifi` feature (i.e., has built-in support for Intel wireless chipsets), then NixOS doesn’t have to build the external `iwlwifi` package:
8+
9+```nix
10+modulesTree = [kernel]
11+ ++ pkgs.lib.optional (!kernel.features ? iwlwifi) kernelPackages.iwlwifi
12+ ++ ...;
13+```
14+
15+How to add a new (major) version of the Linux kernel to Nixpkgs:
16+
17+1. Copy the old Nix expression (e.g., `linux-2.6.21.nix`) to the new one (e.g., `linux-2.6.22.nix`) and update it.
18+
19+2. Add the new kernel to the `kernels` attribute set in `linux-kernels.nix` (e.g., create an attribute `kernel_2_6_22`).
20+
21+3. Now we’re going to update the kernel configuration. First unpack the kernel. Then for each supported platform (`i686`, `x86_64`, `uml`) do the following:
22+
23+ 1. Make a copy from the old config (e.g., `config-2.6.21-i686-smp`) to the new one (e.g., `config-2.6.22-i686-smp`).
24+
25+ 2. Copy the config file for this platform (e.g., `config-2.6.22-i686-smp`) to `.config` in the kernel source tree.
26+
27+ 3. Run `make oldconfig ARCH={i386,x86_64,um}` and answer all questions. (For the uml configuration, also add `SHELL=bash`.) Make sure to keep the configuration consistent between platforms (i.e., don’t enable some feature on `i686` and disable it on `x86_64`).
28+
29+ 4. If needed, you can also run `make menuconfig`:
30+
31+ ```ShellSession
32+ $ nix-env -f "<nixpkgs>" -iA ncurses
33+ $ export NIX_CFLAGS_LINK=-lncurses
34+ $ make menuconfig ARCH=arch
35+ ```
36+
37+ 5. Copy `.config` over the new config file (e.g., `config-2.6.22-i686-smp`).
38+
39+4. Test building the kernel: `nix-build -A linuxKernel.kernels.kernel_2_6_22`. If it compiles, ship it! For extra credit, try booting NixOS with it.
40+
41+5. It may be that the new kernel requires updating the external kernel modules and kernel-dependent packages listed in the `linuxPackagesFor` function in `linux-kernels.nix` (such as the NVIDIA drivers, AUFS, etc.). If the updated packages aren’t backwards compatible with older kernels, you may need to keep the older versions around.
doc/builders/packages/linux.xmldeleted−85
@@ -1,85 +0,0 @@
1−<section xmlns="http://docbook.org/ns/docbook"
2− xmlns:xlink="http://www.w3.org/1999/xlink"
3− xml:id="sec-linux-kernel">
4− <title>Linux kernel</title>
5−
6− <para>
7− The Nix expressions to build the Linux kernel are in <link
8−xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/os-specific/linux/kernel"><filename>pkgs/os-specific/linux/kernel</filename></link>.
9− </para>
10−
11− <para>
12− The function that builds the kernel has an argument <varname>kernelPatches</varname> which should be a list of <literal>{name, patch, extraConfig}</literal> attribute sets, where <varname>name</varname> is the name of the patch (which is included in the kernel’s <varname>meta.description</varname> attribute), <varname>patch</varname> is the patch itself (possibly compressed), and <varname>extraConfig</varname> (optional) is a string specifying extra options to be concatenated to the kernel configuration file (<filename>.config</filename>).
13− </para>
14−
15− <para>
16− The kernel derivation exports an attribute <varname>features</varname> specifying whether optional functionality is or isn’t enabled. This is used in NixOS to implement kernel-specific behaviour. For instance, if the kernel has the <varname>iwlwifi</varname> feature (i.e. has built-in support for Intel wireless chipsets), then NixOS doesn’t have to build the external <varname>iwlwifi</varname> package:
17−<programlisting>
18−modulesTree = [kernel]
19− ++ pkgs.lib.optional (!kernel.features ? iwlwifi) kernelPackages.iwlwifi
20− ++ ...;
21−</programlisting>
22− </para>
23−
24− <para>
25− How to add a new (major) version of the Linux kernel to Nixpkgs:
26− <orderedlist>
27− <listitem>
28− <para>
29− Copy the old Nix expression (e.g. <filename>linux-2.6.21.nix</filename>) to the new one (e.g. <filename>linux-2.6.22.nix</filename>) and update it.
30− </para>
31− </listitem>
32− <listitem>
33− <para>
34− Add the new kernel to <filename>all-packages.nix</filename> (e.g., create an attribute <varname>kernel_2_6_22</varname>).
35− </para>
36− </listitem>
37− <listitem>
38− <para>
39− Now we’re going to update the kernel configuration. First unpack the kernel. Then for each supported platform (<literal>i686</literal>, <literal>x86_64</literal>, <literal>uml</literal>) do the following:
40− <orderedlist>
41− <listitem>
42− <para>
43− Make an copy from the old config (e.g. <filename>config-2.6.21-i686-smp</filename>) to the new one (e.g. <filename>config-2.6.22-i686-smp</filename>).
44− </para>
45− </listitem>
46− <listitem>
47− <para>
48− Copy the config file for this platform (e.g. <filename>config-2.6.22-i686-smp</filename>) to <filename>.config</filename> in the kernel source tree.
49− </para>
50− </listitem>
51− <listitem>
52− <para>
53− Run <literal>make oldconfig ARCH=<replaceable>{i386,x86_64,um}</replaceable></literal> and answer all questions. (For the uml configuration, also add <literal>SHELL=bash</literal>.) Make sure to keep the configuration consistent between platforms (i.e. don’t enable some feature on <literal>i686</literal> and disable it on <literal>x86_64</literal>).
54− </para>
55− </listitem>
56− <listitem>
57− <para>
58− If needed you can also run <literal>make menuconfig</literal>:
59−<screen>
60−<prompt>$ </prompt>nix-env -i ncurses
61−<prompt>$ </prompt>export NIX_CFLAGS_LINK=-lncurses
62−<prompt>$ </prompt>make menuconfig ARCH=<replaceable>arch</replaceable></screen>
63− </para>
64− </listitem>
65− <listitem>
66− <para>
67− Copy <filename>.config</filename> over the new config file (e.g. <filename>config-2.6.22-i686-smp</filename>).
68− </para>
69− </listitem>
70− </orderedlist>
71− </para>
72− </listitem>
73− <listitem>
74− <para>
75− Test building the kernel: <literal>nix-build -A kernel_2_6_22</literal>. If it compiles, ship it! For extra credit, try booting NixOS with it.
76− </para>
77− </listitem>
78− <listitem>
79− <para>
80− It may be that the new kernel requires updating the external kernel modules and kernel-dependent packages listed in the <varname>linuxPackagesFor</varname> function in <filename>all-packages.nix</filename> (such as the NVIDIA drivers, AUFS, etc.). If the updated packages aren’t backwards compatible with older kernels, you may need to keep the older versions around.
81− </para>
82− </listitem>
83− </orderedlist>
84− </para>
85−</section>
doc/builders/packages/locales.section.mdnew file+5
@@ -0,0 +1,5 @@
1+# Locales {#locales}
2+
3+To allow simultaneous use of packages linked against different versions of `glibc` with different locale archive formats, Nixpkgs patches `glibc` to rely on `LOCALE_ARCHIVE` environment variable.
4+
5+On non-NixOS distributions, this variable is obviously not set. This can cause regressions in language support or even crashes in some Nixpkgs-provided programs. The simplest way to mitigate this problem is exporting the `LOCALE_ARCHIVE` variable pointing to `${glibcLocales}/lib/locale/locale-archive`. The drawback (and the reason this is not the default) is the relatively large (a hundred MiB) size of the full set of locales. It is possible to build a custom set of locales by overriding parameters `allLocales` and `locales` of the package.
doc/builders/packages/locales.xmldeleted−13
@@ -1,13 +0,0 @@
1−<section xmlns="http://docbook.org/ns/docbook"
2− xmlns:xlink="http://www.w3.org/1999/xlink"
3− xml:id="locales">
4− <title>Locales</title>
5−
6− <para>
7− To allow simultaneous use of packages linked against different versions of <literal>glibc</literal> with different locale archive formats Nixpkgs patches <literal>glibc</literal> to rely on <literal>LOCALE_ARCHIVE</literal> environment variable.
8− </para>
9−
10− <para>
11− On non-NixOS distributions this variable is obviously not set. This can cause regressions in language support or even crashes in some Nixpkgs-provided programs. The simplest way to mitigate this problem is exporting the <literal>LOCALE_ARCHIVE</literal> variable pointing to <literal>${glibcLocales}/lib/locale/locale-archive</literal>. The drawback (and the reason this is not the default) is the relatively large (a hundred MiB) size of the full set of locales. It is possible to build a custom set of locales by overriding parameters <literal>allLocales</literal> and <literal>locales</literal> of the package.
12− </para>
13−</section>
doc/builders/packages/nginx.section.mdnew file+11
@@ -0,0 +1,11 @@
1+# Nginx {#sec-nginx}
2+
3+[Nginx](https://nginx.org) is a reverse proxy and lightweight webserver.
4+
5+## ETags on static files served from the Nix store {#sec-nginx-etag}
6+
7+HTTP has a couple of different mechanisms for caching to prevent clients from having to download the same content repeatedly if a resource has not changed since the last time it was requested. When nginx is used as a server for static files, it implements the caching mechanism based on the [`Last-Modified`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Last-Modified) response header automatically; unfortunately, it works by using filesystem timestamps to determine the value of the `Last-Modified` header. This doesn't give the desired behavior when the file is in the Nix store because all file timestamps are set to 0 (for reasons related to build reproducibility).
8+
9+Fortunately, HTTP supports an alternative (and more effective) caching mechanism: the [`ETag`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag) response header. The value of the `ETag` header specifies some identifier for the particular content that the server is sending (e.g., a hash). When a client makes a second request for the same resource, it sends that value back in an `If-None-Match` header. If the ETag value is unchanged, then the server does not need to resend the content.
10+
11+As of NixOS 19.09, the nginx package in Nixpkgs is patched such that when nginx serves a file out of `/nix/store`, the hash in the store path is used as the `ETag` header in the HTTP response, thus providing proper caching functionality. This happens automatically; you do not need to do modify any configuration to get this behavior.
doc/builders/packages/nginx.xmldeleted−25
@@ -1,25 +0,0 @@
1−<section xmlns="http://docbook.org/ns/docbook"
2− xmlns:xlink="http://www.w3.org/1999/xlink"
3− xml:id="sec-nginx">
4− <title>Nginx</title>
5−
6− <para>
7− <link xlink:href="https://nginx.org/">Nginx</link> is a reverse proxy and lightweight webserver.
8− </para>
9−
10− <section xml:id="sec-nginx-etag">
11− <title>ETags on static files served from the Nix store</title>
12−
13− <para>
14− HTTP has a couple different mechanisms for caching to prevent clients from having to download the same content repeatedly if a resource has not changed since the last time it was requested. When nginx is used as a server for static files, it implements the caching mechanism based on the <link xlink:href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Last-Modified"><literal>Last-Modified</literal></link> response header automatically; unfortunately, it works by using filesystem timestamps to determine the value of the <literal>Last-Modified</literal> header. This doesn't give the desired behavior when the file is in the Nix store, because all file timestamps are set to 0 (for reasons related to build reproducibility).
15− </para>
16−
17− <para>
18− Fortunately, HTTP supports an alternative (and more effective) caching mechanism: the <link xlink:href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag"><literal>ETag</literal></link> response header. The value of the <literal>ETag</literal> header specifies some identifier for the particular content that the server is sending (e.g. a hash). When a client makes a second request for the same resource, it sends that value back in an <literal>If-None-Match</literal> header. If the ETag value is unchanged, then the server does not need to resend the content.
19− </para>
20−
21− <para>
22− As of NixOS 19.09, the nginx package in Nixpkgs is patched such that when nginx serves a file out of <filename>/nix/store</filename>, the hash in the store path is used as the <literal>ETag</literal> header in the HTTP response, thus providing proper caching functionality. This happens automatically; you do not need to do modify any configuration to get this behavior.
23− </para>
24− </section>
25−</section>
doc/builders/packages/opengl.section.mdnew file+15
@@ -0,0 +1,15 @@
1+# OpenGL {#sec-opengl}
2+
3+OpenGL support varies depending on which hardware is used and which drivers are available and loaded.
4+
5+Broadly, we support both GL vendors: Mesa and NVIDIA.
6+
7+## NixOS Desktop {#nixos-desktop}
8+
9+The NixOS desktop or other non-headless configurations are the primary target for OpenGL libraries and applications. The current solution for discovering which drivers are available is based on [libglvnd](https://gitlab.freedesktop.org/glvnd/libglvnd). `libglvnd` performs "vendor-neutral dispatch", trying a variety of techniques to find the system's GL implementation. In practice, this will be either via standard GLX for X11 users or EGL for Wayland users, and supporting either NVIDIA or Mesa extensions.
10+
11+## Nix on GNU/Linux {#nix-on-gnulinux}
12+
13+If you are using a non-NixOS GNU/Linux/X11 desktop with free software video drivers, consider launching OpenGL-dependent programs from Nixpkgs with Nixpkgs versions of `libglvnd` and `mesa.drivers` in `LD_LIBRARY_PATH`. For Mesa drivers, the Linux kernel version doesn't have to match nixpkgs.
14+
15+For proprietary video drivers, you might have luck with also adding the corresponding video driver package.
doc/builders/packages/opengl.xmldeleted−9
@@ -1,9 +0,0 @@
1−<section xmlns="http://docbook.org/ns/docbook"
2− xmlns:xlink="http://www.w3.org/1999/xlink"
3− xml:id="sec-opengl">
4− <title>OpenGL</title>
5−
6− <para>
7− Packages that use OpenGL have NixOS desktop as their primary target. The current solution for loading the GPU-specific drivers is based on <literal>libglvnd</literal> and looks for the driver implementation in <literal>LD_LIBRARY_PATH</literal>. If you are using a non-NixOS GNU/Linux/X11 desktop with free software video drivers, consider launching OpenGL-dependent programs from Nixpkgs with Nixpkgs versions of <literal>libglvnd</literal> and <literal>mesa.drivers</literal> in <literal>LD_LIBRARY_PATH</literal>. For proprietary video drivers you might have luck with also adding the corresponding video driver package.
8− </para>
9−</section>
doc/builders/packages/shell-helpers.section.mdnew file+12
@@ -0,0 +1,12 @@
1+# Interactive shell helpers {#sec-shell-helpers}
2+
3+Some packages provide the shell integration to be more useful. But unlike other systems, nix doesn't have a standard `share` directory location. This is why a bunch `PACKAGE-share` scripts are shipped that print the location of the corresponding shared folder. Current list of such packages is as following:
4+
5+- `fzf` : `fzf-share`
6+
7+E.g. `fzf` can then be used in the `.bashrc` like this:
8+
9+```bash
10+source "$(fzf-share)/completion.bash"
11+source "$(fzf-share)/key-bindings.bash"
12+```
doc/builders/packages/shell-helpers.xmldeleted−21
@@ -1,21 +0,0 @@
1−<section xmlns="http://docbook.org/ns/docbook"
2− xmlns:xlink="http://www.w3.org/1999/xlink"
3− xml:id="sec-shell-helpers">
4− <title>Interactive shell helpers</title>
5−
6− <para>
7− Some packages provide the shell integration to be more useful. But unlike other systems, nix doesn't have a standard share directory location. This is why a bunch <command>PACKAGE-share</command> scripts are shipped that print the location of the corresponding shared folder. Current list of such packages is as following:
8− <itemizedlist>
9− <listitem>
10− <para>
11− <literal>fzf</literal>: <command>fzf-share</command>
12− </para>
13− </listitem>
14− </itemizedlist>
15− E.g. <literal>fzf</literal> can then used in the .bashrc like this:
16−<screen>
17− source "$(fzf-share)/completion.bash"
18− source "$(fzf-share)/key-bindings.bash"
19−</screen>
20− </para>
21−</section>
doc/builders/packages/steam.section.mdnew file+63
@@ -0,0 +1,63 @@
1+# Steam {#sec-steam}
2+
3+## Steam in Nix {#sec-steam-nix}
4+
5+Steam is distributed as a `.deb` file, for now only as an i686 package (the amd64 package only has documentation). When unpacked, it has a script called `steam` that in Ubuntu (their target distro) would go to `/usr/bin`. When run for the first time, this script copies some files to the user's home, which include another script that is the ultimate responsible for launching the steam binary, which is also in `$HOME`.
6+
7+Nix problems and constraints:
8+
9+- We don't have `/bin/bash` and many scripts point there. Same thing for `/usr/bin/python`.
10+- We don't have the dynamic loader in `/lib`.
11+- The `steam.sh` script in `$HOME` cannot be patched, as it is checked and rewritten by steam.
12+- The steam binary cannot be patched, it's also checked.
13+
14+The current approach to deploy Steam in NixOS is composing a FHS-compatible chroot environment, as documented [here](http://sandervanderburg.blogspot.nl/2013/09/composing-fhs-compatible-chroot.html). This allows us to have binaries in the expected paths without disrupting the system, and to avoid patching them to work in a non FHS environment.
15+
16+## How to play {#sec-steam-play}
17+
18+Use `programs.steam.enable = true;` if you want to add steam to `systemPackages` and also enable a few workarounds as well as Steam controller support or other Steam supported controllers such as the DualShock 4 or Nintendo Switch Pro Controller.
19+
20+## Troubleshooting {#sec-steam-troub}
21+
22+- **Steam fails to start. What do I do?**
23+
24+ Try to run
25+
26+ ```ShellSession
27+ strace steam
28+ ```
29+
30+ to see what is causing steam to fail.
31+
32+- **Using the FOSS Radeon or nouveau (nvidia) drivers**
33+
34+ - The `newStdcpp` parameter was removed since NixOS 17.09 and should not be needed anymore.
35+ - Steam ships statically linked with a version of `libcrypto` that conflicts with the one dynamically loaded by radeonsi_dri.so. If you get the error:
36+
37+ ```
38+ steam.sh: line 713: 7842 Segmentation fault (core dumped)
39+ ```
40+
41+ have a look at [this pull request](https://github.com/NixOS/nixpkgs/pull/20269).
42+
43+- **Java**
44+
45+ 1. There is no java in steam chrootenv by default. If you get a message like:
46+
47+ ```
48+ /home/foo/.local/share/Steam/SteamApps/common/towns/towns.sh: line 1: java: command not found
49+ ```
50+
51+ you need to add:
52+
53+ ```nix
54+ steam.override { withJava = true; };
55+ ```
56+
57+## steam-run {#sec-steam-run}
58+
59+The FHS-compatible chroot used for Steam can also be used to run other Linux games that expect a FHS environment. To use it, install the `steam-run` package and run the game with:
60+
61+```
62+steam-run ./foo
63+```
doc/builders/packages/steam.xmldeleted−125
@@ -1,125 +0,0 @@
1−<section xmlns="http://docbook.org/ns/docbook"
2− xmlns:xlink="http://www.w3.org/1999/xlink"
3− xml:id="sec-steam">
4− <title>Steam</title>
5−
6− <section xml:id="sec-steam-nix">
7− <title>Steam in Nix</title>
8−
9− <para>
10− Steam is distributed as a <filename>.deb</filename> file, for now only as an i686 package (the amd64 package only has documentation). When unpacked, it has a script called <filename>steam</filename> that in Ubuntu (their target distro) would go to <filename>/usr/bin </filename>. When run for the first time, this script copies some files to the user's home, which include another script that is the ultimate responsible for launching the steam binary, which is also in $HOME.
11− </para>
12−
13− <para>
14− Nix problems and constraints:
15− <itemizedlist>
16− <listitem>
17− <para>
18− We don't have <filename>/bin/bash</filename> and many scripts point there. Similarly for <filename>/usr/bin/python</filename> .
19− </para>
20− </listitem>
21− <listitem>
22− <para>
23− We don't have the dynamic loader in <filename>/lib </filename>.
24− </para>
25− </listitem>
26− <listitem>
27− <para>
28− The <filename>steam.sh</filename> script in $HOME can not be patched, as it is checked and rewritten by steam.
29− </para>
30− </listitem>
31− <listitem>
32− <para>
33− The steam binary cannot be patched, it's also checked.
34− </para>
35− </listitem>
36− </itemizedlist>
37− </para>
38−
39− <para>
40− The current approach to deploy Steam in NixOS is composing a FHS-compatible chroot environment, as documented <link xlink:href="http://sandervanderburg.blogspot.nl/2013/09/composing-fhs-compatible-chroot.html">here</link>. This allows us to have binaries in the expected paths without disrupting the system, and to avoid patching them to work in a non FHS environment.
41− </para>
42− </section>
43−
44− <section xml:id="sec-steam-play">
45− <title>How to play</title>
46−
47− <para>
48− Use <programlisting>programs.steam.enable = true;</programlisting> if you want to add steam to systemPackages and also enable a few workarrounds aswell as Steam controller support or other Steam supported controllers such as the DualShock 4 or Nintendo Switch Pr.
49− </para>
50− </section>
51−
52− <section xml:id="sec-steam-troub">
53− <title>Troubleshooting</title>
54−
55− <para>
56− <variablelist>
57− <varlistentry>
58− <term>
59− Steam fails to start. What do I do?
60− </term>
61− <listitem>
62− <para>
63− Try to run
64−<programlisting>strace steam</programlisting>
65− to see what is causing steam to fail.
66− </para>
67− </listitem>
68− </varlistentry>
69− <varlistentry>
70− <term>
71− Using the FOSS Radeon or nouveau (nvidia) drivers
72− </term>
73− <listitem>
74− <itemizedlist>
75− <listitem>
76− <para>
77− The <literal>newStdcpp</literal> parameter was removed since NixOS 17.09 and should not be needed anymore.
78− </para>
79− </listitem>
80− <listitem>
81− <para>
82− Steam ships statically linked with a version of libcrypto that conflics with the one dynamically loaded by radeonsi_dri.so. If you get the error
83−<programlisting>steam.sh: line 713: 7842 Segmentation fault (core dumped)</programlisting>
84− have a look at <link xlink:href="https://github.com/NixOS/nixpkgs/pull/20269">this pull request</link>.
85− </para>
86− </listitem>
87− </itemizedlist>
88− </listitem>
89− </varlistentry>
90− <varlistentry>
91− <term>
92− Java
93− </term>
94− <listitem>
95− <orderedlist>
96− <listitem>
97− <para>
98− There is no java in steam chrootenv by default. If you get a message like
99−<programlisting>/home/foo/.local/share/Steam/SteamApps/common/towns/towns.sh: line 1: java: command not found</programlisting>
100− You need to add
101−<programlisting> steam.override { withJava = true; };</programlisting>
102− to your configuration.
103− </para>
104− </listitem>
105− </orderedlist>
106− </listitem>
107− </varlistentry>
108− </variablelist>
109− </para>
110− </section>
111−
112− <section xml:id="sec-steam-run">
113− <title>steam-run</title>
114−
115− <para>
116− The FHS-compatible chroot used for steam can also be used to run other linux games that expect a FHS environment. To do it, add
117−<programlisting>pkgs.(steam.override {
118− nativeOnly = true;
119− newStdcpp = true;
120− }).run</programlisting>
121− to your configuration, rebuild, and run the game with
122−<programlisting>steam-run ./foo</programlisting>
123− </para>
124− </section>
125−</section>
doc/builders/packages/urxvt.section.mdnew file+71
@@ -0,0 +1,71 @@
1+# Urxvt {#sec-urxvt}
2+
3+Urxvt, also known as rxvt-unicode, is a highly customizable terminal emulator.
4+
5+## Configuring urxvt {#sec-urxvt-conf}
6+
7+In `nixpkgs`, urxvt is provided by the package `rxvt-unicode`. It can be configured to include your choice of plugins, reducing its closure size from the default configuration which includes all available plugins. To make use of this functionality, use an overlay or directly install an expression that overrides its configuration, such as:
8+
9+```nix
10+rxvt-unicode.override {
11+ configure = { availablePlugins, ... }: {
12+ plugins = with availablePlugins; [ perls resize-font vtwheel ];
13+ };
14+}
15+```
16+
17+If the `configure` function returns an attrset without the `plugins` attribute, `availablePlugins` will be used automatically.
18+
19+In order to add plugins but also keep all default plugins installed, it is possible to use the following method:
20+
21+```nix
22+rxvt-unicode.override {
23+ configure = { availablePlugins, ... }: {
24+ plugins = (builtins.attrValues availablePlugins) ++ [ custom-plugin ];
25+ };
26+}
27+```
28+
29+To get a list of all the plugins available, open the Nix REPL and run
30+
31+```ShellSession
32+$ nix repl
33+:l <nixpkgs>
34+map (p: p.name) pkgs.rxvt-unicode.plugins
35+```
36+
37+Alternatively, if your shell is bash or zsh and have completion enabled, simply type `nixpkgs.rxvt-unicode.plugins.<tab>`.
38+
39+In addition to `plugins` the options `extraDeps` and `perlDeps` can be used to install extra packages. `extraDeps` can be used, for example, to provide `xsel` (a clipboard manager) to the clipboard plugin, without installing it globally:
40+
41+```nix
42+rxvt-unicode.override {
43+ configure = { availablePlugins, ... }: {
44+ pluginsDeps = [ xsel ];
45+ };
46+}
47+```
48+
49+`perlDeps` is a handy way to provide Perl packages to your custom plugins (in `$HOME/.urxvt/ext`). For example, if you need `AnyEvent` you can do:
50+
51+```nix
52+rxvt-unicode.override {
53+ configure = { availablePlugins, ... }: {
54+ perlDeps = with perlPackages; [ AnyEvent ];
55+ };
56+}
57+```
58+
59+## Packaging urxvt plugins {#sec-urxvt-pkg}
60+
61+Urxvt plugins resides in `pkgs/applications/misc/rxvt-unicode-plugins`. To add a new plugin, create an expression in a subdirectory and add the package to the set in `pkgs/applications/misc/rxvt-unicode-plugins/default.nix`.
62+
63+A plugin can be any kind of derivation, the only requirement is that it should always install perl scripts in `$out/lib/urxvt/perl`. Look for existing plugins for examples.
64+
65+If the plugin is itself a Perl package that needs to be imported from other plugins or scripts, add the following passthrough:
66+
67+```nix
68+passthru.perlPackages = [ "self" ];
69+```
70+
71+This will make the urxvt wrapper pick up the dependency and set up the Perl path accordingly.
doc/builders/packages/urxvt.xmldeleted−115
@@ -1,115 +0,0 @@
1−<section xmlns="http://docbook.org/ns/docbook"
2− xmlns:xlink="http://www.w3.org/1999/xlink"
3− xml:id="sec-urxvt">
4− <title>Urxvt</title>
5−
6− <para>
7− Urxvt, also known as rxvt-unicode, is a highly customizable terminal emulator.
8− </para>
9−
10− <section xml:id="sec-urxvt-conf">
11−
12− <title>Configuring urxvt</title>
13−
14− <para>
15− In <literal>nixpkgs</literal>, urxvt is provided by the package
16− <literal>rxvt-unicode</literal>. It can be configured to include your choice
17− of plugins, reducing its closure size from the default configuration which
18− includes all available plugins. To make use of this functionality, use an
19− overlay or directly install an expression that overrides its configuration,
20− such as
21−<programlisting>
22−rxvt-unicode.override {
23− configure = { availablePlugins, ... }: {
24− plugins = with availablePlugins; [ perls resize-font vtwheel ];
25− };
26−}
27−</programlisting>
28− If the <literal>configure</literal> function returns an attrset without the
29− <literal>plugins</literal> attribute, <literal>availablePlugins</literal>
30− will be used automatically.
31− </para>
32−
33− <para>
34− In order to add plugins but also keep all default plugins installed, it is
35− possible to use the following method:
36−<programlisting>
37−rxvt-unicode.override {
38− configure = { availablePlugins, ... }: {
39− plugins = (builtins.attrValues availablePlugins) ++ [ custom-plugin ];
40− };
41−}
42−</programlisting>
43− </para>
44−
45− <para>
46− To get a list of all the plugins available, open the Nix REPL and run
47−<screen>
48−<prompt>$ </prompt>nix repl
49−:l &lt;nixpkgs&gt;
50−map (p: p.name) pkgs.rxvt-unicode.plugins
51−</screen>
52− Alternatively, if your shell is bash or zsh and have completion enabled,
53− simply type <literal>nixpkgs.rxvt-unicode.plugins.&lt;tab&gt;</literal>.
54− </para>
55−
56− <para>
57− In addition to <literal>plugins</literal> the options
58− <literal>extraDeps</literal> and <literal>perlDeps</literal> can be used
59− to install extra packages.
60− <literal>extraDeps</literal> can be used, for example, to provide
61− <literal>xsel</literal> (a clipboard manager) to the clipboard plugin,
62− without installing it globally:
63−<programlisting>
64−rxvt-unicode.override {
65− configure = { availablePlugins, ... }: {
66− pluginsDeps = [ xsel ];
67− };
68−}
69−</programlisting>
70−
71− <literal>perlDeps</literal> is a handy way to provide Perl packages to
72− your custom plugins (in <literal>$HOME/.urxvt/ext</literal>). For example,
73− if you need <literal>AnyEvent</literal> you can do:
74−<programlisting>
75−rxvt-unicode.override {
76− configure = { availablePlugins, ... }: {
77− perlDeps = with perlPackages; [ AnyEvent ];
78− };
79−}
80−</programlisting>
81− </para>
82−
83− </section>
84−
85− <section xml:id="sec-urxvt-pkg">
86−
87− <title>Packaging urxvt plugins</title>
88−
89− <para>
90− Urxvt plugins resides in
91− <literal>pkgs/applications/misc/rxvt-unicode-plugins</literal>.
92− To add a new plugin create an expression in a subdirectory and add the
93− package to the set in
94− <literal>pkgs/applications/misc/rxvt-unicode-plugins/default.nix</literal>.
95− </para>
96−
97− <para>
98− A plugin can be any kind of derivation, the only requirement is that it
99− should always install perl scripts in <literal>$out/lib/urxvt/perl</literal>.
100− Look for existing plugins for examples.
101− </para>
102−
103− <para>
104− If the plugin is itself a perl package that needs to be imported from
105− other plugins or scripts, add the following passthrough:
106−<programlisting>
107−passthru.perlPackages = [ "self" ];
108−</programlisting>
109− This will make the urxvt wrapper pick up the dependency and set up the perl
110− path accordingly.
111− </para>
112−
113− </section>
114−
115−</section>
doc/builders/packages/weechat.section.mdnew file+85
@@ -0,0 +1,85 @@
1+# WeeChat {#sec-weechat}
2+
3+WeeChat can be configured to include your choice of plugins, reducing its closure size from the default configuration which includes all available plugins. To make use of this functionality, install an expression that overrides its configuration, such as:
4+
5+```nix
6+weechat.override {configure = {availablePlugins, ...}: {
7+ plugins = with availablePlugins; [ python perl ];
8+ }
9+}
10+```
11+
12+If the `configure` function returns an attrset without the `plugins` attribute, `availablePlugins` will be used automatically.
13+
14+The plugins currently available are `python`, `perl`, `ruby`, `guile`, `tcl` and `lua`.
15+
16+The Python and Perl plugins allows the addition of extra libraries. For instance, the `inotify.py` script in `weechat-scripts` requires D-Bus or libnotify, and the `fish.py` script requires `pycrypto`. To use these scripts, use the plugin's `withPackages` attribute:
17+
18+```nix
19+weechat.override { configure = {availablePlugins, ...}: {
20+ plugins = with availablePlugins; [
21+ (python.withPackages (ps: with ps; [ pycrypto python-dbus ]))
22+ ];
23+ };
24+}
25+```
26+
27+In order to also keep all default plugins installed, it is possible to use the following method:
28+
29+```nix
30+weechat.override { configure = { availablePlugins, ... }: {
31+ plugins = builtins.attrValues (availablePlugins // {
32+ python = availablePlugins.python.withPackages (ps: with ps; [ pycrypto python-dbus ]);
33+ });
34+}; }
35+```
36+
37+WeeChat allows to set defaults on startup using the `--run-command`. The `configure` method can be used to pass commands to the program:
38+
39+```nix
40+weechat.override {
41+ configure = { availablePlugins, ... }: {
42+ init = ''
43+ /set foo bar
44+ /server add libera irc.libera.chat
45+ '';
46+ };
47+}
48+```
49+
50+Further values can be added to the list of commands when running `weechat --run-command "your-commands"`.
51+
52+Additionally, it's possible to specify scripts to be loaded when starting `weechat`. These will be loaded before the commands from `init`:
53+
54+```nix
55+weechat.override {
56+ configure = { availablePlugins, ... }: {
57+ scripts = with pkgs.weechatScripts; [
58+ weechat-xmpp weechat-matrix-bridge wee-slack
59+ ];
60+ init = ''
61+ /set plugins.var.python.jabber.key "val"
62+ '':
63+ };
64+}
65+```
66+
67+In `nixpkgs` there's a subpackage which contains derivations for WeeChat scripts. Such derivations expect a `passthru.scripts` attribute, which contains a list of all scripts inside the store path. Furthermore, all scripts have to live in `$out/share`. An exemplary derivation looks like this:
68+
69+```nix
70+{ stdenv, fetchurl }:
71+
72+stdenv.mkDerivation {
73+ name = "exemplary-weechat-script";
74+ src = fetchurl {
75+ url = "https://scripts.tld/your-scripts.tar.gz";
76+ sha256 = "...";
77+ };
78+ passthru.scripts = [ "foo.py" "bar.lua" ];
79+ installPhase = ''
80+ mkdir $out/share
81+ cp foo.py $out/share
82+ cp bar.lua $out/share
83+ '';
84+}
85+```
doc/builders/packages/weechat.xmldeleted−85
@@ -1,85 +0,0 @@
1−<section xmlns="http://docbook.org/ns/docbook"
2− xmlns:xlink="http://www.w3.org/1999/xlink"
3− xml:id="sec-weechat">
4− <title>Weechat</title>
5−
6− <para>
7− Weechat can be configured to include your choice of plugins, reducing its closure size from the default configuration which includes all available plugins. To make use of this functionality, install an expression that overrides its configuration such as
8−<programlisting>weechat.override {configure = {availablePlugins, ...}: {
9− plugins = with availablePlugins; [ python perl ];
10− }
11−}</programlisting>
12− If the <literal>configure</literal> function returns an attrset without the <literal>plugins</literal> attribute, <literal>availablePlugins</literal> will be used automatically.
13− </para>
14−
15− <para>
16− The plugins currently available are <literal>python</literal>, <literal>perl</literal>, <literal>ruby</literal>, <literal>guile</literal>, <literal>tcl</literal> and <literal>lua</literal>.
17− </para>
18−
19− <para>
20− The python and perl plugins allows the addition of extra libraries. For instance, the <literal>inotify.py</literal> script in weechat-scripts requires D-Bus or libnotify, and the <literal>fish.py</literal> script requires pycrypto. To use these scripts, use the plugin's <literal>withPackages</literal> attribute:
21−<programlisting>weechat.override { configure = {availablePlugins, ...}: {
22− plugins = with availablePlugins; [
23− (python.withPackages (ps: with ps; [ pycrypto python-dbus ]))
24− ];
25− };
26−}
27−</programlisting>
28− </para>
29−
30− <para>
31− In order to also keep all default plugins installed, it is possible to use the following method:
32−<programlisting>weechat.override { configure = { availablePlugins, ... }: {
33− plugins = builtins.attrValues (availablePlugins // {
34− python = availablePlugins.python.withPackages (ps: with ps; [ pycrypto python-dbus ]);
35− });
36−}; }
37−</programlisting>
38− </para>
39−
40− <para>
41− WeeChat allows to set defaults on startup using the <literal>--run-command</literal>. The <literal>configure</literal> method can be used to pass commands to the program:
42−<programlisting>weechat.override {
43− configure = { availablePlugins, ... }: {
44− init = ''
45− /set foo bar
46− /server add freenode chat.freenode.org
47− '';
48− };
49−}</programlisting>
50− Further values can be added to the list of commands when running <literal>weechat --run-command "your-commands"</literal>.
51− </para>
52−
53− <para>
54− Additionally it's possible to specify scripts to be loaded when starting <literal>weechat</literal>. These will be loaded before the commands from <literal>init</literal>:
55−<programlisting>weechat.override {
56− configure = { availablePlugins, ... }: {
57− scripts = with pkgs.weechatScripts; [
58− weechat-xmpp weechat-matrix-bridge wee-slack
59− ];
60− init = ''
61− /set plugins.var.python.jabber.key "val"
62− '':
63− };
64−}</programlisting>
65− </para>
66−
67− <para>
68− In <literal>nixpkgs</literal> there's a subpackage which contains derivations for WeeChat scripts. Such derivations expect a <literal>passthru.scripts</literal> attribute which contains a list of all scripts inside the store path. Furthermore all scripts have to live in <literal>$out/share</literal>. An exemplary derivation looks like this:
69−<programlisting>{ stdenv, fetchurl }:
70−
71−stdenv.mkDerivation {
72− name = "exemplary-weechat-script";
73− src = fetchurl {
74− url = "https://scripts.tld/your-scripts.tar.gz";
75− sha256 = "...";
76− };
77− passthru.scripts = [ "foo.py" "bar.lua" ];
78− installPhase = ''
79− mkdir $out/share
80− cp foo.py $out/share
81− cp bar.lua $out/share
82− '';
83−}</programlisting>
84− </para>
85−</section>
doc/builders/packages/xorg.section.mdnew file+34
@@ -0,0 +1,34 @@
1+# X.org {#sec-xorg}
2+
3+The Nix expressions for the X.org packages reside in `pkgs/servers/x11/xorg/default.nix`. This file is automatically generated from lists of tarballs in an X.org release. As such it should not be modified directly; rather, you should modify the lists, the generator script or the file `pkgs/servers/x11/xorg/overrides.nix`, in which you can override or add to the derivations produced by the generator.
4+
5+## Katamari Tarballs {#katamari-tarballs}
6+
7+X.org upstream releases used to include [katamari](https://en.wiktionary.org/wiki/%E3%81%8B%E3%81%9F%E3%81%BE%E3%82%8A) releases, which included a holistic recommended version for each tarball, up until 7.7. To create a list of tarballs in a katamari release:
8+
9+```ShellSession
10+export release="X11R7.7"
11+export url="mirror://xorg/$release/src/everything/"
12+cat $(PRINT_PATH=1 nix-prefetch-url $url | tail -n 1) \
13+ | perl -e 'while (<>) { if (/(href|HREF)="([^"]*.bz2)"/) { print "$ENV{'url'}$2\n"; }; }' \
14+ | sort > "tarballs-$release.list"
15+```
16+
17+## Individual Tarballs {#individual-tarballs}
18+
19+The upstream release process for [X11R7.8](https://x.org/wiki/Releases/7.8/) does not include a planned katamari. Instead, each component of X.org is released as its own tarball. We maintain `pkgs/servers/x11/xorg/tarballs.list` as a list of tarballs for each individual package. This list includes X.org core libraries and protocol descriptions, extra newer X11 interface libraries, like `xorg.libxcb`, and classic utilities which are largely unused but still available if needed, like `xorg.imake`.
20+
21+## Generating Nix Expressions {#generating-nix-expressions}
22+
23+The generator is invoked as follows:
24+
25+```ShellSession
26+cd pkgs/servers/x11/xorg
27+<tarballs.list perl ./generate-expr-from-tarballs.pl
28+```
29+
30+For each of the tarballs in the `.list` files, the script downloads it, unpacks it, and searches its `configure.ac` and `*.pc.in` files for dependencies. This information is used to generate `default.nix`. The generator caches downloaded tarballs between runs. Pay close attention to the `NOT FOUND: $NAME` messages at the end of the run, since they may indicate missing dependencies. (Some might be optional dependencies, however.)
31+
32+## Overriding the Generator {#overriding-the-generator}
33+
34+If the expression for a package requires derivation attributes that the generator cannot figure out automatically (say, `patches` or a `postInstall` hook), you should modify `pkgs/servers/x11/xorg/overrides.nix`.
doc/builders/packages/xorg.xmldeleted−34
@@ -1,34 +0,0 @@
1−<section xmlns="http://docbook.org/ns/docbook"
2− xmlns:xlink="http://www.w3.org/1999/xlink"
3− xml:id="sec-xorg">
4− <title>X.org</title>
5−
6− <para>
7− The Nix expressions for the X.org packages reside in <filename>pkgs/servers/x11/xorg/default.nix</filename>. This file is automatically generated from lists of tarballs in an X.org release. As such it should not be modified directly; rather, you should modify the lists, the generator script or the file <filename>pkgs/servers/x11/xorg/overrides.nix</filename>, in which you can override or add to the derivations produced by the generator.
8− </para>
9−
10− <para>
11− The generator is invoked as follows:
12−<screen>
13−<prompt>$ </prompt>cd pkgs/servers/x11/xorg
14−<prompt>$ </prompt>cat tarballs-7.5.list extra.list old.list \
15− | perl ./generate-expr-from-tarballs.pl
16−</screen>
17− For each of the tarballs in the <filename>.list</filename> files, the script downloads it, unpacks it, and searches its <filename>configure.ac</filename> and <filename>*.pc.in</filename> files for dependencies. This information is used to generate <filename>default.nix</filename>. The generator caches downloaded tarballs between runs. Pay close attention to the <literal>NOT FOUND: <replaceable>name</replaceable></literal> messages at the end of the run, since they may indicate missing dependencies. (Some might be optional dependencies, however.)
18− </para>
19−
20− <para>
21− A file like <filename>tarballs-7.5.list</filename> contains all tarballs in a X.org release. It can be generated like this:
22−<screen>
23−<prompt>$ </prompt>export i="mirror://xorg/X11R7.4/src/everything/"
24−<prompt>$ </prompt>cat $(PRINT_PATH=1 nix-prefetch-url $i | tail -n 1) \
25− | perl -e 'while (&lt;>) { if (/(href|HREF)="([^"]*.bz2)"/) { print "$ENV{'i'}$2\n"; }; }' \
26− | sort > tarballs-7.4.list
27−</screen>
28− <filename>extra.list</filename> contains libraries that aren’t part of X.org proper, but are closely related to it, such as <literal>libxcb</literal>. <filename>old.list</filename> contains some packages that were removed from X.org, but are still needed by some people or by other packages (such as <varname>imake</varname>).
29− </para>
30−
31− <para>
32− If the expression for a package requires derivation attributes that the generator cannot figure out automatically (say, <varname>patches</varname> or a <varname>postInstall</varname> hook), you should modify <filename>pkgs/servers/x11/xorg/overrides.nix</filename>.
33− </para>
34−</section>
doc/builders/special.xml+2−2
@@ -5,6 +5,6 @@
55 <para>
66 This chapter describes several special builders.
77 </para>
8− <xi:include href="special/fhs-environments.xml" />
9− <xi:include href="special/mkshell.xml" />
8+ <xi:include href="special/fhs-environments.section.xml" />
9+ <xi:include href="special/mkshell.section.xml" />
1010</chapter>
doc/builders/special/fhs-environments.section.mdnew file+49
@@ -0,0 +1,49 @@
1+# buildFHSUserEnv {#sec-fhs-environments}
2+
3+`buildFHSUserEnv` provides a way to build and run FHS-compatible lightweight sandboxes. It creates an isolated root with bound `/nix/store`, so its footprint in terms of disk space needed is quite small. This allows one to run software which is hard or unfeasible to patch for NixOS -- 3rd-party source trees with FHS assumptions, games distributed as tarballs, software with integrity checking and/or external self-updated binaries. It uses Linux namespaces feature to create temporary lightweight environments which are destroyed after all child processes exit, without root user rights requirement. Accepted arguments are:
4+
5+- `name`
6+ Environment name.
7+- `targetPkgs`
8+ Packages to be installed for the main host's architecture (i.e. x86_64 on x86_64 installations). Along with libraries binaries are also installed.
9+- `multiPkgs`
10+ Packages to be installed for all architectures supported by a host (i.e. i686 and x86_64 on x86_64 installations). Only libraries are installed by default.
11+- `extraBuildCommands`
12+ Additional commands to be executed for finalizing the directory structure.
13+- `extraBuildCommandsMulti`
14+ Like `extraBuildCommands`, but executed only on multilib architectures.
15+- `extraOutputsToInstall`
16+ Additional derivation outputs to be linked for both target and multi-architecture packages.
17+- `extraInstallCommands`
18+ Additional commands to be executed for finalizing the derivation with runner script.
19+- `runScript`
20+ A command that would be executed inside the sandbox and passed all the command line arguments. It defaults to `bash`.
21+- `profile`
22+ Optional script for `/etc/profile` within the sandbox.
23+
24+One can create a simple environment using a `shell.nix` like that:
25+
26+```nix
27+{ pkgs ? import <nixpkgs> {} }:
28+
29+(pkgs.buildFHSUserEnv {
30+ name = "simple-x11-env";
31+ targetPkgs = pkgs: (with pkgs;
32+ [ udev
33+ alsa-lib
34+ ]) ++ (with pkgs.xorg;
35+ [ libX11
36+ libXcursor
37+ libXrandr
38+ ]);
39+ multiPkgs = pkgs: (with pkgs;
40+ [ udev
41+ alsa-lib
42+ ]);
43+ runScript = "bash";
44+}).env
45+```
46+
47+Running `nix-shell` would then drop you into a shell with these libraries and binaries available. You can use this to run closed-source applications which expect FHS structure without hassles: simply change `runScript` to the application path, e.g. `./bin/start.sh` -- relative paths are supported.
48+
49+Additionally, the FHS builder links all relocated gsettings-schemas (the glib setup-hook moves them to `share/gsettings-schemas/${name}/glib-2.0/schemas`) to their standard FHS location. This means you don't need to wrap binaries with `wrapGAppsHook`.
doc/builders/special/fhs-environments.xmldeleted−122
@@ -1,122 +0,0 @@
1−<section xmlns="http://docbook.org/ns/docbook"
2− xmlns:xlink="http://www.w3.org/1999/xlink"
3− xmlns:xi="http://www.w3.org/2001/XInclude"
4− xml:id="sec-fhs-environments">
5− <title>buildFHSUserEnv</title>
6−
7− <para>
8− <function>buildFHSUserEnv</function> provides a way to build and run FHS-compatible lightweight sandboxes. It creates an isolated root with bound <filename>/nix/store</filename>, so its footprint in terms of disk space needed is quite small. This allows one to run software which is hard or unfeasible to patch for NixOS -- 3rd-party source trees with FHS assumptions, games distributed as tarballs, software with integrity checking and/or external self-updated binaries. It uses Linux namespaces feature to create temporary lightweight environments which are destroyed after all child processes exit, without root user rights requirement. Accepted arguments are:
9− </para>
10−
11− <variablelist>
12− <varlistentry>
13− <term>
14− <literal>name</literal>
15− </term>
16− <listitem>
17− <para>
18− Environment name.
19− </para>
20− </listitem>
21− </varlistentry>
22− <varlistentry>
23− <term>
24− <literal>targetPkgs</literal>
25− </term>
26− <listitem>
27− <para>
28− Packages to be installed for the main host's architecture (i.e. x86_64 on x86_64 installations). Along with libraries binaries are also installed.
29− </para>
30− </listitem>
31− </varlistentry>
32− <varlistentry>
33− <term>
34− <literal>multiPkgs</literal>
35− </term>
36− <listitem>
37− <para>
38− Packages to be installed for all architectures supported by a host (i.e. i686 and x86_64 on x86_64 installations). Only libraries are installed by default.
39− </para>
40− </listitem>
41− </varlistentry>
42− <varlistentry>
43− <term>
44− <literal>extraBuildCommands</literal>
45− </term>
46− <listitem>
47− <para>
48− Additional commands to be executed for finalizing the directory structure.
49− </para>
50− </listitem>
51− </varlistentry>
52− <varlistentry>
53− <term>
54− <literal>extraBuildCommandsMulti</literal>
55− </term>
56− <listitem>
57− <para>
58− Like <literal>extraBuildCommands</literal>, but executed only on multilib architectures.
59− </para>
60− </listitem>
61− </varlistentry>
62− <varlistentry>
63− <term>
64− <literal>extraOutputsToInstall</literal>
65− </term>
66− <listitem>
67− <para>
68− Additional derivation outputs to be linked for both target and multi-architecture packages.
69− </para>
70− </listitem>
71− </varlistentry>
72− <varlistentry>
73− <term>
74− <literal>extraInstallCommands</literal>
75− </term>
76− <listitem>
77− <para>
78− Additional commands to be executed for finalizing the derivation with runner script.
79− </para>
80− </listitem>
81− </varlistentry>
82− <varlistentry>
83− <term>
84− <literal>runScript</literal>
85− </term>
86− <listitem>
87− <para>
88− A command that would be executed inside the sandbox and passed all the command line arguments. It defaults to <literal>bash</literal>.
89− </para>
90− </listitem>
91− </varlistentry>
92− </variablelist>
93−
94− <para>
95− One can create a simple environment using a <literal>shell.nix</literal> like that:
96− </para>
97−
98−<programlisting><![CDATA[
99−{ pkgs ? import <nixpkgs> {} }:
100−
101−(pkgs.buildFHSUserEnv {
102− name = "simple-x11-env";
103− targetPkgs = pkgs: (with pkgs;
104− [ udev
105− alsaLib
106− ]) ++ (with pkgs.xorg;
107− [ libX11
108− libXcursor
109− libXrandr
110− ]);
111− multiPkgs = pkgs: (with pkgs;
112− [ udev
113− alsaLib
114− ]);
115− runScript = "bash";
116−}).env
117−]]></programlisting>
118−
119− <para>
120− Running <literal>nix-shell</literal> would then drop you into a shell with these libraries and binaries available. You can use this to run closed-source applications which expect FHS structure without hassles: simply change <literal>runScript</literal> to the application path, e.g. <filename>./bin/start.sh</filename> -- relative paths are supported.
121− </para>
122−</section>
doc/builders/special/mkshell.section.mdnew file+37
@@ -0,0 +1,37 @@
1+# pkgs.mkShell {#sec-pkgs-mkShell}
2+
3+`pkgs.mkShell` is a specialized `stdenv.mkDerivation` that removes some
4+repetition when using it with `nix-shell` (or `nix develop`).
5+
6+## Usage {#sec-pkgs-mkShell-usage}
7+
8+Here is a common usage example:
9+
10+```nix
11+{ pkgs ? import <nixpkgs> {} }:
12+pkgs.mkShell {
13+ packages = [ pkgs.gnumake ];
14+
15+ inputsFrom = [ pkgs.hello pkgs.gnutar ];
16+
17+ shellHook = ''
18+ export DEBUG=1
19+ '';
20+}
21+```
22+
23+## Attributes
24+
25+* `name` (default: `nix-shell`). Set the name of the derivation.
26+* `packages` (default: `[]`). Add executable packages to the `nix-shell` environment.
27+* `inputsFrom` (default: `[]`). Add build dependencies of the listed derivations to the `nix-shell` environment.
28+* `shellHook` (default: `""`). Bash statements that are executed by `nix-shell`.
29+
30+... all the attributes of `stdenv.mkDerivation`.
31+
32+## Building the shell
33+
34+This derivation output will contain a text file that contains a reference to
35+all the build inputs. This is useful in CI where we want to make sure that
36+every derivation, and its dependencies, build properly. Or when creating a GC
37+root so that the build dependencies don't get garbage-collected.
doc/builders/special/mkshell.xmldeleted−24
@@ -1,24 +0,0 @@
1−<section xmlns="http://docbook.org/ns/docbook"
2− xmlns:xlink="http://www.w3.org/1999/xlink"
3− xmlns:xi="http://www.w3.org/2001/XInclude"
4− xml:id="sec-pkgs-mkShell">
5− <title>pkgs.mkShell</title>
6−
7− <para>
8− <function>pkgs.mkShell</function> is a special kind of derivation that is only useful when using it combined with <command>nix-shell</command>. It will in fact fail to instantiate when invoked with <command>nix-build</command>.
9− </para>
10−
11− <section xml:id="sec-pkgs-mkShell-usage">
12− <title>Usage</title>
13−
14−<programlisting><![CDATA[
15−{ pkgs ? import <nixpkgs> {} }:
16−pkgs.mkShell {
17− # this will make all the build inputs from hello and gnutar
18− # available to the shell environment
19− inputsFrom = with pkgs; [ hello gnutar ];
20− buildInputs = [ pkgs.gnumake ];
21−}
22−]]></programlisting>
23− </section>
24−</section>
doc/builders/testers.chapter.mdnew file+82
@@ -0,0 +1,82 @@
1+# Testers {#chap-testers}
2+This chapter describes several testing builders which are available in the <literal>testers</literal> namespace.
3+
4+## `testVersion` {#tester-testVersion}
5+
6+Checks the command output contains the specified version
7+
8+Although simplistic, this test assures that the main program
9+can run. While there's no substitute for a real test case,
10+it does catch dynamic linking errors and such. It also provides
11+some protection against accidentally building the wrong version,
12+for example when using an 'old' hash in a fixed-output derivation.
13+
14+Examples:
15+
16+```nix
17+passthru.tests.version = testVersion { package = hello; };
18+
19+passthru.tests.version = testVersion {
20+ package = seaweedfs;
21+ command = "weed version";
22+};
23+
24+passthru.tests.version = testVersion {
25+ package = key;
26+ command = "KeY --help";
27+ # Wrong '2.5' version in the code. Drop on next version.
28+ version = "2.5";
29+};
30+```
31+
32+## `testEqualDerivation` {#tester-testEqualDerivation}
33+
34+Checks that two packages produce the exact same build instructions.
35+
36+This can be used to make sure that a certain difference of configuration,
37+such as the presence of an overlay does not cause a cache miss.
38+
39+When the derivations are equal, the return value is an empty file.
40+Otherwise, the build log explains the difference via `nix-diff`.
41+
42+Example:
43+
44+```nix
45+testEqualDerivation
46+ "The hello package must stay the same when enabling checks."
47+ hello
48+ (hello.overrideAttrs(o: { doCheck = true; }))
49+```
50+
51+## `invalidateFetcherByDrvHash` {#tester-invalidateFetcherByDrvHash}
52+
53+Use the derivation hash to invalidate the output via name, for testing.
54+
55+Type: `(a@{ name, ... } -> Derivation) -> a -> Derivation`
56+
57+Normally, fixed output derivations can and should be cached by their output
58+hash only, but for testing we want to re-fetch everytime the fetcher changes.
59+
60+Changes to the fetcher become apparent in the drvPath, which is a hash of
61+how to fetch, rather than a fixed store path.
62+By inserting this hash into the name, we can make sure to re-run the fetcher
63+every time the fetcher changes.
64+
65+This relies on the assumption that Nix isn't clever enough to reuse its
66+database of local store contents to optimize fetching.
67+
68+You might notice that the "salted" name derives from the normal invocation,
69+not the final derivation. `invalidateFetcherByDrvHash` has to invoke the fetcher
70+function twice: once to get a derivation hash, and again to produce the final
71+fixed output derivation.
72+
73+Example:
74+
75+```nix
76+tests.fetchgit = invalidateFetcherByDrvHash fetchgit {
77+ name = "nix-source";
78+ url = "https://github.com/NixOS/nix";
79+ rev = "9d9dbe6ed05854e03811c361a3380e09183f4f4a";
80+ sha256 = "sha256-7DszvbCNTjpzGRmpIVAWXk20P0/XTrWZ79KSOGLrUWY=";
81+};
82+```
doc/builders/trivial-builders.chapter.mdnew file+223
@@ -0,0 +1,223 @@
1+# Trivial builders {#chap-trivial-builders}
2+
3+Nixpkgs provides a couple of functions that help with building derivations. The most important one, `stdenv.mkDerivation`, has already been documented above. The following functions wrap `stdenv.mkDerivation`, making it easier to use in certain cases.
4+
5+## `runCommand` {#trivial-builder-runCommand}
6+
7+This takes three arguments, `name`, `env`, and `buildCommand`. `name` is just the name that Nix will append to the store path in the same way that `stdenv.mkDerivation` uses its `name` attribute. `env` is an attribute set specifying environment variables that will be set for this derivation. These attributes are then passed to the wrapped `stdenv.mkDerivation`. `buildCommand` specifies the commands that will be run to create this derivation. Note that you will need to create `$out` for Nix to register the command as successful.
8+
9+An example of using `runCommand` is provided below.
10+
11+```nix
12+(import <nixpkgs> {}).runCommand "my-example" {} ''
13+ echo My example command is running
14+
15+ mkdir $out
16+
17+ echo I can write data to the Nix store > $out/message
18+
19+ echo I can also run basic commands like:
20+
21+ echo ls
22+ ls
23+
24+ echo whoami
25+ whoami
26+
27+ echo date
28+ date
29+''
30+```
31+
32+## `runCommandCC` {#trivial-builder-runCommandCC}
33+
34+This works just like `runCommand`. The only difference is that it also provides a C compiler in `buildCommand`'s environment. To minimize your dependencies, you should only use this if you are sure you will need a C compiler as part of running your command.
35+
36+## `runCommandLocal` {#trivial-builder-runCommandLocal}
37+
38+Variant of `runCommand` that forces the derivation to be built locally, it is not substituted. This is intended for very cheap commands (<1s execution time). It saves on the network round-trip and can speed up a build.
39+
40+::: {.note}
41+This sets [`allowSubstitutes` to `false`](https://nixos.org/nix/manual/#adv-attr-allowSubstitutes), so only use `runCommandLocal` if you are certain the user will always have a builder for the `system` of the derivation. This should be true for most trivial use cases (e.g., just copying some files to a different location or adding symlinks) because there the `system` is usually the same as `builtins.currentSystem`.
42+:::
43+
44+## `writeTextFile`, `writeText`, `writeTextDir`, `writeScript`, `writeScriptBin` {#trivial-builder-writeText}
45+
46+These functions write `text` to the Nix store. This is useful for creating scripts from Nix expressions. `writeTextFile` takes an attribute set and expects two arguments, `name` and `text`. `name` corresponds to the name used in the Nix store path. `text` will be the contents of the file. You can also set `executable` to true to make this file have the executable bit set.
47+
48+Many more commands wrap `writeTextFile` including `writeText`, `writeTextDir`, `writeScript`, and `writeScriptBin`. These are convenience functions over `writeTextFile`.
49+
50+Here are a few examples:
51+```nix
52+# Writes my-file to /nix/store/<store path>
53+writeTextFile {
54+ name = "my-file";
55+ text = ''
56+ Contents of File
57+ '';
58+}
59+# See also the `writeText` helper function below.
60+
61+# Writes executable my-file to /nix/store/<store path>/bin/my-file
62+writeTextFile {
63+ name = "my-file";
64+ text = ''
65+ Contents of File
66+ '';
67+ executable = true;
68+ destination = "/bin/my-file";
69+}
70+# Writes contents of file to /nix/store/<store path>
71+writeText "my-file"
72+ ''
73+ Contents of File
74+ '';
75+# Writes contents of file to /nix/store/<store path>/share/my-file
76+writeTextDir "share/my-file"
77+ ''
78+ Contents of File
79+ '';
80+# Writes my-file to /nix/store/<store path> and makes executable
81+writeScript "my-file"
82+ ''
83+ Contents of File
84+ '';
85+# Writes my-file to /nix/store/<store path>/bin/my-file and makes executable.
86+writeScriptBin "my-file"
87+ ''
88+ Contents of File
89+ '';
90+# Writes my-file to /nix/store/<store path> and makes executable.
91+writeShellScript "my-file"
92+ ''
93+ Contents of File
94+ '';
95+# Writes my-file to /nix/store/<store path>/bin/my-file and makes executable.
96+writeShellScriptBin "my-file"
97+ ''
98+ Contents of File
99+ '';
100+
101+```
102+
103+## `concatTextFile`, `concatText`, `concatScript` {#trivial-builder-concatText}
104+
105+These functions concatenate `files` to the Nix store in a single file. This is useful for configuration files structured in lines of text. `concatTextFile` takes an attribute set and expects two arguments, `name` and `files`. `name` corresponds to the name used in the Nix store path. `files` will be the files to be concatenated. You can also set `executable` to true to make this file have the executable bit set.
106+`concatText` and`concatScript` are simple wrappers over `concatTextFile`.
107+
108+Here are a few examples:
109+```nix
110+
111+# Writes my-file to /nix/store/<store path>
112+concatTextFile {
113+ name = "my-file";
114+ files = [ drv1 "${drv2}/path/to/file" ];
115+}
116+# See also the `concatText` helper function below.
117+
118+# Writes executable my-file to /nix/store/<store path>/bin/my-file
119+concatTextFile {
120+ name = "my-file";
121+ files = [ drv1 "${drv2}/path/to/file" ];
122+ executable = true;
123+ destination = "/bin/my-file";
124+}
125+# Writes contents of files to /nix/store/<store path>
126+concatText "my-file" [ file1 file2 ]
127+
128+# Writes contents of files to /nix/store/<store path>
129+concatScript "my-file" [ file1 file2 ]
130+```
131+
132+## `writeShellApplication` {#trivial-builder-writeShellApplication}
133+
134+This can be used to easily produce a shell script that has some dependencies (`runtimeInputs`). It automatically sets the `PATH` of the script to contain all of the listed inputs, sets some sanity shellopts (`errexit`, `nounset`, `pipefail`), and checks the resulting script with [`shellcheck`](https://github.com/koalaman/shellcheck).
135+
136+For example, look at the following code:
137+
138+```nix
139+writeShellApplication {
140+ name = "show-nixos-org";
141+
142+ runtimeInputs = [ curl w3m ];
143+
144+ text = ''
145+ curl -s 'https://nixos.org' | w3m -dump -T text/html
146+ '';
147+}
148+```
149+
150+Unlike with normal `writeShellScriptBin`, there is no need to manually write out `${curl}/bin/curl`, setting the PATH
151+was handled by `writeShellApplication`. Moreover, the script is being checked with `shellcheck` for more strict
152+validation.
153+
154+## `symlinkJoin` {#trivial-builder-symlinkJoin}
155+
156+This can be used to put many derivations into the same directory structure. It works by creating a new derivation and adding symlinks to each of the paths listed. It expects two arguments, `name`, and `paths`. `name` is the name used in the Nix store path for the created derivation. `paths` is a list of paths that will be symlinked. These paths can be to Nix store derivations or any other subdirectory contained within.
157+Here is an example:
158+```nix
159+# adds symlinks of hello and stack to current build and prints "links added"
160+symlinkJoin { name = "myexample"; paths = [ pkgs.hello pkgs.stack ]; postBuild = "echo links added"; }
161+```
162+This creates a derivation with a directory structure like the following:
163+```
164+/nix/store/sglsr5g079a5235hy29da3mq3hv8sjmm-myexample
165+|-- bin
166+| |-- hello -> /nix/store/qy93dp4a3rqyn2mz63fbxjg228hffwyw-hello-2.10/bin/hello
167+| `-- stack -> /nix/store/6lzdpxshx78281vy056lbk553ijsdr44-stack-2.1.3.1/bin/stack
168+`-- share
169+ |-- bash-completion
170+ | `-- completions
171+ | `-- stack -> /nix/store/6lzdpxshx78281vy056lbk553ijsdr44-stack-2.1.3.1/share/bash-completion/completions/stack
172+ |-- fish
173+ | `-- vendor_completions.d
174+ | `-- stack.fish -> /nix/store/6lzdpxshx78281vy056lbk553ijsdr44-stack-2.1.3.1/share/fish/vendor_completions.d/stack.fish
175+...
176+```
177+
178+## `writeReferencesToFile` {#trivial-builder-writeReferencesToFile}
179+
180+Writes the closure of transitive dependencies to a file.
181+
182+This produces the equivalent of `nix-store -q --requisites`.
183+
184+For example,
185+
186+```nix
187+writeReferencesToFile (writeScriptBin "hi" ''${hello}/bin/hello'')
188+```
189+
190+produces an output path `/nix/store/<hash>-runtime-deps` containing
191+
192+```nix
193+/nix/store/<hash>-hello-2.10
194+/nix/store/<hash>-hi
195+/nix/store/<hash>-libidn2-2.3.0
196+/nix/store/<hash>-libunistring-0.9.10
197+/nix/store/<hash>-glibc-2.32-40
198+```
199+
200+You can see that this includes `hi`, the original input path,
201+`hello`, which is a direct reference, but also
202+the other paths that are indirectly required to run `hello`.
203+
204+## `writeDirectReferencesToFile` {#trivial-builder-writeDirectReferencesToFile}
205+
206+Writes the set of references to the output file, that is, their immediate dependencies.
207+
208+This produces the equivalent of `nix-store -q --references`.
209+
210+For example,
211+
212+```nix
213+writeDirectReferencesToFile (writeScriptBin "hi" ''${hello}/bin/hello'')
214+```
215+
216+produces an output path `/nix/store/<hash>-runtime-references` containing
217+
218+```nix
219+/nix/store/<hash>-hello-2.10
220+```
221+
222+but none of `hello`'s dependencies because those are not referenced directly
223+by `hi`'s output.
doc/builders/trivial-builders.xmldeleted−90
@@ -1,90 +0,0 @@
1−<chapter xmlns="http://docbook.org/ns/docbook"
2− xmlns:xlink="http://www.w3.org/1999/xlink"
3− xmlns:xi="http://www.w3.org/2001/XInclude"
4− xml:id="chap-trivial-builders">
5− <title>Trivial builders</title>
6− <para>
7− Nixpkgs provides a couple of functions that help with building derivations. The most important one, <function>stdenv.mkDerivation</function>, has already been documented above. The following functions wrap <function>stdenv.mkDerivation</function>, making it easier to use in certain cases.
8− </para>
9− <variablelist>
10− <varlistentry xml:id="trivial-builder-runCommand">
11− <term>
12− <literal>runCommand</literal>
13− </term>
14− <listitem>
15− <para>
16− This takes three arguments, <literal>name</literal>, <literal>env</literal>, and <literal>buildCommand</literal>. <literal>name</literal> is just the name that Nix will append to the store path in the same way that <literal>stdenv.mkDerivation</literal> uses its <literal>name</literal> attribute. <literal>env</literal> is an attribute set specifying environment variables that will be set for this derivation. These attributes are then passed to the wrapped <literal>stdenv.mkDerivation</literal>. <literal>buildCommand</literal> specifies the commands that will be run to create this derivation. Note that you will need to create <literal>$out</literal> for Nix to register the command as successful.
17− </para>
18− <para>
19− An example of using <literal>runCommand</literal> is provided below.
20− </para>
21−<programlisting>
22−(import &lt;nixpkgs&gt; {}).runCommand "my-example" {} ''
23− echo My example command is running
24−
25− mkdir $out
26−
27− echo I can write data to the Nix store > $out/message
28−
29− echo I can also run basic commands like:
30−
31− echo ls
32− ls
33−
34− echo whoami
35− whoami
36−
37− echo date
38− date
39−''
40−</programlisting>
41− </listitem>
42− </varlistentry>
43− <varlistentry xml:id="trivial-builder-runCommandCC">
44− <term>
45− <literal>runCommandCC</literal>
46− </term>
47− <listitem>
48− <para>
49− This works just like <literal>runCommand</literal>. The only difference is that it also provides a C compiler in <literal>buildCommand</literal>’s environment. To minimize your dependencies, you should only use this if you are sure you will need a C compiler as part of running your command.
50− </para>
51− </listitem>
52− </varlistentry>
53− <varlistentry xml:id="trivial-builder-runCommandLocal">
54− <term>
55− <literal>runCommandLocal</literal>
56− </term>
57− <listitem>
58− <para>
59− Variant of <literal>runCommand</literal> that forces the derivation to be built locally, it is not substituted. This is intended for very cheap commands (&lt;1s execution time). It saves on the network roundrip and can speed up a build.
60− </para>
61− <note><para>
62− This sets <link xlink:href="https://nixos.org/nix/manual/#adv-attr-allowSubstitutes"><literal>allowSubstitutes</literal> to <literal>false</literal></link>, so only use <literal>runCommandLocal</literal> if you are certain the user will always have a builder for the <literal>system</literal> of the derivation. This should be true for most trivial use cases (e.g. just copying some files to a different location or adding symlinks), because there the <literal>system</literal> is usually the same as <literal>builtins.currentSystem</literal>.
63− </para></note>
64− </listitem>
65− </varlistentry>
66− <varlistentry xml:id="trivial-builder-writeText">
67− <term>
68− <literal>writeTextFile</literal>, <literal>writeText</literal>, <literal>writeTextDir</literal>, <literal>writeScript</literal>, <literal>writeScriptBin</literal>
69− </term>
70− <listitem>
71− <para>
72− These functions write <literal>text</literal> to the Nix store. This is useful for creating scripts from Nix expressions. <literal>writeTextFile</literal> takes an attribute set and expects two arguments, <literal>name</literal> and <literal>text</literal>. <literal>name</literal> corresponds to the name used in the Nix store path. <literal>text</literal> will be the contents of the file. You can also set <literal>executable</literal> to true to make this file have the executable bit set.
73− </para>
74− <para>
75− Many more commands wrap <literal>writeTextFile</literal> including <literal>writeText</literal>, <literal>writeTextDir</literal>, <literal>writeScript</literal>, and <literal>writeScriptBin</literal>. These are convenience functions over <literal>writeTextFile</literal>.
76− </para>
77− </listitem>
78− </varlistentry>
79− <varlistentry xml:id="trivial-builder-symlinkJoin">
80− <term>
81− <literal>symlinkJoin</literal>
82− </term>
83− <listitem>
84− <para>
85− This can be used to put many derivations into the same directory structure. It works by creating a new derivation and adding symlinks to each of the paths listed. It expects two arguments, <literal>name</literal>, and <literal>paths</literal>. <literal>name</literal> is the name used in the Nix store path for the created derivation. <literal>paths</literal> is a list of paths that will be symlinked. These paths can be to Nix store derivations or any other subdirectory contained within.
86− </para>
87− </listitem>
88− </varlistentry>
89− </variablelist>
90−</chapter>
doc/contributing/coding-conventions.chapter.mdnew file+665
@@ -0,0 +1,665 @@
1+# Coding conventions {#chap-conventions}
2+
3+## Syntax {#sec-syntax}
4+
5+- Use 2 spaces of indentation per indentation level in Nix expressions, 4 spaces in shell scripts.
6+
7+- Do not use tab characters, i.e. configure your editor to use soft tabs. For instance, use `(setq-default indent-tabs-mode nil)` in Emacs. Everybody has different tab settings so it’s asking for trouble.
8+
9+- Use `lowerCamelCase` for variable names, not `UpperCamelCase`. Note, this rule does not apply to package attribute names, which instead follow the rules in [](#sec-package-naming).
10+
11+- Function calls with attribute set arguments are written as
12+
13+ ```nix
14+ foo {
15+ arg = ...;
16+ }
17+ ```
18+
19+ not
20+
21+ ```nix
22+ foo
23+ {
24+ arg = ...;
25+ }
26+ ```
27+
28+ Also fine is
29+
30+ ```nix
31+ foo { arg = ...; }
32+ ```
33+
34+ if it's a short call.
35+
36+- In attribute sets or lists that span multiple lines, the attribute names or list elements should be aligned:
37+
38+ ```nix
39+ # A long list.
40+ list = [
41+ elem1
42+ elem2
43+ elem3
44+ ];
45+
46+ # A long attribute set.
47+ attrs = {
48+ attr1 = short_expr;
49+ attr2 =
50+ if true then big_expr else big_expr;
51+ };
52+
53+ # Combined
54+ listOfAttrs = [
55+ {
56+ attr1 = 3;
57+ attr2 = "fff";
58+ }
59+ {
60+ attr1 = 5;
61+ attr2 = "ggg";
62+ }
63+ ];
64+ ```
65+
66+- Short lists or attribute sets can be written on one line:
67+
68+ ```nix
69+ # A short list.
70+ list = [ elem1 elem2 elem3 ];
71+
72+ # A short set.
73+ attrs = { x = 1280; y = 1024; };
74+ ```
75+
76+- Breaking in the middle of a function argument can give hard-to-read code, like
77+
78+ ```nix
79+ someFunction { x = 1280;
80+ y = 1024; } otherArg
81+ yetAnotherArg
82+ ```
83+
84+ (especially if the argument is very large, spanning multiple lines).
85+
86+ Better:
87+
88+ ```nix
89+ someFunction
90+ { x = 1280; y = 1024; }
91+ otherArg
92+ yetAnotherArg
93+ ```
94+
95+ or
96+
97+ ```nix
98+ let res = { x = 1280; y = 1024; };
99+ in someFunction res otherArg yetAnotherArg
100+ ```
101+
102+- The bodies of functions, asserts, and withs are not indented to prevent a lot of superfluous indentation levels, i.e.
103+
104+ ```nix
105+ { arg1, arg2 }:
106+ assert system == "i686-linux";
107+ stdenv.mkDerivation { ...
108+ ```
109+
110+ not
111+
112+ ```nix
113+ { arg1, arg2 }:
114+ assert system == "i686-linux";
115+ stdenv.mkDerivation { ...
116+ ```
117+
118+- Function formal arguments are written as:
119+
120+ ```nix
121+ { arg1, arg2, arg3 }:
122+ ```
123+
124+ but if they don't fit on one line they're written as:
125+
126+ ```nix
127+ { arg1, arg2, arg3
128+ , arg4, ...
129+ , # Some comment...
130+ argN
131+ }:
132+ ```
133+
134+- Functions should list their expected arguments as precisely as possible. That is, write
135+
136+ ```nix
137+ { stdenv, fetchurl, perl }: ...
138+ ```
139+
140+ instead of
141+
142+ ```nix
143+ args: with args; ...
144+ ```
145+
146+ or
147+
148+ ```nix
149+ { stdenv, fetchurl, perl, ... }: ...
150+ ```
151+
152+ For functions that are truly generic in the number of arguments (such as wrappers around `mkDerivation`) that have some required arguments, you should write them using an `@`-pattern:
153+
154+ ```nix
155+ { stdenv, doCoverageAnalysis ? false, ... } @ args:
156+
157+ stdenv.mkDerivation (args // {
158+ ... if doCoverageAnalysis then "bla" else "" ...
159+ })
160+ ```
161+
162+ instead of
163+
164+ ```nix
165+ args:
166+
167+ args.stdenv.mkDerivation (args // {
168+ ... if args ? doCoverageAnalysis && args.doCoverageAnalysis then "bla" else "" ...
169+ })
170+ ```
171+
172+- Unnecessary string conversions should be avoided. Do
173+
174+ ```nix
175+ rev = version;
176+ ```
177+
178+ instead of
179+
180+ ```nix
181+ rev = "${version}";
182+ ```
183+
184+- Building lists conditionally _should_ be done with `lib.optional(s)` instead of using `if cond then [ ... ] else null` or `if cond then [ ... ] else [ ]`.
185+
186+ ```nix
187+ buildInputs = lib.optional stdenv.isDarwin iconv;
188+ ```
189+
190+ instead of
191+
192+ ```nix
193+ buildInputs = if stdenv.isDarwin then [ iconv ] else null;
194+ ```
195+
196+ As an exception, an explicit conditional expression with null can be used when fixing a important bug without triggering a mass rebuild.
197+ If this is done a follow up pull request _should_ be created to change the code to `lib.optional(s)`.
198+
199+- Arguments should be listed in the order they are used, with the exception of `lib`, which always goes first.
200+
201+## Package naming {#sec-package-naming}
202+
203+The key words _must_, _must not_, _required_, _shall_, _shall not_, _should_, _should not_, _recommended_, _may_, and _optional_ in this section are to be interpreted as described in [RFC 2119](https://tools.ietf.org/html/rfc2119). Only _emphasized_ words are to be interpreted in this way.
204+
205+In Nixpkgs, there are generally three different names associated with a package:
206+
207+- The `name` attribute of the derivation (excluding the version part). This is what most users see, in particular when using `nix-env`.
208+
209+- The variable name used for the instantiated package in `all-packages.nix`, and when passing it as a dependency to other functions. Typically this is called the _package attribute name_. This is what Nix expression authors see. It can also be used when installing using `nix-env -iA`.
210+
211+- The filename for (the directory containing) the Nix expression.
212+
213+Most of the time, these are the same. For instance, the package `e2fsprogs` has a `name` attribute `"e2fsprogs-version"`, is bound to the variable name `e2fsprogs` in `all-packages.nix`, and the Nix expression is in `pkgs/os-specific/linux/e2fsprogs/default.nix`.
214+
215+There are a few naming guidelines:
216+
217+- The `pname` attribute _should_ be identical to the upstream package name.
218+
219+- The `pname` and the `version` attribute _must not_ contain uppercase letters — e.g., `"mplayer" instead of `"MPlayer"`.
220+
221+- The `version` attribute _must_ start with a digit e.g`"0.3.1rc2".
222+
223+- If a package is not a release but a commit from a repository, then the `version` attribute _must_ be the date of that (fetched) commit. The date _must_ be in `"unstable-YYYY-MM-DD"` format.
224+
225+- Dashes in the package `pname` _should_ be preserved in new variable names, rather than converted to underscores or camel cased — e.g., `http-parser` instead of `http_parser` or `httpParser`. The hyphenated style is preferred in all three package names.
226+
227+- If there are multiple versions of a package, this _should_ be reflected in the variable names in `all-packages.nix`, e.g. `json-c_0_9` and `json-c_0_11`. If there is an obvious “default” version, make an attribute like `json-c = json-c_0_9;`. See also [](#sec-versioning)
228+
229+## File naming and organisation {#sec-organisation}
230+
231+Names of files and directories should be in lowercase, with dashes between words — not in camel case. For instance, it should be `all-packages.nix`, not `allPackages.nix` or `AllPackages.nix`.
232+
233+### Hierarchy {#sec-hierarchy}
234+
235+Each package should be stored in its own directory somewhere in the `pkgs/` tree, i.e. in `pkgs/category/subcategory/.../pkgname`. Below are some rules for picking the right category for a package. Many packages fall under several categories; what matters is the _primary_ purpose of a package. For example, the `libxml2` package builds both a library and some tools; but it’s a library foremost, so it goes under `pkgs/development/libraries`.
236+
237+When in doubt, consider refactoring the `pkgs/` tree, e.g. creating new categories or splitting up an existing category.
238+
239+**If it’s used to support _software development_:**
240+
241+- **If it’s a _library_ used by other packages:**
242+
243+ - `development/libraries` (e.g. `libxml2`)
244+
245+- **If it’s a _compiler_:**
246+
247+ - `development/compilers` (e.g. `gcc`)
248+
249+- **If it’s an _interpreter_:**
250+
251+ - `development/interpreters` (e.g. `guile`)
252+
253+- **If it’s a (set of) development _tool(s)_:**
254+
255+ - **If it’s a _parser generator_ (including lexers):**
256+
257+ - `development/tools/parsing` (e.g. `bison`, `flex`)
258+
259+ - **If it’s a _build manager_:**
260+
261+ - `development/tools/build-managers` (e.g. `gnumake`)
262+
263+ - **Else:**
264+
265+ - `development/tools/misc` (e.g. `binutils`)
266+
267+- **Else:**
268+
269+ - `development/misc`
270+
271+**If it’s a (set of) _tool(s)_:**
272+
273+(A tool is a relatively small program, especially one intended to be used non-interactively.)
274+
275+- **If it’s for _networking_:**
276+
277+ - `tools/networking` (e.g. `wget`)
278+
279+- **If it’s for _text processing_:**
280+
281+ - `tools/text` (e.g. `diffutils`)
282+
283+- **If it’s a _system utility_, i.e., something related or essential to the operation of a system:**
284+
285+ - `tools/system` (e.g. `cron`)
286+
287+- **If it’s an _archiver_ (which may include a compression function):**
288+
289+ - `tools/archivers` (e.g. `zip`, `tar`)
290+
291+- **If it’s a _compression_ program:**
292+
293+ - `tools/compression` (e.g. `gzip`, `bzip2`)
294+
295+- **If it’s a _security_-related program:**
296+
297+ - `tools/security` (e.g. `nmap`, `gnupg`)
298+
299+- **Else:**
300+
301+ - `tools/misc`
302+
303+**If it’s a _shell_:**
304+
305+- `shells` (e.g. `bash`)
306+
307+**If it’s a _server_:**
308+
309+- **If it’s a web server:**
310+
311+ - `servers/http` (e.g. `apache-httpd`)
312+
313+- **If it’s an implementation of the X Windowing System:**
314+
315+ - `servers/x11` (e.g. `xorg` — this includes the client libraries and programs)
316+
317+- **Else:**
318+
319+ - `servers/misc`
320+
321+**If it’s a _desktop environment_:**
322+
323+- `desktops` (e.g. `kde`, `gnome`, `enlightenment`)
324+
325+**If it’s a _window manager_:**
326+
327+- `applications/window-managers` (e.g. `awesome`, `stumpwm`)
328+
329+**If it’s an _application_:**
330+
331+A (typically large) program with a distinct user interface, primarily used interactively.
332+
333+- **If it’s a _version management system_:**
334+
335+ - `applications/version-management` (e.g. `subversion`)
336+
337+- **If it’s a _terminal emulator_:**
338+
339+ - `applications/terminal-emulators` (e.g. `alacritty` or `rxvt` or `termite`)
340+
341+- **If it’s for _video playback / editing_:**
342+
343+ - `applications/video` (e.g. `vlc`)
344+
345+- **If it’s for _graphics viewing / editing_:**
346+
347+ - `applications/graphics` (e.g. `gimp`)
348+
349+- **If it’s for _networking_:**
350+
351+ - **If it’s a _mailreader_:**
352+
353+ - `applications/networking/mailreaders` (e.g. `thunderbird`)
354+
355+ - **If it’s a _newsreader_:**
356+
357+ - `applications/networking/newsreaders` (e.g. `pan`)
358+
359+ - **If it’s a _web browser_:**
360+
361+ - `applications/networking/browsers` (e.g. `firefox`)
362+
363+ - **Else:**
364+
365+ - `applications/networking/misc`
366+
367+- **Else:**
368+
369+ - `applications/misc`
370+
371+**If it’s _data_ (i.e., does not have a straight-forward executable semantics):**
372+
373+- **If it’s a _font_:**
374+
375+ - `data/fonts`
376+
377+- **If it’s an _icon theme_:**
378+
379+ - `data/icons`
380+
381+- **If it’s related to _SGML/XML processing_:**
382+
383+ - **If it’s an _XML DTD_:**
384+
385+ - `data/sgml+xml/schemas/xml-dtd` (e.g. `docbook`)
386+
387+ - **If it’s an _XSLT stylesheet_:**
388+
389+ (Okay, these are executable...)
390+
391+ - `data/sgml+xml/stylesheets/xslt` (e.g. `docbook-xsl`)
392+
393+- **If it’s a _theme_ for a _desktop environment_, a _window manager_ or a _display manager_:**
394+
395+ - `data/themes`
396+
397+**If it’s a _game_:**
398+
399+- `games`
400+
401+**Else:**
402+
403+- `misc`
404+
405+### Versioning {#sec-versioning}
406+
407+Because every version of a package in Nixpkgs creates a potential maintenance burden, old versions of a package should not be kept unless there is a good reason to do so. For instance, Nixpkgs contains several versions of GCC because other packages don’t build with the latest version of GCC. Other examples are having both the latest stable and latest pre-release version of a package, or to keep several major releases of an application that differ significantly in functionality.
408+
409+If there is only one version of a package, its Nix expression should be named `e2fsprogs/default.nix`. If there are multiple versions, this should be reflected in the filename, e.g. `e2fsprogs/1.41.8.nix` and `e2fsprogs/1.41.9.nix`. The version in the filename should leave out unnecessary detail. For instance, if we keep the latest Firefox 2.0.x and 3.5.x versions in Nixpkgs, they should be named `firefox/2.0.nix` and `firefox/3.5.nix`, respectively (which, at a given point, might contain versions `2.0.0.20` and `3.5.4`). If a version requires many auxiliary files, you can use a subdirectory for each version, e.g. `firefox/2.0/default.nix` and `firefox/3.5/default.nix`.
410+
411+All versions of a package _must_ be included in `all-packages.nix` to make sure that they evaluate correctly.
412+
413+## Fetching Sources {#sec-sources}
414+
415+There are multiple ways to fetch a package source in nixpkgs. The general guideline is that you should package reproducible sources with a high degree of availability. Right now there is only one fetcher which has mirroring support and that is `fetchurl`. Note that you should also prefer protocols which have a corresponding proxy environment variable.
416+
417+You can find many source fetch helpers in `pkgs/build-support/fetch*`.
418+
419+In the file `pkgs/top-level/all-packages.nix` you can find fetch helpers, these have names on the form `fetchFrom*`. The intention of these are to provide snapshot fetches but using the same api as some of the version controlled fetchers from `pkgs/build-support/`. As an example going from bad to good:
420+
421+- Bad: Uses `git://` which won't be proxied.
422+
423+ ```nix
424+ src = fetchgit {
425+ url = "git://github.com/NixOS/nix.git";
426+ rev = "1f795f9f44607cc5bec70d1300150bfefcef2aae";
427+ sha256 = "1cw5fszffl5pkpa6s6wjnkiv6lm5k618s32sp60kvmvpy7a2v9kg";
428+ }
429+ ```
430+
431+- Better: This is ok, but an archive fetch will still be faster.
432+
433+ ```nix
434+ src = fetchgit {
435+ url = "https://github.com/NixOS/nix.git";
436+ rev = "1f795f9f44607cc5bec70d1300150bfefcef2aae";
437+ sha256 = "1cw5fszffl5pkpa6s6wjnkiv6lm5k618s32sp60kvmvpy7a2v9kg";
438+ }
439+ ```
440+
441+- Best: Fetches a snapshot archive and you get the rev you want.
442+
443+ ```nix
444+ src = fetchFromGitHub {
445+ owner = "NixOS";
446+ repo = "nix";
447+ rev = "1f795f9f44607cc5bec70d1300150bfefcef2aae";
448+ sha256 = "1i2yxndxb6yc9l6c99pypbd92lfq5aac4klq7y2v93c9qvx2cgpc";
449+ }
450+ ```
451+
452+ Find the value to put as `sha256` by running `nix run -f '<nixpkgs>' nix-prefetch-github -c nix-prefetch-github --rev 1f795f9f44607cc5bec70d1300150bfefcef2aae NixOS nix` or `nix-prefetch-url --unpack https://github.com/NixOS/nix/archive/1f795f9f44607cc5bec70d1300150bfefcef2aae.tar.gz`.
453+
454+## Obtaining source hash {#sec-source-hashes}
455+
456+Preferred source hash type is sha256. There are several ways to get it.
457+
458+1. Prefetch URL (with `nix-prefetch-XXX URL`, where `XXX` is one of `url`, `git`, `hg`, `cvs`, `bzr`, `svn`). Hash is printed to stdout.
459+
460+2. Prefetch by package source (with `nix-prefetch-url '<nixpkgs>' -A PACKAGE.src`, where `PACKAGE` is package attribute name). Hash is printed to stdout.
461+
462+ This works well when you've upgraded existing package version and want to find out new hash, but is useless if package can't be accessed by attribute or package has multiple sources (`.srcs`, architecture-dependent sources, etc).
463+
464+3. Upstream provided hash: use it when upstream provides `sha256` or `sha512` (when upstream provides `md5`, don't use it, compute `sha256` instead).
465+
466+ A little nuance is that `nix-prefetch-*` tools produce hash encoded with `base32`, but upstream usually provides hexadecimal (`base16`) encoding. Fetchers understand both formats. Nixpkgs does not standardize on any one format.
467+
468+ You can convert between formats with nix-hash, for example:
469+
470+ ```ShellSession
471+ $ nix-hash --type sha256 --to-base32 HASH
472+ ```
473+
474+4. Extracting hash from local source tarball can be done with `sha256sum`. Use `nix-prefetch-url file:///path/to/tarball` if you want base32 hash.
475+
476+5. Fake hash: set fake hash in package expression, perform build and extract correct hash from error Nix prints.
477+
478+ For package updates it is enough to change one symbol to make hash fake. For new packages, you can use `lib.fakeSha256`, `lib.fakeSha512` or any other fake hash.
479+
480+ This is last resort method when reconstructing source URL is non-trivial and `nix-prefetch-url -A` isn’t applicable (for example, [one of `kodi` dependencies](https://github.com/NixOS/nixpkgs/blob/d2ab091dd308b99e4912b805a5eb088dd536adb9/pkgs/applications/video/kodi/default.nix#L73)). The easiest way then would be replace hash with a fake one and rebuild. Nix build will fail and error message will contain desired hash.
481+
482+::: {.warning}
483+This method has security problems. Check below for details.
484+:::
485+
486+### Obtaining hashes securely {#sec-source-hashes-security}
487+
488+Let's say Man-in-the-Middle (MITM) sits close to your network. Then instead of fetching source you can fetch malware, and instead of source hash you get hash of malware. Here are security considerations for this scenario:
489+
490+- `http://` URLs are not secure to prefetch hash from;
491+
492+- hashes from upstream (in method 3) should be obtained via secure protocol;
493+
494+- `https://` URLs are secure in methods 1, 2, 3;
495+
496+- `https://` URLs are not secure in method 5. When obtaining hashes with fake hash method, TLS checks are disabled. So refetch source hash from several different networks to exclude MITM scenario. Alternatively, use fake hash method to make Nix error, but instead of extracting hash from error, extract `https://` URL and prefetch it with method 1.
497+
498+## Patches {#sec-patches}
499+
500+Patches available online should be retrieved using `fetchpatch`.
501+
502+```nix
503+patches = [
504+ (fetchpatch {
505+ name = "fix-check-for-using-shared-freetype-lib.patch";
506+ url = "http://git.ghostscript.com/?p=ghostpdl.git;a=patch;h=8f5d285";
507+ sha256 = "1f0k043rng7f0rfl9hhb89qzvvksqmkrikmm38p61yfx51l325xr";
508+ })
509+];
510+```
511+
512+Otherwise, you can add a `.patch` file to the `nixpkgs` repository. In the interest of keeping our maintenance burden to a minimum, only patches that are unique to `nixpkgs` should be added in this way.
513+
514+```nix
515+patches = [ ./0001-changes.patch ];
516+```
517+
518+If you do need to do create this sort of patch file, one way to do so is with git:
519+
520+1. Move to the root directory of the source code you're patching.
521+
522+ ```ShellSession
523+ $ cd the/program/source
524+ ```
525+
526+2. If a git repository is not already present, create one and stage all of the source files.
527+
528+ ```ShellSession
529+ $ git init
530+ $ git add .
531+ ```
532+
533+3. Edit some files to make whatever changes need to be included in the patch.
534+
535+4. Use git to create a diff, and pipe the output to a patch file:
536+
537+ ```ShellSession
538+ $ git diff -a > nixpkgs/pkgs/the/package/0001-changes.patch
539+ ```
540+
541+If a patch is available online but does not cleanly apply, it can be modified in some fixed ways by using additional optional arguments for `fetchpatch`:
542+
543+- `relative`: Similar to using `git-diff`'s `--relative` flag, only keep changes inside the specified directory, making paths relative to it.
544+- `stripLen`: Remove the first `stripLen` components of pathnames in the patch.
545+- `extraPrefix`: Prefix pathnames by this string.
546+- `excludes`: Exclude files matching these patterns (applies after the above arguments).
547+- `includes`: Include only files matching these patterns (applies after the above arguments).
548+- `revert`: Revert the patch.
549+
550+Note that because the checksum is computed after applying these effects, using or modifying these arguments will have no effect unless the `sha256` argument is changed as well.
551+
552+## Package tests {#sec-package-tests}
553+
554+Tests are important to ensure quality and make reviews and automatic updates easy.
555+
556+The following types of tests exists:
557+
558+* [NixOS **module tests**](https://nixos.org/manual/nixos/stable/#sec-nixos-tests), which spawn one or more NixOS VMs. They exercise both NixOS modules and the packaged programs used within them. For example, a NixOS module test can start a web server VM running the `nginx` module, and a client VM running `curl` or a graphical `firefox`, and test that they can talk to each other and display the correct content.
559+* Nix **package tests** are a lightweight alternative to NixOS module tests. They should be used to create simple integration tests for packages, but cannot test NixOS services, and some programs with graphical user interfaces may also be difficult to test with them.
560+* The **`checkPhase` of a package**, which should execute the unit tests that are included in the source code of a package.
561+
562+Here in the nixpkgs manual we describe mostly _package tests_; for _module tests_ head over to the corresponding [section in the NixOS manual](https://nixos.org/manual/nixos/stable/#sec-nixos-tests).
563+
564+### Writing inline package tests {#ssec-inline-package-tests-writing}
565+
566+For very simple tests, they can be written inline:
567+
568+```nix
569+{ …, yq-go }:
570+
571+buildGoModule rec {
572+ …
573+
574+ passthru.tests = {
575+ simple = runCommand "${pname}-test" {} ''
576+ echo "test: 1" | ${yq-go}/bin/yq eval -j > $out
577+ [ "$(cat $out | tr -d $'\n ')" = '{"test":1}' ]
578+ '';
579+ };
580+}
581+```
582+
583+### Writing larger package tests {#ssec-package-tests-writing}
584+
585+This is an example using the `phoronix-test-suite` package with the current best practices.
586+
587+Add the tests in `passthru.tests` to the package definition like this:
588+
589+```nix
590+{ stdenv, lib, fetchurl, callPackage }:
591+
592+stdenv.mkDerivation {
593+ …
594+
595+ passthru.tests = {
596+ simple-execution = callPackage ./tests.nix { };
597+ };
598+
599+ meta = { … };
600+}
601+```
602+
603+Create `tests.nix` in the package directory:
604+
605+```nix
606+{ runCommand, phoronix-test-suite }:
607+
608+let
609+ inherit (phoronix-test-suite) pname version;
610+in
611+
612+runCommand "${pname}-tests" { meta.timeout = 60; }
613+ ''
614+ # automatic initial setup to prevent interactive questions
615+ ${phoronix-test-suite}/bin/phoronix-test-suite enterprise-setup >/dev/null
616+ # get version of installed program and compare with package version
617+ if [[ `${phoronix-test-suite}/bin/phoronix-test-suite version` != *"${version}"* ]]; then
618+ echo "Error: program version does not match package version"
619+ exit 1
620+ fi
621+ # run dummy command
622+ ${phoronix-test-suite}/bin/phoronix-test-suite dummy_module.dummy-command >/dev/null
623+ # needed for Nix to register the command as successful
624+ touch $out
625+ ''
626+```
627+
628+### Running package tests {#ssec-package-tests-running}
629+
630+You can run these tests with:
631+
632+```ShellSession
633+$ cd path/to/nixpkgs
634+$ nix-build -A phoronix-test-suite.tests
635+```
636+
637+### Examples of package tests {#ssec-package-tests-examples}
638+
639+Here are examples of package tests:
640+
641+- [Jasmin compile test](https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/compilers/jasmin/test-assemble-hello-world/default.nix)
642+- [Lobster compile test](https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/compilers/lobster/test-can-run-hello-world.nix)
643+- [Spacy annotation test](https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/python-modules/spacy/annotation-test/default.nix)
644+- [Libtorch test](https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/libraries/science/math/libtorch/test/default.nix)
645+- [Multiple tests for nanopb](https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/libraries/nanopb/default.nix)
646+
647+### Linking NixOS module tests to a package {#ssec-nixos-tests-linking}
648+
649+Like [package tests](#ssec-package-tests-writing) as shown above, [NixOS module tests](https://nixos.org/manual/nixos/stable/#sec-nixos-tests) can also be linked to a package, so that the tests can be easily run when changing the related package.
650+
651+For example, assuming we're packaging `nginx`, we can link its module test via `passthru.tests`:
652+
653+```nix
654+{ stdenv, lib, nixosTests }:
655+
656+stdenv.mkDerivation {
657+ ...
658+
659+ passthru.tests = {
660+ nginx = nixosTests.nginx;
661+ };
662+
663+ ...
664+}
665+```
doc/contributing/coding-conventions.xmldeleted−934
@@ -1,934 +0,0 @@
1−<chapter xmlns="http://docbook.org/ns/docbook"
2− xmlns:xlink="http://www.w3.org/1999/xlink"
3− xml:id="chap-conventions">
4− <title>Coding conventions</title>
5− <section xml:id="sec-syntax">
6− <title>Syntax</title>
7−
8− <itemizedlist>
9− <listitem>
10− <para>
11− Use 2 spaces of indentation per indentation level in Nix expressions, 4 spaces in shell scripts.
12− </para>
13− </listitem>
14− <listitem>
15− <para>
16− Do not use tab characters, i.e. configure your editor to use soft tabs. For instance, use <literal>(setq-default indent-tabs-mode nil)</literal> in Emacs. Everybody has different tab settings so it’s asking for trouble.
17− </para>
18− </listitem>
19− <listitem>
20− <para>
21− Use <literal>lowerCamelCase</literal> for variable names, not <literal>UpperCamelCase</literal>. Note, this rule does not apply to package attribute names, which instead follow the rules in <xref linkend="sec-package-naming"/>.
22− </para>
23− </listitem>
24− <listitem>
25− <para>
26− Function calls with attribute set arguments are written as
27−<programlisting>
28−foo {
29− arg = ...;
30−}
31−</programlisting>
32− not
33−<programlisting>
34−foo
35−{
36− arg = ...;
37−}
38−</programlisting>
39− Also fine is
40−<programlisting>
41−foo { arg = ...; }
42−</programlisting>
43− if it's a short call.
44− </para>
45− </listitem>
46− <listitem>
47− <para>
48− In attribute sets or lists that span multiple lines, the attribute names or list elements should be aligned:
49−<programlisting>
50−# A long list.
51−list = [
52− elem1
53− elem2
54− elem3
55−];
56−
57−# A long attribute set.
58−attrs = {
59− attr1 = short_expr;
60− attr2 =
61− if true then big_expr else big_expr;
62−};
63−
64−# Combined
65−listOfAttrs = [
66− {
67− attr1 = 3;
68− attr2 = "fff";
69− }
70− {
71− attr1 = 5;
72− attr2 = "ggg";
73− }
74−];
75−</programlisting>
76− </para>
77− </listitem>
78− <listitem>
79− <para>
80− Short lists or attribute sets can be written on one line:
81−<programlisting>
82−# A short list.
83−list = [ elem1 elem2 elem3 ];
84−
85−# A short set.
86−attrs = { x = 1280; y = 1024; };
87−</programlisting>
88− </para>
89− </listitem>
90− <listitem>
91− <para>
92− Breaking in the middle of a function argument can give hard-to-read code, like
93−<programlisting>
94−someFunction { x = 1280;
95− y = 1024; } otherArg
96− yetAnotherArg
97−</programlisting>
98− (especially if the argument is very large, spanning multiple lines).
99− </para>
100− <para>
101− Better:
102−<programlisting>
103−someFunction
104− { x = 1280; y = 1024; }
105− otherArg
106− yetAnotherArg
107−</programlisting>
108− or
109−<programlisting>
110−let res = { x = 1280; y = 1024; };
111−in someFunction res otherArg yetAnotherArg
112−</programlisting>
113− </para>
114− </listitem>
115− <listitem>
116− <para>
117− The bodies of functions, asserts, and withs are not indented to prevent a lot of superfluous indentation levels, i.e.
118−<programlisting>
119−{ arg1, arg2 }:
120−assert system == "i686-linux";
121−stdenv.mkDerivation { ...
122−</programlisting>
123− not
124−<programlisting>
125−{ arg1, arg2 }:
126− assert system == "i686-linux";
127− stdenv.mkDerivation { ...
128−</programlisting>
129− </para>
130− </listitem>
131− <listitem>
132− <para>
133− Function formal arguments are written as:
134−<programlisting>
135−{ arg1, arg2, arg3 }:
136−</programlisting>
137− but if they don't fit on one line they're written as:
138−<programlisting>
139−{ arg1, arg2, arg3
140−, arg4, ...
141−, # Some comment...
142− argN
143−}:
144−</programlisting>
145− </para>
146− </listitem>
147− <listitem>
148− <para>
149− Functions should list their expected arguments as precisely as possible. That is, write
150−<programlisting>
151−{ stdenv, fetchurl, perl }: <replaceable>...</replaceable>
152−</programlisting>
153− instead of
154−<programlisting>
155−args: with args; <replaceable>...</replaceable>
156−</programlisting>
157− or
158−<programlisting>
159−{ stdenv, fetchurl, perl, ... }: <replaceable>...</replaceable>
160−</programlisting>
161− </para>
162− <para>
163− For functions that are truly generic in the number of arguments (such as wrappers around <varname>mkDerivation</varname>) that have some required arguments, you should write them using an <literal>@</literal>-pattern:
164−<programlisting>
165−{ stdenv, doCoverageAnalysis ? false, ... } @ args:
166−
167−stdenv.mkDerivation (args // {
168− <replaceable>...</replaceable> if doCoverageAnalysis then "bla" else "" <replaceable>...</replaceable>
169−})
170−</programlisting>
171− instead of
172−<programlisting>
173−args:
174−
175−args.stdenv.mkDerivation (args // {
176− <replaceable>...</replaceable> if args ? doCoverageAnalysis &amp;&amp; args.doCoverageAnalysis then "bla" else "" <replaceable>...</replaceable>
177−})
178−</programlisting>
179− </para>
180− </listitem>
181− </itemizedlist>
182− </section>
183− <section xml:id="sec-package-naming">
184− <title>Package naming</title>
185−
186− <para>
187− The key words <emphasis>must</emphasis>, <emphasis>must not</emphasis>, <emphasis>required</emphasis>, <emphasis>shall</emphasis>, <emphasis>shall not</emphasis>, <emphasis>should</emphasis>, <emphasis>should not</emphasis>, <emphasis>recommended</emphasis>, <emphasis>may</emphasis>, and <emphasis>optional</emphasis> in this section are to be interpreted as described in <link xlink:href="https://tools.ietf.org/html/rfc2119">RFC 2119</link>. Only <emphasis>emphasized</emphasis> words are to be interpreted in this way.
188− </para>
189−
190− <para>
191− In Nixpkgs, there are generally three different names associated with a package:
192− <itemizedlist>
193− <listitem>
194− <para>
195− The <varname>name</varname> attribute of the derivation (excluding the version part). This is what most users see, in particular when using <command>nix-env</command>.
196− </para>
197− </listitem>
198− <listitem>
199− <para>
200− The variable name used for the instantiated package in <filename>all-packages.nix</filename>, and when passing it as a dependency to other functions. Typically this is called the <emphasis>package attribute name</emphasis>. This is what Nix expression authors see. It can also be used when installing using <command>nix-env -iA</command>.
201− </para>
202− </listitem>
203− <listitem>
204− <para>
205− The filename for (the directory containing) the Nix expression.
206− </para>
207− </listitem>
208− </itemizedlist>
209− Most of the time, these are the same. For instance, the package <literal>e2fsprogs</literal> has a <varname>name</varname> attribute <literal>"e2fsprogs-<replaceable>version</replaceable>"</literal>, is bound to the variable name <varname>e2fsprogs</varname> in <filename>all-packages.nix</filename>, and the Nix expression is in <filename>pkgs/os-specific/linux/e2fsprogs/default.nix</filename>.
210− </para>
211−
212− <para>
213− There are a few naming guidelines:
214− <itemizedlist>
215− <listitem>
216− <para>
217− The <literal>name</literal> attribute <emphasis>should</emphasis> be identical to the upstream package name.
218− </para>
219− </listitem>
220− <listitem>
221− <para>
222− The <literal>name</literal> attribute <emphasis>must not</emphasis> contain uppercase letters — e.g., <literal>"mplayer-1.0rc2"</literal> instead of <literal>"MPlayer-1.0rc2"</literal>.
223− </para>
224− </listitem>
225− <listitem>
226− <para>
227− The version part of the <literal>name</literal> attribute <emphasis>must</emphasis> start with a digit (following a dash) — e.g., <literal>"hello-0.3.1rc2"</literal>.
228− </para>
229− </listitem>
230− <listitem>
231− <para>
232− If a package is not a release but a commit from a repository, then the version part of the name <emphasis>must</emphasis> be the date of that (fetched) commit. The date <emphasis>must</emphasis> be in <literal>"YYYY-MM-DD"</literal> format. Also append <literal>"unstable"</literal> to the name - e.g., <literal>"pkgname-unstable-2014-09-23"</literal>.
233− </para>
234− </listitem>
235− <listitem>
236− <para>
237− Dashes in the package name <emphasis>should</emphasis> be preserved in new variable names, rather than converted to underscores or camel cased — e.g., <varname>http-parser</varname> instead of <varname>http_parser</varname> or <varname>httpParser</varname>. The hyphenated style is preferred in all three package names.
238− </para>
239− </listitem>
240− <listitem>
241− <para>
242− If there are multiple versions of a package, this <emphasis>should</emphasis> be reflected in the variable names in <filename>all-packages.nix</filename>, e.g. <varname>json-c-0-9</varname> and <varname>json-c-0-11</varname>. If there is an obvious “default” version, make an attribute like <literal>json-c = json-c-0-9;</literal>. See also <xref linkend="sec-versioning" />
243− </para>
244− </listitem>
245− </itemizedlist>
246− </para>
247− </section>
248− <section xml:id="sec-organisation">
249− <title>File naming and organisation</title>
250−
251− <para>
252− Names of files and directories should be in lowercase, with dashes between words — not in camel case. For instance, it should be <filename>all-packages.nix</filename>, not <filename>allPackages.nix</filename> or <filename>AllPackages.nix</filename>.
253− </para>
254−
255− <section xml:id="sec-hierarchy">
256− <title>Hierarchy</title>
257−
258− <para>
259− Each package should be stored in its own directory somewhere in the <filename>pkgs/</filename> tree, i.e. in <filename>pkgs/<replaceable>category</replaceable>/<replaceable>subcategory</replaceable>/<replaceable>...</replaceable>/<replaceable>pkgname</replaceable></filename>. Below are some rules for picking the right category for a package. Many packages fall under several categories; what matters is the <emphasis>primary</emphasis> purpose of a package. For example, the <literal>libxml2</literal> package builds both a library and some tools; but it’s a library foremost, so it goes under <filename>pkgs/development/libraries</filename>.
260− </para>
261−
262− <para>
263− When in doubt, consider refactoring the <filename>pkgs/</filename> tree, e.g. creating new categories or splitting up an existing category.
264− </para>
265−
266− <variablelist>
267− <varlistentry>
268− <term>
269− If it’s used to support <emphasis>software development</emphasis>:
270− </term>
271− <listitem>
272− <variablelist>
273− <varlistentry>
274− <term>
275− If it’s a <emphasis>library</emphasis> used by other packages:
276− </term>
277− <listitem>
278− <para>
279− <filename>development/libraries</filename> (e.g. <filename>libxml2</filename>)
280− </para>
281− </listitem>
282− </varlistentry>
283− <varlistentry>
284− <term>
285− If it’s a <emphasis>compiler</emphasis>:
286− </term>
287− <listitem>
288− <para>
289− <filename>development/compilers</filename> (e.g. <filename>gcc</filename>)
290− </para>
291− </listitem>
292− </varlistentry>
293− <varlistentry>
294− <term>
295− If it’s an <emphasis>interpreter</emphasis>:
296− </term>
297− <listitem>
298− <para>
299− <filename>development/interpreters</filename> (e.g. <filename>guile</filename>)
300− </para>
301− </listitem>
302− </varlistentry>
303− <varlistentry>
304− <term>
305− If it’s a (set of) development <emphasis>tool(s)</emphasis>:
306− </term>
307− <listitem>
308− <variablelist>
309− <varlistentry>
310− <term>
311− If it’s a <emphasis>parser generator</emphasis> (including lexers):
312− </term>
313− <listitem>
314− <para>
315− <filename>development/tools/parsing</filename> (e.g. <filename>bison</filename>, <filename>flex</filename>)
316− </para>
317− </listitem>
318− </varlistentry>
319− <varlistentry>
320− <term>
321− If it’s a <emphasis>build manager</emphasis>:
322− </term>
323− <listitem>
324− <para>
325− <filename>development/tools/build-managers</filename> (e.g. <filename>gnumake</filename>)
326− </para>
327− </listitem>
328− </varlistentry>
329− <varlistentry>
330− <term>
331− Else:
332− </term>
333− <listitem>
334− <para>
335− <filename>development/tools/misc</filename> (e.g. <filename>binutils</filename>)
336− </para>
337− </listitem>
338− </varlistentry>
339− </variablelist>
340− </listitem>
341− </varlistentry>
342− <varlistentry>
343− <term>
344− Else:
345− </term>
346− <listitem>
347− <para>
348− <filename>development/misc</filename>
349− </para>
350− </listitem>
351− </varlistentry>
352− </variablelist>
353− </listitem>
354− </varlistentry>
355− <varlistentry>
356− <term>
357− If it’s a (set of) <emphasis>tool(s)</emphasis>:
358− </term>
359− <listitem>
360− <para>
361− (A tool is a relatively small program, especially one intended to be used non-interactively.)
362− </para>
363− <variablelist>
364− <varlistentry>
365− <term>
366− If it’s for <emphasis>networking</emphasis>:
367− </term>
368− <listitem>
369− <para>
370− <filename>tools/networking</filename> (e.g. <filename>wget</filename>)
371− </para>
372− </listitem>
373− </varlistentry>
374− <varlistentry>
375− <term>
376− If it’s for <emphasis>text processing</emphasis>:
377− </term>
378− <listitem>
379− <para>
380− <filename>tools/text</filename> (e.g. <filename>diffutils</filename>)
381− </para>
382− </listitem>
383− </varlistentry>
384− <varlistentry>
385− <term>
386− If it’s a <emphasis>system utility</emphasis>, i.e., something related or essential to the operation of a system:
387− </term>
388− <listitem>
389− <para>
390− <filename>tools/system</filename> (e.g. <filename>cron</filename>)
391− </para>
392− </listitem>
393− </varlistentry>
394− <varlistentry>
395− <term>
396− If it’s an <emphasis>archiver</emphasis> (which may include a compression function):
397− </term>
398− <listitem>
399− <para>
400− <filename>tools/archivers</filename> (e.g. <filename>zip</filename>, <filename>tar</filename>)
401− </para>
402− </listitem>
403− </varlistentry>
404− <varlistentry>
405− <term>
406− If it’s a <emphasis>compression</emphasis> program:
407− </term>
408− <listitem>
409− <para>
410− <filename>tools/compression</filename> (e.g. <filename>gzip</filename>, <filename>bzip2</filename>)
411− </para>
412− </listitem>
413− </varlistentry>
414− <varlistentry>
415− <term>
416− If it’s a <emphasis>security</emphasis>-related program:
417− </term>
418− <listitem>
419− <para>
420− <filename>tools/security</filename> (e.g. <filename>nmap</filename>, <filename>gnupg</filename>)
421− </para>
422− </listitem>
423− </varlistentry>
424− <varlistentry>
425− <term>
426− Else:
427− </term>
428− <listitem>
429− <para>
430− <filename>tools/misc</filename>
431− </para>
432− </listitem>
433− </varlistentry>
434− </variablelist>
435− </listitem>
436− </varlistentry>
437− <varlistentry>
438− <term>
439− If it’s a <emphasis>shell</emphasis>:
440− </term>
441− <listitem>
442− <para>
443− <filename>shells</filename> (e.g. <filename>bash</filename>)
444− </para>
445− </listitem>
446− </varlistentry>
447− <varlistentry>
448− <term>
449− If it’s a <emphasis>server</emphasis>:
450− </term>
451− <listitem>
452− <variablelist>
453− <varlistentry>
454− <term>
455− If it’s a web server:
456− </term>
457− <listitem>
458− <para>
459− <filename>servers/http</filename> (e.g. <filename>apache-httpd</filename>)
460− </para>
461− </listitem>
462− </varlistentry>
463− <varlistentry>
464− <term>
465− If it’s an implementation of the X Windowing System:
466− </term>
467− <listitem>
468− <para>
469− <filename>servers/x11</filename> (e.g. <filename>xorg</filename> — this includes the client libraries and programs)
470− </para>
471− </listitem>
472− </varlistentry>
473− <varlistentry>
474− <term>
475− Else:
476− </term>
477− <listitem>
478− <para>
479− <filename>servers/misc</filename>
480− </para>
481− </listitem>
482− </varlistentry>
483− </variablelist>
484− </listitem>
485− </varlistentry>
486− <varlistentry>
487− <term>
488− If it’s a <emphasis>desktop environment</emphasis>:
489− </term>
490− <listitem>
491− <para>
492− <filename>desktops</filename> (e.g. <filename>kde</filename>, <filename>gnome</filename>, <filename>enlightenment</filename>)
493− </para>
494− </listitem>
495− </varlistentry>
496− <varlistentry>
497− <term>
498− If it’s a <emphasis>window manager</emphasis>:
499− </term>
500− <listitem>
501− <para>
502− <filename>applications/window-managers</filename> (e.g. <filename>awesome</filename>, <filename>stumpwm</filename>)
503− </para>
504− </listitem>
505− </varlistentry>
506− <varlistentry>
507− <term>
508− If it’s an <emphasis>application</emphasis>:
509− </term>
510− <listitem>
511− <para>
512− A (typically large) program with a distinct user interface, primarily used interactively.
513− </para>
514− <variablelist>
515− <varlistentry>
516− <term>
517− If it’s a <emphasis>version management system</emphasis>:
518− </term>
519− <listitem>
520− <para>
521− <filename>applications/version-management</filename> (e.g. <filename>subversion</filename>)
522− </para>
523− </listitem>
524− </varlistentry>
525− <varlistentry>
526− <term>
527− If it’s a <emphasis>terminal emulator</emphasis>:
528− </term>
529− <listitem>
530− <para>
531− <filename>applications/terminal-emulators</filename> (e.g. <filename>alacritty</filename> or <filename>rxvt</filename> or <filename>termite</filename>)
532− </para>
533− </listitem>
534− </varlistentry>
535− <varlistentry>
536− <term>
537− If it’s for <emphasis>video playback / editing</emphasis>:
538− </term>
539− <listitem>
540− <para>
541− <filename>applications/video</filename> (e.g. <filename>vlc</filename>)
542− </para>
543− </listitem>
544− </varlistentry>
545− <varlistentry>
546− <term>
547− If it’s for <emphasis>graphics viewing / editing</emphasis>:
548− </term>
549− <listitem>
550− <para>
551− <filename>applications/graphics</filename> (e.g. <filename>gimp</filename>)
552− </para>
553− </listitem>
554− </varlistentry>
555− <varlistentry>
556− <term>
557− If it’s for <emphasis>networking</emphasis>:
558− </term>
559− <listitem>
560− <variablelist>
561− <varlistentry>
562− <term>
563− If it’s a <emphasis>mailreader</emphasis>:
564− </term>
565− <listitem>
566− <para>
567− <filename>applications/networking/mailreaders</filename> (e.g. <filename>thunderbird</filename>)
568− </para>
569− </listitem>
570− </varlistentry>
571− <varlistentry>
572− <term>
573− If it’s a <emphasis>newsreader</emphasis>:
574− </term>
575− <listitem>
576− <para>
577− <filename>applications/networking/newsreaders</filename> (e.g. <filename>pan</filename>)
578− </para>
579− </listitem>
580− </varlistentry>
581− <varlistentry>
582− <term>
583− If it’s a <emphasis>web browser</emphasis>:
584− </term>
585− <listitem>
586− <para>
587− <filename>applications/networking/browsers</filename> (e.g. <filename>firefox</filename>)
588− </para>
589− </listitem>
590− </varlistentry>
591− <varlistentry>
592− <term>
593− Else:
594− </term>
595− <listitem>
596− <para>
597− <filename>applications/networking/misc</filename>
598− </para>
599− </listitem>
600− </varlistentry>
601− </variablelist>
602− </listitem>
603− </varlistentry>
604− <varlistentry>
605− <term>
606− Else:
607− </term>
608− <listitem>
609− <para>
610− <filename>applications/misc</filename>
611− </para>
612− </listitem>
613− </varlistentry>
614− </variablelist>
615− </listitem>
616− </varlistentry>
617− <varlistentry>
618− <term>
619− If it’s <emphasis>data</emphasis> (i.e., does not have a straight-forward executable semantics):
620− </term>
621− <listitem>
622− <variablelist>
623− <varlistentry>
624− <term>
625− If it’s a <emphasis>font</emphasis>:
626− </term>
627− <listitem>
628− <para>
629− <filename>data/fonts</filename>
630− </para>
631− </listitem>
632− </varlistentry>
633− <varlistentry>
634− <term>
635− If it’s an <emphasis>icon theme</emphasis>:
636− </term>
637− <listitem>
638− <para>
639− <filename>data/icons</filename>
640− </para>
641− </listitem>
642− </varlistentry>
643− <varlistentry>
644− <term>
645− If it’s related to <emphasis>SGML/XML processing</emphasis>:
646− </term>
647− <listitem>
648− <variablelist>
649− <varlistentry>
650− <term>
651− If it’s an <emphasis>XML DTD</emphasis>:
652− </term>
653− <listitem>
654− <para>
655− <filename>data/sgml+xml/schemas/xml-dtd</filename> (e.g. <filename>docbook</filename>)
656− </para>
657− </listitem>
658− </varlistentry>
659− <varlistentry>
660− <term>
661− If it’s an <emphasis>XSLT stylesheet</emphasis>:
662− </term>
663− <listitem>
664− <para>
665− (Okay, these are executable...)
666− </para>
667− <para>
668− <filename>data/sgml+xml/stylesheets/xslt</filename> (e.g. <filename>docbook-xsl</filename>)
669− </para>
670− </listitem>
671− </varlistentry>
672− </variablelist>
673− </listitem>
674− </varlistentry>
675− <varlistentry>
676− <term>
677− If it’s a <emphasis>theme</emphasis> for a <emphasis>desktop environment</emphasis>,
678− a <emphasis>window manager</emphasis> or a <emphasis>display manager</emphasis>:
679− </term>
680− <listitem>
681− <para>
682− <filename>data/themes</filename>
683− </para>
684− </listitem>
685− </varlistentry>
686− </variablelist>
687− </listitem>
688− </varlistentry>
689− <varlistentry>
690− <term>
691− If it’s a <emphasis>game</emphasis>:
692− </term>
693− <listitem>
694− <para>
695− <filename>games</filename>
696− </para>
697− </listitem>
698− </varlistentry>
699− <varlistentry>
700− <term>
701− Else:
702− </term>
703− <listitem>
704− <para>
705− <filename>misc</filename>
706− </para>
707− </listitem>
708− </varlistentry>
709− </variablelist>
710− </section>
711−
712− <section xml:id="sec-versioning">
713− <title>Versioning</title>
714−
715− <para>
716− Because every version of a package in Nixpkgs creates a potential maintenance burden, old versions of a package should not be kept unless there is a good reason to do so. For instance, Nixpkgs contains several versions of GCC because other packages don’t build with the latest version of GCC. Other examples are having both the latest stable and latest pre-release version of a package, or to keep several major releases of an application that differ significantly in functionality.
717− </para>
718−
719− <para>
720− If there is only one version of a package, its Nix expression should be named <filename>e2fsprogs/default.nix</filename>. If there are multiple versions, this should be reflected in the filename, e.g. <filename>e2fsprogs/1.41.8.nix</filename> and <filename>e2fsprogs/1.41.9.nix</filename>. The version in the filename should leave out unnecessary detail. For instance, if we keep the latest Firefox 2.0.x and 3.5.x versions in Nixpkgs, they should be named <filename>firefox/2.0.nix</filename> and <filename>firefox/3.5.nix</filename>, respectively (which, at a given point, might contain versions <literal>2.0.0.20</literal> and <literal>3.5.4</literal>). If a version requires many auxiliary files, you can use a subdirectory for each version, e.g. <filename>firefox/2.0/default.nix</filename> and <filename>firefox/3.5/default.nix</filename>.
721− </para>
722−
723− <para>
724− All versions of a package <emphasis>must</emphasis> be included in <filename>all-packages.nix</filename> to make sure that they evaluate correctly.
725− </para>
726− </section>
727− </section>
728− <section xml:id="sec-sources">
729− <title>Fetching Sources</title>
730−
731− <para>
732− There are multiple ways to fetch a package source in nixpkgs. The general guideline is that you should package reproducible sources with a high degree of availability. Right now there is only one fetcher which has mirroring support and that is <literal>fetchurl</literal>. Note that you should also prefer protocols which have a corresponding proxy environment variable.
733− </para>
734−
735− <para>
736− You can find many source fetch helpers in <literal>pkgs/build-support/fetch*</literal>.
737− </para>
738−
739− <para>
740− In the file <literal>pkgs/top-level/all-packages.nix</literal> you can find fetch helpers, these have names on the form <literal>fetchFrom*</literal>. The intention of these are to provide snapshot fetches but using the same api as some of the version controlled fetchers from <literal>pkgs/build-support/</literal>. As an example going from bad to good:
741− <itemizedlist>
742− <listitem>
743− <para>
744− Bad: Uses <literal>git://</literal> which won't be proxied.
745−<programlisting>
746−src = fetchgit {
747− url = "git://github.com/NixOS/nix.git";
748− rev = "1f795f9f44607cc5bec70d1300150bfefcef2aae";
749− sha256 = "1cw5fszffl5pkpa6s6wjnkiv6lm5k618s32sp60kvmvpy7a2v9kg";
750−}
751−</programlisting>
752− </para>
753− </listitem>
754− <listitem>
755− <para>
756− Better: This is ok, but an archive fetch will still be faster.
757−<programlisting>
758−src = fetchgit {
759− url = "https://github.com/NixOS/nix.git";
760− rev = "1f795f9f44607cc5bec70d1300150bfefcef2aae";
761− sha256 = "1cw5fszffl5pkpa6s6wjnkiv6lm5k618s32sp60kvmvpy7a2v9kg";
762−}
763−</programlisting>
764− </para>
765− </listitem>
766− <listitem>
767− <para>
768− Best: Fetches a snapshot archive and you get the rev you want.
769−<programlisting>
770−src = fetchFromGitHub {
771− owner = "NixOS";
772− repo = "nix";
773− rev = "1f795f9f44607cc5bec70d1300150bfefcef2aae";
774− sha256 = "1i2yxndxb6yc9l6c99pypbd92lfq5aac4klq7y2v93c9qvx2cgpc";
775−}
776−</programlisting>
777− Find the value to put as <literal>sha256</literal> by running <literal>nix run -f '&lt;nixpkgs&gt;' nix-prefetch-github -c nix-prefetch-github --rev 1f795f9f44607cc5bec70d1300150bfefcef2aae NixOS nix</literal> or <literal>nix-prefetch-url --unpack https://github.com/NixOS/nix/archive/1f795f9f44607cc5bec70d1300150bfefcef2aae.tar.gz</literal>.
778− </para>
779− </listitem>
780− </itemizedlist>
781− </para>
782− </section>
783− <section xml:id="sec-source-hashes">
784− <title>Obtaining source hash</title>
785−
786− <para>
787− Preferred source hash type is sha256. There are several ways to get it.
788− </para>
789−
790− <orderedlist>
791− <listitem>
792− <para>
793− Prefetch URL (with <literal>nix-prefetch-<replaceable>XXX</replaceable> <replaceable>URL</replaceable></literal>, where <replaceable>XXX</replaceable> is one of <literal>url</literal>, <literal>git</literal>, <literal>hg</literal>, <literal>cvs</literal>, <literal>bzr</literal>, <literal>svn</literal>). Hash is printed to stdout.
794− </para>
795− </listitem>
796− <listitem>
797− <para>
798− Prefetch by package source (with <literal>nix-prefetch-url '&lt;nixpkgs&gt;' -A <replaceable>PACKAGE</replaceable>.src</literal>, where <replaceable>PACKAGE</replaceable> is package attribute name). Hash is printed to stdout.
799− </para>
800− <para>
801− This works well when you've upgraded existing package version and want to find out new hash, but is useless if package can't be accessed by attribute or package has multiple sources (<literal>.srcs</literal>, architecture-dependent sources, etc).
802− </para>
803− </listitem>
804− <listitem>
805− <para>
806− Upstream provided hash: use it when upstream provides <literal>sha256</literal> or <literal>sha512</literal> (when upstream provides <literal>md5</literal>, don't use it, compute <literal>sha256</literal> instead).
807− </para>
808− <para>
809− A little nuance is that <literal>nix-prefetch-*</literal> tools produce hash encoded with <literal>base32</literal>, but upstream usually provides hexadecimal (<literal>base16</literal>) encoding. Fetchers understand both formats. Nixpkgs does not standardize on any one format.
810− </para>
811− <para>
812− You can convert between formats with nix-hash, for example:
813−<screen>
814−<prompt>$ </prompt>nix-hash --type sha256 --to-base32 <replaceable>HASH</replaceable>
815−</screen>
816− </para>
817− </listitem>
818− <listitem>
819− <para>
820− Extracting hash from local source tarball can be done with <literal>sha256sum</literal>. Use <literal>nix-prefetch-url file:///path/to/tarball </literal> if you want base32 hash.
821− </para>
822− </listitem>
823− <listitem>
824− <para>
825− Fake hash: set fake hash in package expression, perform build and extract correct hash from error Nix prints.
826− </para>
827− <para>
828− For package updates it is enough to change one symbol to make hash fake. For new packages, you can use <literal>lib.fakeSha256</literal>, <literal>lib.fakeSha512</literal> or any other fake hash.
829− </para>
830− <para>
831− This is last resort method when reconstructing source URL is non-trivial and <literal>nix-prefetch-url -A</literal> isn't applicable (for example, <link xlink:href="https://github.com/NixOS/nixpkgs/blob/d2ab091dd308b99e4912b805a5eb088dd536adb9/pkgs/applications/video/kodi/default.nix#L73"> one of <literal>kodi</literal> dependencies</link>). The easiest way then would be replace hash with a fake one and rebuild. Nix build will fail and error message will contain desired hash.
832− </para>
833− <warning>
834− <para>
835− This method has security problems. Check below for details.
836− </para>
837− </warning>
838− </listitem>
839− </orderedlist>
840−
841− <section xml:id="sec-source-hashes-security">
842− <title>Obtaining hashes securely</title>
843−
844− <para>
845− Let's say Man-in-the-Middle (MITM) sits close to your network. Then instead of fetching source you can fetch malware, and instead of source hash you get hash of malware. Here are security considerations for this scenario:
846− </para>
847−
848− <itemizedlist>
849− <listitem>
850− <para>
851− <literal>http://</literal> URLs are not secure to prefetch hash from;
852− </para>
853− </listitem>
854− <listitem>
855− <para>
856− hashes from upstream (in method 3) should be obtained via secure protocol;
857− </para>
858− </listitem>
859− <listitem>
860− <para>
861− <literal>https://</literal> URLs are secure in methods 1, 2, 3;
862− </para>
863− </listitem>
864− <listitem>
865− <para>
866− <literal>https://</literal> URLs are not secure in method 5. When obtaining hashes with fake hash method, TLS checks are disabled. So refetch source hash from several different networks to exclude MITM scenario. Alternatively, use fake hash method to make Nix error, but instead of extracting hash from error, extract <literal>https://</literal> URL and prefetch it with method 1.
867− </para>
868− </listitem>
869− </itemizedlist>
870− </section>
871− </section>
872− <section xml:id="sec-patches">
873− <title>Patches</title>
874−
875− <para>
876− Patches available online should be retrieved using <literal>fetchpatch</literal>.
877− </para>
878−
879− <para>
880−<programlisting>
881−patches = [
882− (fetchpatch {
883− name = "fix-check-for-using-shared-freetype-lib.patch";
884− url = "http://git.ghostscript.com/?p=ghostpdl.git;a=patch;h=8f5d285";
885− sha256 = "1f0k043rng7f0rfl9hhb89qzvvksqmkrikmm38p61yfx51l325xr";
886− })
887−];
888−</programlisting>
889− </para>
890−
891− <para>
892− Otherwise, you can add a <literal>.patch</literal> file to the <literal>nixpkgs</literal> repository. In the interest of keeping our maintenance burden to a minimum, only patches that are unique to <literal>nixpkgs</literal> should be added in this way.
893− </para>
894−
895− <para>
896−<programlisting>
897−patches = [ ./0001-changes.patch ];
898−</programlisting>
899− </para>
900−
901− <para>
902− If you do need to do create this sort of patch file, one way to do so is with git:
903− <orderedlist>
904− <listitem>
905− <para>
906− Move to the root directory of the source code you're patching.
907−<screen>
908−<prompt>$ </prompt>cd the/program/source</screen>
909− </para>
910− </listitem>
911− <listitem>
912− <para>
913− If a git repository is not already present, create one and stage all of the source files.
914−<screen>
915−<prompt>$ </prompt>git init
916−<prompt>$ </prompt>git add .</screen>
917− </para>
918− </listitem>
919− <listitem>
920− <para>
921− Edit some files to make whatever changes need to be included in the patch.
922− </para>
923− </listitem>
924− <listitem>
925− <para>
926− Use git to create a diff, and pipe the output to a patch file:
927−<screen>
928−<prompt>$ </prompt>git diff > nixpkgs/pkgs/the/package/0001-changes.patch</screen>
929− </para>
930− </listitem>
931− </orderedlist>
932− </para>
933− </section>
934−</chapter>
doc/contributing/contributing-to-documentation.chapter.mdnew file+106
@@ -0,0 +1,106 @@
1+# Contributing to this documentation {#chap-contributing}
2+
3+The sources of the Nixpkgs manual are in the [doc](https://github.com/NixOS/nixpkgs/tree/master/doc) subdirectory of the Nixpkgs repository. The manual is still partially written in DocBook but it is progressively being converted to [Markdown](#sec-contributing-markup).
4+
5+You can quickly check your edits with `make`:
6+
7+```ShellSession
8+$ cd /path/to/nixpkgs/doc
9+$ nix-shell
10+[nix-shell]$ make
11+```
12+
13+If you experience problems, run `make debug` to help understand the docbook errors.
14+
15+After making modifications to the manual, it's important to build it before committing. You can do that as follows:
16+
17+```ShellSession
18+$ cd /path/to/nixpkgs/doc
19+$ nix-shell
20+[nix-shell]$ make clean
21+[nix-shell]$ nix-build .
22+```
23+
24+If the build succeeds, the manual will be in `./result/share/doc/nixpkgs/manual.html`.
25+
26+## Syntax {#sec-contributing-markup}
27+
28+As per [RFC 0072](https://github.com/NixOS/rfcs/pull/72), all new documentation content should be written in [CommonMark](https://commonmark.org/) Markdown dialect.
29+
30+Additionally, the following syntax extensions are currently used:
31+
32+- []{#ssec-contributing-markup-anchors}
33+ Explicitly defined **anchors** on headings, to allow linking to sections. These should be always used, to ensure the anchors can be linked even when the heading text changes, and to prevent conflicts between [automatically assigned identifiers](https://github.com/jgm/commonmark-hs/blob/master/commonmark-extensions/test/auto_identifiers.md).
34+
35+ It uses the widely compatible [header attributes](https://github.com/jgm/commonmark-hs/blob/master/commonmark-extensions/test/attributes.md) syntax:
36+
37+ ```markdown
38+ ## Syntax {#sec-contributing-markup}
39+ ```
40+
41+- []{#ssec-contributing-markup-anchors-inline}
42+ **Inline anchors**, which allow linking arbitrary place in the text (e.g. individual list items, sentences…).
43+
44+ They are defined using a hybrid of the link syntax with the attributes syntax known from headings, called [bracketed spans](https://github.com/jgm/commonmark-hs/blob/master/commonmark-extensions/test/bracketed_spans.md):
45+
46+ ```markdown
47+ - []{#ssec-gnome-hooks-glib} `glib` setup hook will populate `GSETTINGS_SCHEMAS_PATH` and then `wrapGAppsHook` will prepend it to `XDG_DATA_DIRS`.
48+ ```
49+
50+- []{#ssec-contributing-markup-automatic-links}
51+ If you **omit a link text** for a link pointing to a section, the text will be substituted automatically. For example, `[](#chap-contributing)` will result in [](#chap-contributing).
52+
53+ This syntax is taken from [MyST](https://myst-parser.readthedocs.io/en/latest/using/syntax.html#targets-and-cross-referencing).
54+
55+- []{#ssec-contributing-markup-inline-roles}
56+ If you want to link to a man page, you can use `` {manpage}`nix.conf(5)` ``, which will turn into {manpage}`nix.conf(5)`.
57+
58+ The references will turn into links when a mapping exists in {file}`doc/build-aux/pandoc-filters/link-unix-man-references.lua`.
59+
60+ This syntax is taken from [MyST](https://myst-parser.readthedocs.io/en/latest/syntax/syntax.html#roles-an-in-line-extension-point). Though, the feature originates from [reStructuredText](https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-manpage) with slightly different syntax.
61+
62+- []{#ssec-contributing-markup-admonitions}
63+ **Admonitions**, set off from the text to bring attention to something.
64+
65+ It uses pandoc’s [fenced `div`s syntax](https://github.com/jgm/commonmark-hs/blob/master/commonmark-extensions/test/fenced_divs.md):
66+
67+ ```markdown
68+ ::: {.warning}
69+ This is a warning
70+ :::
71+ ```
72+
73+ which renders as
74+
75+ > ::: {.warning}
76+ > This is a warning.
77+ > :::
78+
79+ The following are supported:
80+
81+ - [`caution`](https://tdg.docbook.org/tdg/5.0/caution.html)
82+ - [`important`](https://tdg.docbook.org/tdg/5.0/important.html)
83+ - [`note`](https://tdg.docbook.org/tdg/5.0/note.html)
84+ - [`tip`](https://tdg.docbook.org/tdg/5.0/tip.html)
85+ - [`warning`](https://tdg.docbook.org/tdg/5.0/warning.html)
86+
87+- []{#ssec-contributing-markup-definition-lists}
88+ [**Definition lists**](https://github.com/jgm/commonmark-hs/blob/master/commonmark-extensions/test/definition_lists.md), for defining a group of terms:
89+
90+ ```markdown
91+ pear
92+ : green or yellow bulbous fruit
93+
94+ watermelon
95+ : green fruit with red flesh
96+ ```
97+
98+ which renders as
99+
100+ > pear
101+ > : green or yellow bulbous fruit
102+ >
103+ > watermelon
104+ > : green fruit with red flesh
105+
106+For contributing to the legacy parts, please see [DocBook: The Definitive Guide](https://tdg.docbook.org/) or the [DocBook rocks! primer](https://web.archive.org/web/20200816233747/https://docbook.rocks/).
doc/contributing/contributing-to-documentation.xmldeleted−30
@@ -1,30 +0,0 @@
1−<chapter xmlns="http://docbook.org/ns/docbook"
2− xmlns:xlink="http://www.w3.org/1999/xlink"
3− xml:id="chap-contributing">
4− <title>Contributing to this documentation</title>
5− <para>
6− The DocBook sources of the Nixpkgs manual are in the <filename
7−xlink:href="https://github.com/NixOS/nixpkgs/tree/master/doc">doc</filename> subdirectory of the Nixpkgs repository.
8− </para>
9− <para>
10− You can quickly check your edits with <command>make</command>:
11− </para>
12−<screen>
13−<prompt>$ </prompt>cd /path/to/nixpkgs/doc
14−<prompt>$ </prompt>nix-shell
15−<prompt>[nix-shell]$ </prompt>make
16−</screen>
17− <para>
18− If you experience problems, run <command>make debug</command> to help understand the docbook errors.
19− </para>
20− <para>
21− After making modifications to the manual, it's important to build it before committing. You can do that as follows:
22−<screen>
23−<prompt>$ </prompt>cd /path/to/nixpkgs/doc
24−<prompt>$ </prompt>nix-shell
25−<prompt>[nix-shell]$ </prompt>make clean
26−<prompt>[nix-shell]$ </prompt>nix-build .
27−</screen>
28− If the build succeeds, the manual will be in <filename>./result/share/doc/nixpkgs/manual.html</filename>.
29− </para>
30−</chapter>
doc/contributing/quick-start.chapter.mdnew file+77
@@ -0,0 +1,77 @@
1+# Quick Start to Adding a Package {#chap-quick-start}
2+
3+To add a package to Nixpkgs:
4+
5+1. Checkout the Nixpkgs source tree:
6+
7+ ```ShellSession
8+ $ git clone https://github.com/NixOS/nixpkgs
9+ $ cd nixpkgs
10+ ```
11+
12+2. Find a good place in the Nixpkgs tree to add the Nix expression for your package. For instance, a library package typically goes into `pkgs/development/libraries/pkgname`, while a web browser goes into `pkgs/applications/networking/browsers/pkgname`. See [](#sec-organisation) for some hints on the tree organisation. Create a directory for your package, e.g.
13+
14+ ```ShellSession
15+ $ mkdir pkgs/development/libraries/libfoo
16+ ```
17+
18+3. In the package directory, create a Nix expression — a piece of code that describes how to build the package. In this case, it should be a _function_ that is called with the package dependencies as arguments, and returns a build of the package in the Nix store. The expression should usually be called `default.nix`.
19+
20+ ```ShellSession
21+ $ emacs pkgs/development/libraries/libfoo/default.nix
22+ $ git add pkgs/development/libraries/libfoo/default.nix
23+ ```
24+
25+ You can have a look at the existing Nix expressions under `pkgs/` to see how it’s done. Here are some good ones:
26+
27+ - GNU Hello: [`pkgs/applications/misc/hello/default.nix`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/misc/hello/default.nix). Trivial package, which specifies some `meta` attributes which is good practice.
28+
29+ - GNU cpio: [`pkgs/tools/archivers/cpio/default.nix`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/archivers/cpio/default.nix). Also a simple package. The generic builder in `stdenv` does everything for you. It has no dependencies beyond `stdenv`.
30+
31+ - GNU Multiple Precision arithmetic library (GMP): [`pkgs/development/libraries/gmp/5.1.x.nix`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/libraries/gmp/5.1.x.nix). Also done by the generic builder, but has a dependency on `m4`.
32+
33+ - Pan, a GTK-based newsreader: [`pkgs/applications/networking/newsreaders/pan/default.nix`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/networking/newsreaders/pan/default.nix). Has an optional dependency on `gtkspell`, which is only built if `spellCheck` is `true`.
34+
35+ - Apache HTTPD: [`pkgs/servers/http/apache-httpd/2.4.nix`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/servers/http/apache-httpd/2.4.nix). A bunch of optional features, variable substitutions in the configure flags, a post-install hook, and miscellaneous hackery.
36+
37+ - Thunderbird: [`pkgs/applications/networking/mailreaders/thunderbird/default.nix`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/networking/mailreaders/thunderbird/default.nix). Lots of dependencies.
38+
39+ - JDiskReport, a Java utility: [`pkgs/tools/misc/jdiskreport/default.nix`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/jdiskreport/default.nix). Nixpkgs doesn’t have a decent `stdenv` for Java yet so this is pretty ad-hoc.
40+
41+ - XML::Simple, a Perl module: [`pkgs/top-level/perl-packages.nix`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/perl-packages.nix) (search for the `XMLSimple` attribute). Most Perl modules are so simple to build that they are defined directly in `perl-packages.nix`; no need to make a separate file for them.
42+
43+ - Adobe Reader: [`pkgs/applications/misc/adobe-reader/default.nix`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/misc/adobe-reader/default.nix). Shows how binary-only packages can be supported. In particular the [builder](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/misc/adobe-reader/builder.sh) uses `patchelf` to set the RUNPATH and ELF interpreter of the executables so that the right libraries are found at runtime.
44+
45+ Some notes:
46+
47+ - All [`meta`](#chap-meta) attributes are optional, but it’s still a good idea to provide at least the `description`, `homepage` and [`license`](#sec-meta-license).
48+
49+ - You can use `nix-prefetch-url url` to get the SHA-256 hash of source distributions. There are similar commands as `nix-prefetch-git` and `nix-prefetch-hg` available in `nix-prefetch-scripts` package.
50+
51+ - A list of schemes for `mirror://` URLs can be found in [`pkgs/build-support/fetchurl/mirrors.nix`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/fetchurl/mirrors.nix).
52+
53+ The exact syntax and semantics of the Nix expression language, including the built-in function, are described in the Nix manual in the [chapter on writing Nix expressions](https://hydra.nixos.org/job/nix/trunk/tarball/latest/download-by-type/doc/manual/#chap-writing-nix-expressions).
54+
55+4. Add a call to the function defined in the previous step to [`pkgs/top-level/all-packages.nix`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/all-packages.nix) with some descriptive name for the variable, e.g. `libfoo`.
56+
57+ ```ShellSession
58+ $ emacs pkgs/top-level/all-packages.nix
59+ ```
60+
61+ The attributes in that file are sorted by category (like “Development / Libraries”) that more-or-less correspond to the directory structure of Nixpkgs, and then by attribute name.
62+
63+5. To test whether the package builds, run the following command from the root of the nixpkgs source tree:
64+
65+ ```ShellSession
66+ $ nix-build -A libfoo
67+ ```
68+
69+ where `libfoo` should be the variable name defined in the previous step. You may want to add the flag `-K` to keep the temporary build directory in case something fails. If the build succeeds, a symlink `./result` to the package in the Nix store is created.
70+
71+6. If you want to install the package into your profile (optional), do
72+
73+ ```ShellSession
74+ $ nix-env -f . -iA libfoo
75+ ```
76+
77+7. Optionally commit the new package and open a pull request [to nixpkgs](https://github.com/NixOS/nixpkgs/pulls), or use [the Patches category](https://discourse.nixos.org/t/about-the-patches-category/477) on Discourse for sending a patch without a GitHub account.
doc/contributing/quick-start.xmldeleted−152
@@ -1,152 +0,0 @@
1−<chapter xmlns="http://docbook.org/ns/docbook"
2− xmlns:xlink="http://www.w3.org/1999/xlink"
3− xml:id="chap-quick-start">
4− <title>Quick Start to Adding a Package</title>
5− <para>
6− To add a package to Nixpkgs:
7− <orderedlist>
8− <listitem>
9− <para>
10− Checkout the Nixpkgs source tree:
11−<screen>
12−<prompt>$ </prompt>git clone https://github.com/NixOS/nixpkgs
13−<prompt>$ </prompt>cd nixpkgs</screen>
14− </para>
15− </listitem>
16− <listitem>
17− <para>
18− Find a good place in the Nixpkgs tree to add the Nix expression for your package. For instance, a library package typically goes into <filename>pkgs/development/libraries/<replaceable>pkgname</replaceable></filename>, while a web browser goes into <filename>pkgs/applications/networking/browsers/<replaceable>pkgname</replaceable></filename>. See <xref linkend="sec-organisation" /> for some hints on the tree organisation. Create a directory for your package, e.g.
19−<screen>
20−<prompt>$ </prompt>mkdir pkgs/development/libraries/libfoo</screen>
21− </para>
22− </listitem>
23− <listitem>
24− <para>
25− In the package directory, create a Nix expression — a piece of code that describes how to build the package. In this case, it should be a <emphasis>function</emphasis> that is called with the package dependencies as arguments, and returns a build of the package in the Nix store. The expression should usually be called <filename>default.nix</filename>.
26−<screen>
27−<prompt>$ </prompt>emacs pkgs/development/libraries/libfoo/default.nix
28−<prompt>$ </prompt>git add pkgs/development/libraries/libfoo/default.nix</screen>
29− </para>
30− <para>
31− You can have a look at the existing Nix expressions under <filename>pkgs/</filename> to see how it’s done. Here are some good ones:
32− <itemizedlist>
33− <listitem>
34− <para>
35− GNU Hello: <link
36− xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/misc/hello/default.nix"><filename>pkgs/applications/misc/hello/default.nix</filename></link>. Trivial package, which specifies some <varname>meta</varname> attributes which is good practice.
37− </para>
38− </listitem>
39− <listitem>
40− <para>
41− GNU cpio: <link
42− xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/archivers/cpio/default.nix"><filename>pkgs/tools/archivers/cpio/default.nix</filename></link>. Also a simple package. The generic builder in <varname>stdenv</varname> does everything for you. It has no dependencies beyond <varname>stdenv</varname>.
43− </para>
44− </listitem>
45− <listitem>
46− <para>
47− GNU Multiple Precision arithmetic library (GMP): <link
48− xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/libraries/gmp/5.1.x.nix"><filename>pkgs/development/libraries/gmp/5.1.x.nix</filename></link>. Also done by the generic builder, but has a dependency on <varname>m4</varname>.
49− </para>
50− </listitem>
51− <listitem>
52− <para>
53− Pan, a GTK-based newsreader: <link
54− xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/networking/newsreaders/pan/default.nix"><filename>pkgs/applications/networking/newsreaders/pan/default.nix</filename></link>. Has an optional dependency on <varname>gtkspell</varname>, which is only built if <varname>spellCheck</varname> is <literal>true</literal>.
55− </para>
56− </listitem>
57− <listitem>
58− <para>
59− Apache HTTPD: <link
60− xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/servers/http/apache-httpd/2.4.nix"><filename>pkgs/servers/http/apache-httpd/2.4.nix</filename></link>. A bunch of optional features, variable substitutions in the configure flags, a post-install hook, and miscellaneous hackery.
61− </para>
62− </listitem>
63− <listitem>
64− <para>
65− Thunderbird: <link
66− xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/networking/mailreaders/thunderbird/default.nix"><filename>pkgs/applications/networking/mailreaders/thunderbird/default.nix</filename></link>. Lots of dependencies.
67− </para>
68− </listitem>
69− <listitem>
70− <para>
71− JDiskReport, a Java utility: <link
72− xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/jdiskreport/default.nix"><filename>pkgs/tools/misc/jdiskreport/default.nix</filename></link>. Nixpkgs doesn’t have a decent <varname>stdenv</varname> for Java yet so this is pretty ad-hoc.
73− </para>
74− </listitem>
75− <listitem>
76− <para>
77− XML::Simple, a Perl module: <link
78− xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/perl-packages.nix"><filename>pkgs/top-level/perl-packages.nix</filename></link> (search for the <varname>XMLSimple</varname> attribute). Most Perl modules are so simple to build that they are defined directly in <filename>perl-packages.nix</filename>; no need to make a separate file for them.
79− </para>
80− </listitem>
81− <listitem>
82− <para>
83− Adobe Reader: <link
84− xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/misc/adobe-reader/default.nix"><filename>pkgs/applications/misc/adobe-reader/default.nix</filename></link>. Shows how binary-only packages can be supported. In particular the <link
85− xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/misc/adobe-reader/builder.sh">builder</link> uses <command>patchelf</command> to set the RUNPATH and ELF interpreter of the executables so that the right libraries are found at runtime.
86− </para>
87− </listitem>
88− </itemizedlist>
89− </para>
90− <para>
91− Some notes:
92− <itemizedlist>
93− <listitem>
94− <para>
95− All <varname linkend="chap-meta">meta</varname> attributes are optional, but it’s still a good idea to provide at least the <varname>description</varname>, <varname>homepage</varname> and <varname
96− linkend="sec-meta-license">license</varname>.
97− </para>
98− </listitem>
99− <listitem>
100− <para>
101− You can use <command>nix-prefetch-url</command> <replaceable>url</replaceable> to get the SHA-256 hash of source distributions. There are similar commands as <command>nix-prefetch-git</command> and <command>nix-prefetch-hg</command> available in <literal>nix-prefetch-scripts</literal> package.
102− </para>
103− </listitem>
104− <listitem>
105− <para>
106− A list of schemes for <literal>mirror://</literal> URLs can be found in <link
107− xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/fetchurl/mirrors.nix"><filename>pkgs/build-support/fetchurl/mirrors.nix</filename></link>.
108− </para>
109− </listitem>
110− </itemizedlist>
111− </para>
112− <para>
113− The exact syntax and semantics of the Nix expression language, including the built-in function, are described in the Nix manual in the <link
114− xlink:href="https://hydra.nixos.org/job/nix/trunk/tarball/latest/download-by-type/doc/manual/#chap-writing-nix-expressions">chapter on writing Nix expressions</link>.
115− </para>
116− </listitem>
117− <listitem>
118− <para>
119− Add a call to the function defined in the previous step to <link
120− xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/all-packages.nix"><filename>pkgs/top-level/all-packages.nix</filename></link> with some descriptive name for the variable, e.g. <varname>libfoo</varname>.
121−<screen>
122−<prompt>$ </prompt>emacs pkgs/top-level/all-packages.nix</screen>
123− </para>
124− <para>
125− The attributes in that file are sorted by category (like “Development / Libraries”) that more-or-less correspond to the directory structure of Nixpkgs, and then by attribute name.
126− </para>
127− </listitem>
128− <listitem>
129− <para>
130− To test whether the package builds, run the following command from the root of the nixpkgs source tree:
131−<screen>
132−<prompt>$ </prompt>nix-build -A libfoo</screen>
133− where <varname>libfoo</varname> should be the variable name defined in the previous step. You may want to add the flag <option>-K</option> to keep the temporary build directory in case something fails. If the build succeeds, a symlink <filename>./result</filename> to the package in the Nix store is created.
134− </para>
135− </listitem>
136− <listitem>
137− <para>
138− If you want to install the package into your profile (optional), do
139−<screen>
140−<prompt>$ </prompt>nix-env -f . -iA libfoo</screen>
141− </para>
142− </listitem>
143− <listitem>
144− <para>
145− Optionally commit the new package and open a pull request <link
146− xlink:href="https://github.com/NixOS/nixpkgs/pulls">to nixpkgs</link>, or use <link
147− xlink:href="https://discourse.nixos.org/t/about-the-patches-category/477"> the Patches category</link> on Discourse for sending a patch without a GitHub account.
148− </para>
149− </listitem>
150− </orderedlist>
151− </para>
152−</chapter>
doc/contributing/reviewing-contributions.chapter.mdnew file+208
@@ -0,0 +1,208 @@
1+# Reviewing contributions {#chap-reviewing-contributions}
2+
3+::: {.warning}
4+The following section is a draft, and the policy for reviewing is still being discussed in issues such as [#11166](https://github.com/NixOS/nixpkgs/issues/11166) and [#20836](https://github.com/NixOS/nixpkgs/issues/20836).
5+:::
6+
7+The Nixpkgs project receives a fairly high number of contributions via GitHub pull requests. Reviewing and approving these is an important task and a way to contribute to the project.
8+
9+The high change rate of Nixpkgs makes any pull request that remains open for too long subject to conflicts that will require extra work from the submitter or the merger. Reviewing pull requests in a timely manner and being responsive to the comments is the key to avoid this issue. GitHub provides sort filters that can be used to see the [most recently](https://github.com/NixOS/nixpkgs/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc) and the [least recently](https://github.com/NixOS/nixpkgs/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-asc) updated pull requests. We highly encourage looking at [this list of ready to merge, unreviewed pull requests](https://github.com/NixOS/nixpkgs/pulls?q=is%3Apr+is%3Aopen+review%3Anone+status%3Asuccess+-label%3A%222.status%3A+work-in-progress%22+no%3Aproject+no%3Aassignee+no%3Amilestone).
10+
11+When reviewing a pull request, please always be nice and polite. Controversial changes can lead to controversial opinions, but it is important to respect every community member and their work.
12+
13+GitHub provides reactions as a simple and quick way to provide feedback to pull requests or any comments. The thumb-down reaction should be used with care and if possible accompanied with some explanation so the submitter has directions to improve their contribution.
14+
15+pull request reviews should include a list of what has been reviewed in a comment, so other reviewers and mergers can know the state of the review.
16+
17+All the review template samples provided in this section are generic and meant as examples. Their usage is optional and the reviewer is free to adapt them to their liking.
18+
19+## Package updates {#reviewing-contributions-package-updates}
20+
21+A package update is the most trivial and common type of pull request. These pull requests mainly consist of updating the version part of the package name and the source hash.
22+
23+It can happen that non-trivial updates include patches or more complex changes.
24+
25+Reviewing process:
26+
27+- Ensure that the package versioning fits the guidelines.
28+- Ensure that the commit text fits the guidelines.
29+- Ensure that the package maintainers are notified.
30+ - [CODEOWNERS](https://help.github.com/articles/about-codeowners) will make GitHub notify users based on the submitted changes, but it can happen that it misses some of the package maintainers.
31+- Ensure that the meta field information is correct.
32+ - License can change with version updates, so it should be checked to match the upstream license.
33+ - If the package has no maintainer, a maintainer must be set. This can be the update submitter or a community member that accepts to take maintainership of the package.
34+- Ensure that the code contains no typos.
35+- Building the package locally.
36+ - pull requests are often targeted to the master or staging branch, and building the pull request locally when it is submitted can trigger many source builds.
37+ - It is possible to rebase the changes on nixos-unstable or nixpkgs-unstable for easier review by running the following commands from a nixpkgs clone.
38+
39+ ```ShellSession
40+ $ git fetch origin nixos-unstable
41+ $ git fetch origin pull/PRNUMBER/head
42+ $ git rebase --onto nixos-unstable BASEBRANCH FETCH_HEAD
43+ ```
44+
45+ - The first command fetches the nixos-unstable branch.
46+ - The second command fetches the pull request changes, `PRNUMBER` is the number at the end of the pull request title and `BASEBRANCH` the base branch of the pull request.
47+ - The third command rebases the pull request changes to the nixos-unstable branch.
48+ - The [nixpkgs-review](https://github.com/Mic92/nixpkgs-review) tool can be used to review a pull request content in a single command. `PRNUMBER` should be replaced by the number at the end of the pull request title. You can also provide the full github pull request url.
49+
50+ ```ShellSession
51+ $ nix-shell -p nixpkgs-review --run "nixpkgs-review pr PRNUMBER"
52+ ```
53+- Running every binary.
54+
55+Sample template for a package update review is provided below.
56+
57+```markdown
58+##### Reviewed points
59+
60+- [ ] package name fits guidelines
61+- [ ] package version fits guidelines
62+- [ ] package build on ARCHITECTURE
63+- [ ] executables tested on ARCHITECTURE
64+- [ ] all depending packages build
65+
66+##### Possible improvements
67+
68+##### Comments
69+```
70+
71+## New packages {#reviewing-contributions-new-packages}
72+
73+New packages are a common type of pull requests. These pull requests consists in adding a new nix-expression for a package.
74+
75+Review process:
76+
77+- Ensure that the package versioning fits the guidelines.
78+- Ensure that the commit name fits the guidelines.
79+- Ensure that the meta fields contain correct information.
80+ - License must match the upstream license.
81+ - Platforms should be set (or the package will not get binary substitutes).
82+ - Maintainers must be set. This can be the package submitter or a community member that accepts taking up maintainership of the package.
83+- Report detected typos.
84+- Ensure the package source:
85+ - Uses mirror URLs when available.
86+ - Uses the most appropriate functions (e.g. packages from GitHub should use `fetchFromGitHub`).
87+- Building the package locally.
88+- Running every binary.
89+
90+Sample template for a new package review is provided below.
91+
92+```markdown
93+##### Reviewed points
94+
95+- [ ] package path fits guidelines
96+- [ ] package name fits guidelines
97+- [ ] package version fits guidelines
98+- [ ] package build on ARCHITECTURE
99+- [ ] executables tested on ARCHITECTURE
100+- [ ] `meta.description` is set and fits guidelines
101+- [ ] `meta.license` fits upstream license
102+- [ ] `meta.platforms` is set
103+- [ ] `meta.maintainers` is set
104+- [ ] build time only dependencies are declared in `nativeBuildInputs`
105+- [ ] source is fetched using the appropriate function
106+- [ ] the list of `phases` is not overridden
107+- [ ] when a phase (like `installPhase`) is overridden it starts with `runHook preInstall` and ends with `runHook postInstall`.
108+- [ ] patches that are remotely available are fetched with `fetchpatch`
109+
110+##### Possible improvements
111+
112+##### Comments
113+```
114+
115+## Module updates {#reviewing-contributions-module-updates}
116+
117+Module updates are submissions changing modules in some ways. These often contains changes to the options or introduce new options.
118+
119+Reviewing process:
120+
121+- Ensure that the module maintainers are notified.
122+ - [CODEOWNERS](https://help.github.com/articles/about-codeowners/) will make GitHub notify users based on the submitted changes, but it can happen that it misses some of the package maintainers.
123+- Ensure that the module tests, if any, are succeeding.
124+- Ensure that the introduced options are correct.
125+ - Type should be appropriate (string related types differs in their merging capabilities, `loaOf` and `string` types are deprecated).
126+ - Description, default and example should be provided.
127+- Ensure that option changes are backward compatible.
128+ - `mkRenamedOptionModuleWith` provides a way to make option changes backward compatible.
129+- Ensure that removed options are declared with `mkRemovedOptionModule`
130+- Ensure that changes that are not backward compatible are mentioned in release notes.
131+- Ensure that documentations affected by the change is updated.
132+
133+Sample template for a module update review is provided below.
134+
135+```markdown
136+##### Reviewed points
137+
138+- [ ] changes are backward compatible
139+- [ ] removed options are declared with `mkRemovedOptionModule`
140+- [ ] changes that are not backward compatible are documented in release notes
141+- [ ] module tests succeed on ARCHITECTURE
142+- [ ] options types are appropriate
143+- [ ] options description is set
144+- [ ] options example is provided
145+- [ ] documentation affected by the changes is updated
146+
147+##### Possible improvements
148+
149+##### Comments
150+```
151+
152+## New modules {#reviewing-contributions-new-modules}
153+
154+New modules submissions introduce a new module to NixOS.
155+
156+Reviewing process:
157+
158+- Ensure that the module tests, if any, are succeeding.
159+- Ensure that the introduced options are correct.
160+ - Type should be appropriate (string related types differs in their merging capabilities, `loaOf` and `string` types are deprecated).
161+ - Description, default and example should be provided.
162+- Ensure that module `meta` field is present
163+ - Maintainers should be declared in `meta.maintainers`.
164+ - Module documentation should be declared with `meta.doc`.
165+- Ensure that the module respect other modules functionality.
166+ - For example, enabling a module should not open firewall ports by default.
167+
168+Sample template for a new module review is provided below.
169+
170+```markdown
171+##### Reviewed points
172+
173+- [ ] module path fits the guidelines
174+- [ ] module tests succeed on ARCHITECTURE
175+- [ ] options have appropriate types
176+- [ ] options have default
177+- [ ] options have example
178+- [ ] options have descriptions
179+- [ ] No unneeded package is added to environment.systemPackages
180+- [ ] meta.maintainers is set
181+- [ ] module documentation is declared in meta.doc
182+
183+##### Possible improvements
184+
185+##### Comments
186+```
187+
188+## Other submissions {#reviewing-contributions-other-submissions}
189+
190+Other type of submissions requires different reviewing steps.
191+
192+If you consider having enough knowledge and experience in a topic and would like to be a long-term reviewer for related submissions, please contact the current reviewers for that topic. They will give you information about the reviewing process. The main reviewers for a topic can be hard to find as there is no list, but checking past pull requests to see who reviewed or git-blaming the code to see who committed to that topic can give some hints.
193+
194+Container system, boot system and library changes are some examples of the pull requests fitting this category.
195+
196+## Merging pull requests {#reviewing-contributions--merging-pull-requests}
197+
198+It is possible for community members that have enough knowledge and experience on a special topic to contribute by merging pull requests.
199+
200+<!--
201+The following paragraphs about how to deal with unactive contributors is just a proposition and should be modified to what the community agrees to be the right policy.
202+
203+Please note that contributors with commit rights unactive for more than three months will have their commit rights revoked.
204+-->
205+
206+Please see the discussion in [GitHub nixpkgs issue #50105](https://github.com/NixOS/nixpkgs/issues/50105) for information on how to proceed to be granted this level of access.
207+
208+In a case a contributor definitively leaves the Nix community, they should create an issue or post on [Discourse](https://discourse.nixos.org) with references of packages and modules they maintain so the maintainership can be taken over by other contributors.
doc/contributing/reviewing-contributions.xmldeleted−488
@@ -1,488 +0,0 @@
1−<chapter xmlns="http://docbook.org/ns/docbook"
2− xmlns:xlink="http://www.w3.org/1999/xlink"
3− xmlns:xi="http://www.w3.org/2001/XInclude"
4− version="5.0"
5− xml:id="chap-reviewing-contributions">
6− <title>Reviewing contributions</title>
7− <warning>
8− <para>
9− The following section is a draft, and the policy for reviewing is still being discussed in issues such as <link
10− xlink:href="https://github.com/NixOS/nixpkgs/issues/11166">#11166 </link> and <link
11− xlink:href="https://github.com/NixOS/nixpkgs/issues/20836">#20836 </link>.
12− </para>
13− </warning>
14− <para>
15− The Nixpkgs project receives a fairly high number of contributions via GitHub pull requests. Reviewing and approving these is an important task and a way to contribute to the project.
16− </para>
17− <para>
18− The high change rate of Nixpkgs makes any pull request that remains open for too long subject to conflicts that will require extra work from the submitter or the merger. Reviewing pull requests in a timely manner and being responsive to the comments is the key to avoid this issue. GitHub provides sort filters that can be used to see the <link
19− xlink:href="https://github.com/NixOS/nixpkgs/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc">most recently</link> and the <link
20− xlink:href="https://github.com/NixOS/nixpkgs/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-asc">least recently</link> updated pull requests. We highly encourage looking at <link xlink:href="https://github.com/NixOS/nixpkgs/pulls?q=is%3Apr+is%3Aopen+review%3Anone+status%3Asuccess+-label%3A%222.status%3A+work-in-progress%22+no%3Aproject+no%3Aassignee+no%3Amilestone"> this list of ready to merge, unreviewed pull requests</link>.
21− </para>
22− <para>
23− When reviewing a pull request, please always be nice and polite. Controversial changes can lead to controversial opinions, but it is important to respect every community member and their work.
24− </para>
25− <para>
26− GitHub provides reactions as a simple and quick way to provide feedback to pull requests or any comments. The thumb-down reaction should be used with care and if possible accompanied with some explanation so the submitter has directions to improve their contribution.
27− </para>
28− <para>
29− pull request reviews should include a list of what has been reviewed in a comment, so other reviewers and mergers can know the state of the review.
30− </para>
31− <para>
32− All the review template samples provided in this section are generic and meant as examples. Their usage is optional and the reviewer is free to adapt them to their liking.
33− </para>
34− <section xml:id="reviewing-contributions-package-updates">
35− <title>Package updates</title>
36−
37− <para>
38− A package update is the most trivial and common type of pull request. These pull requests mainly consist of updating the version part of the package name and the source hash.
39− </para>
40−
41− <para>
42− It can happen that non-trivial updates include patches or more complex changes.
43− </para>
44−
45− <para>
46− Reviewing process:
47− </para>
48−
49− <itemizedlist>
50− <listitem>
51− <para>
52− Ensure that the package versioning fits the guidelines.
53− </para>
54− </listitem>
55− <listitem>
56− <para>
57− Ensure that the commit text fits the guidelines.
58− </para>
59− </listitem>
60− <listitem>
61− <para>
62− Ensure that the package maintainers are notified.
63− </para>
64− <itemizedlist>
65− <listitem>
66− <para>
67− <link xlink:href="https://help.github.com/articles/about-codeowners/">CODEOWNERS</link> will make GitHub notify users based on the submitted changes, but it can happen that it misses some of the package maintainers.
68− </para>
69− </listitem>
70− </itemizedlist>
71− </listitem>
72− <listitem>
73− <para>
74− Ensure that the meta field information is correct.
75− </para>
76− <itemizedlist>
77− <listitem>
78− <para>
79− License can change with version updates, so it should be checked to match the upstream license.
80− </para>
81− </listitem>
82− <listitem>
83− <para>
84− If the package has no maintainer, a maintainer must be set. This can be the update submitter or a community member that accepts to take maintainership of the package.
85− </para>
86− </listitem>
87− </itemizedlist>
88− </listitem>
89− <listitem>
90− <para>
91− Ensure that the code contains no typos.
92− </para>
93− </listitem>
94− <listitem>
95− <para>
96− Building the package locally.
97− </para>
98− <itemizedlist>
99− <listitem>
100− <para>
101− pull requests are often targeted to the master or staging branch, and building the pull request locally when it is submitted can trigger many source builds.
102− </para>
103− <para>
104− It is possible to rebase the changes on nixos-unstable or nixpkgs-unstable for easier review by running the following commands from a nixpkgs clone.
105−<screen>
106−<prompt>$ </prompt>git fetch origin nixos-unstable <co xml:id='reviewing-rebase-2' />
107−<prompt>$ </prompt>git fetch origin pull/PRNUMBER/head <co xml:id='reviewing-rebase-3' />
108−<prompt>$ </prompt>git rebase --onto nixos-unstable BASEBRANCH FETCH_HEAD <co
109− xml:id='reviewing-rebase-4' />
110−</screen>
111− <calloutlist>
112− <callout arearefs='reviewing-rebase-2'>
113− <para>
114− Fetching the nixos-unstable branch.
115− </para>
116− </callout>
117− <callout arearefs='reviewing-rebase-3'>
118− <para>
119− Fetching the pull request changes, <varname>PRNUMBER</varname> is the number at the end of the pull request title and <varname>BASEBRANCH</varname> the base branch of the pull request.
120− </para>
121− </callout>
122− <callout arearefs='reviewing-rebase-4'>
123− <para>
124− Rebasing the pull request changes to the nixos-unstable branch.
125− </para>
126− </callout>
127− </calloutlist>
128− </para>
129− </listitem>
130− <listitem>
131− <para>
132− The <link xlink:href="https://github.com/Mic92/nixpkgs-review">nixpkgs-review</link> tool can be used to review a pull request content in a single command. <varname>PRNUMBER</varname> should be replaced by the number at the end of the pull request title. You can also provide the full github pull request url.
133− </para>
134−<screen>
135−<prompt>$ </prompt>nix-shell -p nixpkgs-review --run "nixpkgs-review pr PRNUMBER"
136−</screen>
137− </listitem>
138− </itemizedlist>
139− </listitem>
140− <listitem>
141− <para>
142− Running every binary.
143− </para>
144− </listitem>
145− </itemizedlist>
146−
147− <example xml:id="reviewing-contributions-sample-package-update">
148− <title>Sample template for a package update review</title>
149−<screen>
150−##### Reviewed points
151−
152−- [ ] package name fits guidelines
153−- [ ] package version fits guidelines
154−- [ ] package build on ARCHITECTURE
155−- [ ] executables tested on ARCHITECTURE
156−- [ ] all depending packages build
157−
158−##### Possible improvements
159−
160−##### Comments
161−
162−</screen>
163− </example>
164− </section>
165− <section xml:id="reviewing-contributions-new-packages">
166− <title>New packages</title>
167−
168− <para>
169− New packages are a common type of pull requests. These pull requests consists in adding a new nix-expression for a package.
170− </para>
171−
172− <para>
173− Reviewing process:
174− </para>
175−
176− <itemizedlist>
177− <listitem>
178− <para>
179− Ensure that the package versioning is fitting the guidelines.
180− </para>
181− </listitem>
182− <listitem>
183− <para>
184− Ensure that the commit name is fitting the guidelines.
185− </para>
186− </listitem>
187− <listitem>
188− <para>
189− Ensure that the meta field contains correct information.
190− </para>
191− <itemizedlist>
192− <listitem>
193− <para>
194− License must be checked to be fitting upstream license.
195− </para>
196− </listitem>
197− <listitem>
198− <para>
199− Platforms should be set or the package will not get binary substitutes.
200− </para>
201− </listitem>
202− <listitem>
203− <para>
204− A maintainer must be set. This can be the package submitter or a community member that accepts to take maintainership of the package.
205− </para>
206− </listitem>
207− </itemizedlist>
208− </listitem>
209− <listitem>
210− <para>
211− Ensure that the code contains no typos.
212− </para>
213− </listitem>
214− <listitem>
215− <para>
216− Ensure the package source.
217− </para>
218− <itemizedlist>
219− <listitem>
220− <para>
221− Mirrors urls should be used when available.
222− </para>
223− </listitem>
224− <listitem>
225− <para>
226− The most appropriate function should be used (e.g. packages from GitHub should use <literal>fetchFromGitHub</literal>).
227− </para>
228− </listitem>
229− </itemizedlist>
230− </listitem>
231− <listitem>
232− <para>
233− Building the package locally.
234− </para>
235− </listitem>
236− <listitem>
237− <para>
238− Running every binary.
239− </para>
240− </listitem>
241− </itemizedlist>
242−
243− <example xml:id="reviewing-contributions-sample-new-package">
244− <title>Sample template for a new package review</title>
245−<screen>
246−##### Reviewed points
247−
248−- [ ] package path fits guidelines
249−- [ ] package name fits guidelines
250−- [ ] package version fits guidelines
251−- [ ] package build on ARCHITECTURE
252−- [ ] executables tested on ARCHITECTURE
253−- [ ] `meta.description` is set and fits guidelines
254−- [ ] `meta.license` fits upstream license
255−- [ ] `meta.platforms` is set
256−- [ ] `meta.maintainers` is set
257−- [ ] build time only dependencies are declared in `nativeBuildInputs`
258−- [ ] source is fetched using the appropriate function
259−- [ ] phases are respected
260−- [ ] patches that are remotely available are fetched with `fetchpatch`
261−
262−##### Possible improvements
263−
264−##### Comments
265−
266−</screen>
267− </example>
268− </section>
269− <section xml:id="reviewing-contributions-module-updates">
270− <title>Module updates</title>
271−
272− <para>
273− Module updates are submissions changing modules in some ways. These often contains changes to the options or introduce new options.
274− </para>
275−
276− <para>
277− Reviewing process
278− </para>
279−
280− <itemizedlist>
281− <listitem>
282− <para>
283− Ensure that the module maintainers are notified.
284− </para>
285− <itemizedlist>
286− <listitem>
287− <para>
288− <link xlink:href="https://help.github.com/articles/about-codeowners/">CODEOWNERS</link> will make GitHub notify users based on the submitted changes, but it can happen that it misses some of the package maintainers.
289− </para>
290− </listitem>
291− </itemizedlist>
292− </listitem>
293− <listitem>
294− <para>
295− Ensure that the module tests, if any, are succeeding.
296− </para>
297− </listitem>
298− <listitem>
299− <para>
300− Ensure that the introduced options are correct.
301− </para>
302− <itemizedlist>
303− <listitem>
304− <para>
305− Type should be appropriate (string related types differs in their merging capabilities, <literal>optionSet</literal> and <literal>string</literal> types are deprecated).
306− </para>
307− </listitem>
308− <listitem>
309− <para>
310− Description, default and example should be provided.
311− </para>
312− </listitem>
313− </itemizedlist>
314− </listitem>
315− <listitem>
316− <para>
317− Ensure that option changes are backward compatible.
318− </para>
319− <itemizedlist>
320− <listitem>
321− <para>
322− <literal>mkRenamedOptionModule</literal> and <literal>mkAliasOptionModule</literal> functions provide way to make option changes backward compatible.
323− </para>
324− </listitem>
325− </itemizedlist>
326− </listitem>
327− <listitem>
328− <para>
329− Ensure that removed options are declared with <literal>mkRemovedOptionModule</literal>
330− </para>
331− </listitem>
332− <listitem>
333− <para>
334− Ensure that changes that are not backward compatible are mentioned in release notes.
335− </para>
336− </listitem>
337− <listitem>
338− <para>
339− Ensure that documentations affected by the change is updated.
340− </para>
341− </listitem>
342− </itemizedlist>
343−
344− <example xml:id="reviewing-contributions-sample-module-update">
345− <title>Sample template for a module update review</title>
346−<screen>
347−##### Reviewed points
348−
349−- [ ] changes are backward compatible
350−- [ ] removed options are declared with `mkRemovedOptionModule`
351−- [ ] changes that are not backward compatible are documented in release notes
352−- [ ] module tests succeed on ARCHITECTURE
353−- [ ] options types are appropriate
354−- [ ] options description is set
355−- [ ] options example is provided
356−- [ ] documentation affected by the changes is updated
357−
358−##### Possible improvements
359−
360−##### Comments
361−
362−</screen>
363− </example>
364− </section>
365− <section xml:id="reviewing-contributions-new-modules">
366− <title>New modules</title>
367−
368− <para>
369− New modules submissions introduce a new module to NixOS.
370− </para>
371−
372− <itemizedlist>
373− <listitem>
374− <para>
375− Ensure that the module tests, if any, are succeeding.
376− </para>
377− </listitem>
378− <listitem>
379− <para>
380− Ensure that the introduced options are correct.
381− </para>
382− <itemizedlist>
383− <listitem>
384− <para>
385− Type should be appropriate (string related types differs in their merging capabilities, <literal>optionSet</literal> and <literal>string</literal> types are deprecated).
386− </para>
387− </listitem>
388− <listitem>
389− <para>
390− Description, default and example should be provided.
391− </para>
392− </listitem>
393− </itemizedlist>
394− </listitem>
395− <listitem>
396− <para>
397− Ensure that module <literal>meta</literal> field is present
398− </para>
399− <itemizedlist>
400− <listitem>
401− <para>
402− Maintainers should be declared in <literal>meta.maintainers</literal>.
403− </para>
404− </listitem>
405− <listitem>
406− <para>
407− Module documentation should be declared with <literal>meta.doc</literal>.
408− </para>
409− </listitem>
410− </itemizedlist>
411− </listitem>
412− <listitem>
413− <para>
414− Ensure that the module respect other modules functionality.
415− </para>
416− <itemizedlist>
417− <listitem>
418− <para>
419− For example, enabling a module should not open firewall ports by default.
420− </para>
421− </listitem>
422− </itemizedlist>
423− </listitem>
424− </itemizedlist>
425−
426− <example xml:id="reviewing-contributions-sample-new-module">
427− <title>Sample template for a new module review</title>
428−<screen>
429−##### Reviewed points
430−
431−- [ ] module path fits the guidelines
432−- [ ] module tests succeed on ARCHITECTURE
433−- [ ] options have appropriate types
434−- [ ] options have default
435−- [ ] options have example
436−- [ ] options have descriptions
437−- [ ] No unneeded package is added to environment.systemPackages
438−- [ ] meta.maintainers is set
439−- [ ] module documentation is declared in meta.doc
440−
441−##### Possible improvements
442−
443−##### Comments
444−
445−</screen>
446− </example>
447− </section>
448− <section xml:id="reviewing-contributions-other-submissions">
449− <title>Other submissions</title>
450−
451− <para>
452− Other type of submissions requires different reviewing steps.
453− </para>
454−
455− <para>
456− If you consider having enough knowledge and experience in a topic and would like to be a long-term reviewer for related submissions, please contact the current reviewers for that topic. They will give you information about the reviewing process. The main reviewers for a topic can be hard to find as there is no list, but checking past pull requests to see who reviewed or git-blaming the code to see who committed to that topic can give some hints.
457− </para>
458−
459− <para>
460− Container system, boot system and library changes are some examples of the pull requests fitting this category.
461− </para>
462− </section>
463− <section xml:id="reviewing-contributions--merging-pull-requests">
464− <title>Merging pull requests</title>
465−
466− <para>
467− It is possible for community members that have enough knowledge and experience on a special topic to contribute by merging pull requests.
468− </para>
469−
470− <para>
471− TODO: add the procedure to request merging rights.
472− </para>
473−
474−<!--
475−The following paragraph about how to deal with unactive contributors is just a
476−proposition and should be modified to what the community agrees to be the right
477−policy.
478−
479−<para>Please note that contributors with commit rights unactive for more than
480− three months will have their commit rights revoked.</para>
481−-->
482−
483− <para>
484− In a case a contributor definitively leaves the Nix community, they should create an issue or post on <link
485− xlink:href="https://discourse.nixos.org">Discourse</link> with references of packages and modules they maintain so the maintainership can be taken over by other contributors.
486− </para>
487− </section>
488−</chapter>
doc/contributing/submitting-changes.chapter.mdnew file+292
@@ -0,0 +1,292 @@
1+# Submitting changes {#chap-submitting-changes}
2+
3+## Making patches {#submitting-changes-making-patches}
4+
5+- Read [Manual (How to write packages for Nix)](https://nixos.org/nixpkgs/manual/).
6+
7+- Fork [the Nixpkgs repository](https://github.com/nixos/nixpkgs/) on GitHub.
8+
9+- Create a branch for your future fix.
10+
11+ - You can make branch from a commit of your local `nixos-version`. That will help you to avoid additional local compilations. Because you will receive packages from binary cache. For example
12+
13+ ```ShellSession
14+ $ nixos-version --hash
15+ 0998212
16+ $ git checkout 0998212
17+ $ git checkout -b 'fix/pkg-name-update'
18+ ```
19+
20+ - Please avoid working directly on the `master` branch.
21+
22+- Make commits of logical units.
23+
24+- If you removed pkgs or made some major NixOS changes, write about it in the release notes for the next stable release. For example `nixos/doc/manual/release-notes/rl-2003.xml`.
25+
26+- Check for unnecessary whitespace with `git diff --check` before committing.
27+
28+- Format the commit in a following way:
29+
30+ ```
31+ (pkg-name | nixos/<module>): (from -> to | init at version | refactor | etc)
32+ Additional information.
33+ ```
34+
35+ - Examples:
36+ - `nginx: init at 2.0.1`
37+ - `firefox: 54.0.1 -> 55.0`
38+ - `nixos/hydra: add bazBaz option`
39+ - `nixos/nginx: refactor config generation`
40+
41+- Test your changes. If you work with
42+
43+ - nixpkgs:
44+
45+ - update pkg
46+ - `nix-env -iA pkg-attribute-name -f <path to your local nixpkgs folder>`
47+ - add pkg
48+ - Make sure it’s in `pkgs/top-level/all-packages.nix`
49+ - `nix-env -iA pkg-attribute-name -f <path to your local nixpkgs folder>`
50+ - _If you don’t want to install pkg in you profile_.
51+ - `nix-build -A pkg-attribute-name <path to your local nixpkgs folder>` and check results in the folder `result`. It will appear in the same directory where you did `nix-build`.
52+ - If you installed your package with `nix-env`, you can run `nix-env -e pkg-name` where `pkg-name` is as reported by `nix-env -q` to uninstall it from your system.
53+
54+ - NixOS and its modules:
55+ - You can add new module to your NixOS configuration file (usually it’s `/etc/nixos/configuration.nix`). And do `sudo nixos-rebuild test -I nixpkgs=<path to your local nixpkgs folder> --fast`.
56+
57+- If you have commits `pkg-name: oh, forgot to insert whitespace`: squash commits in this case. Use `git rebase -i`.
58+
59+- [Rebase](https://git-scm.com/book/en/v2/Git-Branching-Rebasing) your branch against current `master`.
60+
61+## Submitting changes {#submitting-changes-submitting-changes}
62+
63+- Push your changes to your fork of nixpkgs.
64+- Create the pull request
65+- Follow [the contribution guidelines](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md#submitting-changes).
66+
67+## Submitting security fixes {#submitting-changes-submitting-security-fixes}
68+
69+Security fixes are submitted in the same way as other changes and thus the same guidelines apply.
70+
71+- If a new version fixing the vulnerability has been released, update the package;
72+- If the security fix comes in the form of a patch and a CVE is available, then add the patch to the Nixpkgs tree, and apply it to the package.
73+ The name of the patch should be the CVE identifier, so e.g. `CVE-2019-13636.patch`; If a patch is fetched the name needs to be set as well, e.g.:
74+
75+ ```nix
76+ (fetchpatch {
77+ name = "CVE-2019-11068.patch";
78+ url = "https://gitlab.gnome.org/GNOME/libxslt/commit/e03553605b45c88f0b4b2980adfbbb8f6fca2fd6.patch";
79+ sha256 = "0pkpb4837km15zgg6h57bncp66d5lwrlvkr73h0lanywq7zrwhj8";
80+ })
81+ ```
82+
83+If a security fix applies to both master and a stable release then, similar to regular changes, they are preferably delivered via master first and cherry-picked to the release branch.
84+
85+Critical security fixes may by-pass the staging branches and be delivered directly to release branches such as `master` and `release-*`.
86+
87+## Deprecating/removing packages {#submitting-changes-deprecating-packages}
88+
89+There is currently no policy when to remove a package.
90+
91+Before removing a package, one should try to find a new maintainer or fix smaller issues first.
92+
93+### Steps to remove a package from Nixpkgs {#steps-to-remove-a-package-from-nixpkgs}
94+
95+We use jbidwatcher as an example for a discontinued project here.
96+
97+1. Have Nixpkgs checked out locally and up to date.
98+1. Create a new branch for your change, e.g. `git checkout -b jbidwatcher`
99+1. Remove the actual package including its directory, e.g. `git rm -rf pkgs/applications/misc/jbidwatcher`
100+1. Remove the package from the list of all packages (`pkgs/top-level/all-packages.nix`).
101+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.)
102+
103+ For example in this case:
104+
105+ ```
106+ jbidwatcher = throw "jbidwatcher was discontinued in march 2021"; # added 2021-03-15
107+ ```
108+
109+ The throw message should explain in short why the package was removed for users that still have it installed.
110+
111+1. Test if the changes introduced any issues by running `nix-env -qaP -f . --show-trace`. It should show the list of packages without errors.
112+1. Commit the changes. Explain again why the package was removed. If it was declared discontinued upstream, add a link to the source.
113+
114+ ```ShellSession
115+ $ git add pkgs/applications/misc/jbidwatcher/default.nix pkgs/top-level/all-packages.nix pkgs/top-level/aliases.nix
116+ $ git commit
117+ ```
118+
119+ Example commit message:
120+
121+ ```
122+ jbidwatcher: remove
123+
124+ project was discontinued in march 2021. the program does not work anymore because ebay changed the login.
125+
126+ https://web.archive.org/web/20210315205723/http://www.jbidwatcher.com/
127+ ```
128+
129+1. Push changes to your GitHub fork with `git push`
130+1. Create a pull request against Nixpkgs. Mention the package maintainer.
131+
132+This is how the pull request looks like in this case: [https://github.com/NixOS/nixpkgs/pull/116470](https://github.com/NixOS/nixpkgs/pull/116470)
133+
134+## Pull Request Template {#submitting-changes-pull-request-template}
135+
136+The pull request template helps determine what steps have been made for a contribution so far, and will help guide maintainers on the status of a change. The motivation section of the PR should include any extra details the title does not address and link any existing issues related to the pull request.
137+
138+When a PR is created, it will be pre-populated with some checkboxes detailed below:
139+
140+### Tested using sandboxing {#submitting-changes-tested-with-sandbox}
141+
142+When sandbox builds are enabled, Nix will setup an isolated environment for each build process. It is used to remove further hidden dependencies set by the build environment to improve reproducibility. This includes access to the network during the build outside of `fetch*` functions and files outside the Nix store. Depending on the operating system access to other resources are blocked as well (ex. inter process communication is isolated on Linux); see [sandbox](https://nixos.org/nix/manual/#conf-sandbox) in Nix manual for details.
143+
144+Sandboxing is not enabled by default in Nix due to a small performance hit on each build. In pull requests for [nixpkgs](https://github.com/NixOS/nixpkgs/) people are asked to test builds with sandboxing enabled (see `Tested using sandboxing` in the pull request template) because in<https://nixos.org/hydra/> sandboxing is also used.
145+
146+Depending if you use NixOS or other platforms you can use one of the following methods to enable sandboxing **before** building the package:
147+
148+- **Globally enable sandboxing on NixOS**: add the following to `configuration.nix`
149+
150+ ```nix
151+ nix.useSandbox = true;
152+ ```
153+
154+- **Globally enable sandboxing on non-NixOS platforms**: add the following to: `/etc/nix/nix.conf`
155+
156+ ```ini
157+ sandbox = true
158+ ```
159+
160+### Built on platform(s) {#submitting-changes-platform-diversity}
161+
162+Many Nix packages are designed to run on multiple platforms. As such, it’s important to let the maintainer know which platforms your changes have been tested on. It’s not always practical to test a change on all platforms, and is not required for a pull request to be merged. Only check the systems you tested the build on in this section.
163+
164+### Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests) {#submitting-changes-nixos-tests}
165+
166+Packages with automated tests are much more likely to be merged in a timely fashion because it doesn’t require as much manual testing by the maintainer to verify the functionality of the package. If there are existing tests for the package, they should be run to verify your changes do not break the tests. Tests can only be run on Linux. For more details on writing and running tests, see the [section in the NixOS manual](https://nixos.org/nixos/manual/index.html#sec-nixos-tests).
167+
168+### Tested compilation of all pkgs that depend on this change using `nixpkgs-review` {#submitting-changes-tested-compilation}
169+
170+If you are updating a package’s version, you can use nixpkgs-review to make sure all packages that depend on the updated package still compile correctly. The `nixpkgs-review` utility can look for and build all dependencies either based on uncommited changes with the `wip` option or specifying a github pull request number.
171+
172+review changes from pull request number 12345:
173+
174+```ShellSession
175+nix run nixpkgs.nixpkgs-review -c nixpkgs-review pr 12345
176+```
177+
178+review uncommitted changes:
179+
180+```ShellSession
181+nix run nixpkgs.nixpkgs-review -c nixpkgs-review wip
182+```
183+
184+review changes from last commit:
185+
186+```ShellSession
187+nix run nixpkgs.nixpkgs-review -c nixpkgs-review rev HEAD
188+```
189+
190+### Tested execution of all binary files (usually in `./result/bin/`) {#submitting-changes-tested-execution}
191+
192+It’s important to test any executables generated by a build when you change or create a package in nixpkgs. This can be done by looking in `./result/bin` and running any files in there, or at a minimum, the main executable for the package. For example, if you make a change to texlive, you probably would only check the binaries associated with the change you made rather than testing all of them.
193+
194+### Meets Nixpkgs contribution standards {#submitting-changes-contribution-standards}
195+
196+The last checkbox is fits [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md). The contributing document has detailed information on standards the Nix community has for commit messages, reviews, licensing of contributions you make to the project, etc\... Everyone should read and understand the standards the community has for contributing before submitting a pull request.
197+
198+## Hotfixing pull requests {#submitting-changes-hotfixing-pull-requests}
199+
200+- Make the appropriate changes in you branch.
201+- Don’t create additional commits, do
202+ - `git rebase -i`
203+ - `git push --force` to your branch.
204+
205+## Commit policy {#submitting-changes-commit-policy}
206+
207+- Commits must be sufficiently tested before being merged, both for the master and staging branches.
208+- Hydra builds for master and staging should not be used as testing platform, it’s a build farm for changes that have been already tested.
209+- When changing the bootloader installation process, extra care must be taken. Grub installations cannot be rolled back, hence changes may break people’s installations forever. For any non-trivial change to the bootloader please file a PR asking for review, especially from \@edolstra.
210+
211+```{.graphviz caption="Staging workflow"}
212+digraph {
213+ "small changes" [shape=none]
214+ "mass-rebuilds and other large changes" [shape=none]
215+ "critical security fixes" [shape=none]
216+ "broken staging-next fixes" [shape=none]
217+
218+ "small changes" -> master
219+ "mass-rebuilds and other large changes" -> staging
220+ "critical security fixes" -> master
221+ "broken staging-next fixes" -> "staging-next"
222+
223+ "staging-next" -> master [color="#E85EB0"] [label="stabilization ends"] [fontcolor="#E85EB0"]
224+ "staging" -> "staging-next" [color="#E85EB0"] [label="stabilization starts"] [fontcolor="#E85EB0"]
225+
226+ master -> "staging-next" -> staging [color="#5F5EE8"] [label="every six hours (GitHub Action)"] [fontcolor="#5F5EE8"]
227+}
228+```
229+
230+[This GitHub Action](https://github.com/NixOS/nixpkgs/blob/master/.github/workflows/periodic-merge-6h.yml) brings changes from `master` to `staging-next` and from `staging-next` to `staging` every 6 hours.
231+
232+
233+### Master branch {#submitting-changes-master-branch}
234+
235+The `master` branch is the main development branch. It should only see non-breaking commits that do not cause mass rebuilds.
236+
237+### Staging branch {#submitting-changes-staging-branch}
238+
239+The `staging` branch is a development branch where mass-rebuilds go. It should only see non-breaking mass-rebuild commits. That means it is not to be used for testing, and changes must have been well tested already. If the branch is already in a broken state, please refrain from adding extra new breakages.
240+
241+### Staging-next branch {#submitting-changes-staging-next-branch}
242+
243+The `staging-next` branch is for stabilizing mass-rebuilds submitted to the `staging` branch prior to merging them into `master`. Mass-rebuilds must go via the `staging` branch. It must only see non-breaking commits that are fixing issues blocking it from being merged into the `master ` branch.
244+
245+If the branch is already in a broken state, please refrain from adding extra new breakages. Stabilize it for a few days and then merge into master.
246+
247+### Stable release branches {#submitting-changes-stable-release-branches}
248+
249+The same staging workflow applies to stable release branches, but the main branch is called `release-*` instead of `master`.
250+
251+Example branch names: `release-21.11`, `staging-21.11`, `staging-next-21.11`.
252+
253+Most changes added to the stable release branches are cherry-picked (“backported”) from the `master` and staging branches.
254+
255+#### Automatically backporting a Pull Request {#submitting-changes-stable-release-branches-automatic-backports}
256+
257+Assign label `backport <branch>` (e.g. `backport release-21.11`) to the PR and a backport PR is automatically created after the PR is merged.
258+
259+#### Manually backporting changes {#submitting-changes-stable-release-branches-manual-backports}
260+
261+Cherry-pick changes via `git cherry-pick -x <original commit>` so that the original commit id is included in the commit message.
262+
263+Add a reason for the backport when it is not obvious from the original commit message. You can do this by cherry picking with `git cherry-pick -xe <original commit>`, which allows editing the commit message. This is not needed for minor version updates that include security and bug fixes but don't add new features or when the commit fixes an otherwise broken package.
264+
265+Here is an example of a cherry-picked commit message with good reason description:
266+
267+```
268+zfs: Keep trying root import until it works
269+
270+Works around #11003.
271+
272+(cherry picked from commit 98b213a11041af39b39473906b595290e2a4e2f9)
273+
274+Reason: several people cannot boot with ZFS on NVMe
275+```
276+
277+Other examples of reasons are:
278+
279+- Previously the build would fail due to, e.g., `getaddrinfo` not being defined
280+- The previous download links were all broken
281+- Crash when starting on some X11 systems
282+
283+#### Acceptable backport criteria
284+
285+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.
286+
287+However, many changes are able to be backported, including:
288+- New Packages / Modules
289+- Security / Patch updates
290+- Version updates which include new functionality (but no breaking changes)
291+- Services which require a client to be up-to-date regardless. (E.g. `spotify`, `steam`, or `discord`)
292+- Security critical applications (E.g. `firefox`)
doc/contributing/submitting-changes.xmldeleted−455
@@ -1,455 +0,0 @@
1−<chapter xmlns="http://docbook.org/ns/docbook"
2− xmlns:xlink="http://www.w3.org/1999/xlink"
3− xml:id="chap-submitting-changes">
4− <title>Submitting changes</title>
5− <section xml:id="submitting-changes-making-patches">
6− <title>Making patches</title>
7−
8− <itemizedlist>
9− <listitem>
10− <para>
11− Read <link xlink:href="https://nixos.org/nixpkgs/manual/">Manual (How to write packages for Nix)</link>.
12− </para>
13− </listitem>
14− <listitem>
15− <para>
16− Fork <link xlink:href="https://github.com/nixos/nixpkgs/">the Nixpkgs repository</link> on GitHub.
17− </para>
18− </listitem>
19− <listitem>
20− <para>
21− Create a branch for your future fix.
22− <itemizedlist>
23− <listitem>
24− <para>
25− You can make branch from a commit of your local <command>nixos-version</command>. That will help you to avoid additional local compilations. Because you will receive packages from binary cache. For example
26−<screen>
27−<prompt>$ </prompt>nixos-version --hash
28−0998212
29−<prompt>$ </prompt>git checkout 0998212
30−<prompt>$ </prompt>git checkout -b 'fix/pkg-name-update'
31−</screen>
32− </para>
33− </listitem>
34− <listitem>
35− <para>
36− Please avoid working directly on the <command>master</command> branch.
37− </para>
38− </listitem>
39− </itemizedlist>
40− </para>
41− </listitem>
42− <listitem>
43− <para>
44− Make commits of logical units.
45− </para>
46− </listitem>
47− <listitem>
48− <para>
49− If you removed pkgs or made some major NixOS changes, write about it in the release notes for the next stable release. For example <command>nixos/doc/manual/release-notes/rl-2003.xml</command>.
50− </para>
51− </listitem>
52− <listitem>
53− <para>
54− Check for unnecessary whitespace with <command>git diff --check</command> before committing.
55− </para>
56− </listitem>
57− <listitem>
58− <para>
59− Format the commit in a following way:
60− </para>
61−<programlisting>
62−(pkg-name | nixos/&lt;module>): (from -> to | init at version | refactor | etc)
63−Additional information.
64−</programlisting>
65− <itemizedlist>
66− <listitem>
67− <para>
68− Examples:
69− <itemizedlist>
70− <listitem>
71− <para>
72− <command>nginx: init at 2.0.1</command>
73− </para>
74− </listitem>
75− <listitem>
76− <para>
77− <command>firefox: 54.0.1 -> 55.0</command>
78− </para>
79− </listitem>
80− <listitem>
81− <para>
82− <command>nixos/hydra: add bazBaz option</command>
83− </para>
84− </listitem>
85− <listitem>
86− <para>
87− <command>nixos/nginx: refactor config generation</command>
88− </para>
89− </listitem>
90− </itemizedlist>
91− </para>
92− </listitem>
93− </itemizedlist>
94− </listitem>
95− <listitem>
96− <para>
97− Test your changes. If you work with
98− <itemizedlist>
99− <listitem>
100− <para>
101− nixpkgs:
102− <itemizedlist>
103− <listitem>
104− <para>
105− update pkg ->
106− <itemizedlist>
107− <listitem>
108− <para>
109− <command>nix-env -i pkg-name -f &lt;path to your local nixpkgs folder&gt;</command>
110− </para>
111− </listitem>
112− </itemizedlist>
113− </para>
114− </listitem>
115− <listitem>
116− <para>
117− add pkg ->
118− <itemizedlist>
119− <listitem>
120− <para>
121− Make sure it's in <command>pkgs/top-level/all-packages.nix</command>
122− </para>
123− </listitem>
124− <listitem>
125− <para>
126− <command>nix-env -i pkg-name -f &lt;path to your local nixpkgs folder&gt;</command>
127− </para>
128− </listitem>
129− </itemizedlist>
130− </para>
131− </listitem>
132− <listitem>
133− <para>
134− <emphasis>If you don't want to install pkg in you profile</emphasis>.
135− <itemizedlist>
136− <listitem>
137− <para>
138− <command>nix-build -A pkg-attribute-name &lt;path to your local nixpkgs folder&gt;/default.nix</command> and check results in the folder <command>result</command>. It will appear in the same directory where you did <command>nix-build</command>.
139− </para>
140− </listitem>
141− </itemizedlist>
142− </para>
143− </listitem>
144− <listitem>
145− <para>
146− If you did <command>nix-env -i pkg-name</command> you can do <command>nix-env -e pkg-name</command> to uninstall it from your system.
147− </para>
148− </listitem>
149− </itemizedlist>
150− </para>
151− </listitem>
152− <listitem>
153− <para>
154− NixOS and its modules:
155− <itemizedlist>
156− <listitem>
157− <para>
158− You can add new module to your NixOS configuration file (usually it's <command>/etc/nixos/configuration.nix</command>). And do <command>sudo nixos-rebuild test -I nixpkgs=&lt;path to your local nixpkgs folder&gt; --fast</command>.
159− </para>
160− </listitem>
161− </itemizedlist>
162− </para>
163− </listitem>
164− </itemizedlist>
165− </para>
166− </listitem>
167− <listitem>
168− <para>
169− If you have commits <command>pkg-name: oh, forgot to insert whitespace</command>: squash commits in this case. Use <command>git rebase -i</command>.
170− </para>
171− </listitem>
172− <listitem>
173− <para>
174− <link xlink:href="https://git-scm.com/book/en/v2/Git-Branching-Rebasing">Rebase</link> your branch against current <command>master</command>.
175− </para>
176− </listitem>
177− </itemizedlist>
178− </section>
179− <section xml:id="submitting-changes-submitting-changes">
180− <title>Submitting changes</title>
181−
182− <itemizedlist>
183− <listitem>
184− <para>
185− Push your changes to your fork of nixpkgs.
186− </para>
187− </listitem>
188− <listitem>
189− <para>
190− Create the pull request
191− </para>
192− </listitem>
193− <listitem>
194− <para>
195− Follow <link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/.github/CONTRIBUTING.md#submitting-changes">the contribution guidelines</link>.
196− </para>
197− </listitem>
198− </itemizedlist>
199− </section>
200− <section xml:id="submitting-changes-submitting-security-fixes">
201− <title>Submitting security fixes</title>
202−
203− <para>
204− Security fixes are submitted in the same way as other changes and thus the same guidelines apply.
205− </para>
206−
207− <para>
208− If the security fix comes in the form of a patch and a CVE is available, then the name of the patch should be the CVE identifier, so e.g. <literal>CVE-2019-13636.patch</literal> in the case of a patch that is included in the Nixpkgs tree. If a patch is fetched the name needs to be set as well, e.g.:
209− </para>
210−
211−<programlisting>
212−(fetchpatch {
213− name = "CVE-2019-11068.patch";
214− url = "https://gitlab.gnome.org/GNOME/libxslt/commit/e03553605b45c88f0b4b2980adfbbb8f6fca2fd6.patch";
215− sha256 = "0pkpb4837km15zgg6h57bncp66d5lwrlvkr73h0lanywq7zrwhj8";
216−})
217−</programlisting>
218−
219− <para>
220− If a security fix applies to both master and a stable release then, similar to regular changes, they are preferably delivered via master first and cherry-picked to the release branch.
221− </para>
222−
223− <para>
224− Critical security fixes may by-pass the staging branches and be delivered directly to release branches such as <literal>master</literal> and <literal>release-*</literal>.
225− </para>
226− </section>
227− <section xml:id="submitting-changes-pull-request-template">
228− <title>Pull Request Template</title>
229−
230− <para>
231− The pull request template helps determine what steps have been made for a contribution so far, and will help guide maintainers on the status of a change. The motivation section of the PR should include any extra details the title does not address and link any existing issues related to the pull request.
232− </para>
233−
234− <para>
235− When a PR is created, it will be pre-populated with some checkboxes detailed below:
236− </para>
237−
238− <section xml:id="submitting-changes-tested-with-sandbox">
239− <title>Tested using sandboxing</title>
240−
241− <para>
242− When sandbox builds are enabled, Nix will setup an isolated environment for each build process. It is used to remove further hidden dependencies set by the build environment to improve reproducibility. This includes access to the network during the build outside of <function>fetch*</function> functions and files outside the Nix store. Depending on the operating system access to other resources are blocked as well (ex. inter process communication is isolated on Linux); see <link
243− xlink:href="https://nixos.org/nix/manual/#conf-sandbox">sandbox</link> in Nix manual for details.
244− </para>
245−
246− <para>
247− Sandboxing is not enabled by default in Nix due to a small performance hit on each build. In pull requests for <link
248− xlink:href="https://github.com/NixOS/nixpkgs/">nixpkgs</link> people are asked to test builds with sandboxing enabled (see <literal>Tested using sandboxing</literal> in the pull request template) because in<link
249− xlink:href="https://nixos.org/hydra/">https://nixos.org/hydra/</link> sandboxing is also used.
250− </para>
251−
252− <para>
253− Depending if you use NixOS or other platforms you can use one of the following methods to enable sandboxing <emphasis role="bold">before</emphasis> building the package:
254− <itemizedlist>
255− <listitem>
256− <para>
257− <emphasis role="bold">Globally enable sandboxing on NixOS</emphasis>: add the following to <filename>configuration.nix</filename>
258−<screen>nix.useSandbox = true;</screen>
259− </para>
260− </listitem>
261− <listitem>
262− <para>
263− <emphasis role="bold">Globally enable sandboxing on non-NixOS platforms</emphasis>: add the following to: <filename>/etc/nix/nix.conf</filename>
264−<screen>sandbox = true</screen>
265− </para>
266− </listitem>
267− </itemizedlist>
268− </para>
269− </section>
270−
271− <section xml:id="submitting-changes-platform-diversity">
272− <title>Built on platform(s)</title>
273−
274− <para>
275− Many Nix packages are designed to run on multiple platforms. As such, it's important to let the maintainer know which platforms your changes have been tested on. It's not always practical to test a change on all platforms, and is not required for a pull request to be merged. Only check the systems you tested the build on in this section.
276− </para>
277− </section>
278−
279− <section xml:id="submitting-changes-nixos-tests">
280− <title>Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)</title>
281−
282− <para>
283− Packages with automated tests are much more likely to be merged in a timely fashion because it doesn't require as much manual testing by the maintainer to verify the functionality of the package. If there are existing tests for the package, they should be run to verify your changes do not break the tests. Tests only apply to packages with NixOS modules defined and can only be run on Linux. For more details on writing and running tests, see the <link
284− xlink:href="https://nixos.org/nixos/manual/index.html#sec-nixos-tests">section in the NixOS manual</link>.
285− </para>
286− </section>
287−
288− <section xml:id="submitting-changes-tested-compilation">
289− <title>Tested compilation of all pkgs that depend on this change using <command>nixpkgs-review</command></title>
290−
291− <para>
292− If you are updating a package's version, you can use nixpkgs-review to make sure all packages that depend on the updated package still compile correctly. The <command>nixpkgs-review</command> utility can look for and build all dependencies either based on uncommited changes with the <literal>wip</literal> option or specifying a github pull request number.
293− </para>
294−
295− <para>
296− review changes from pull request number 12345:
297− <screen>nix run nixpkgs.nixpkgs-review -c nixpkgs-review pr 12345</screen>
298− </para>
299−
300− <para>
301− review uncommitted changes:
302− <screen>nix run nixpkgs.nixpkgs-review -c nixpkgs-review wip</screen>
303− </para>
304−
305− <para>
306− review changes from last commit:
307− <screen>nix run nixpkgs.nixpkgs-review -c nixpkgs-review rev HEAD</screen>
308− </para>
309− </section>
310−
311− <section xml:id="submitting-changes-tested-execution">
312− <title>Tested execution of all binary files (usually in <filename>./result/bin/</filename>)</title>
313−
314− <para>
315− It's important to test any executables generated by a build when you change or create a package in nixpkgs. This can be done by looking in <filename>./result/bin</filename> and running any files in there, or at a minimum, the main executable for the package. For example, if you make a change to <package>texlive</package>, you probably would only check the binaries associated with the change you made rather than testing all of them.
316− </para>
317− </section>
318−
319− <section xml:id="submitting-changes-contribution-standards">
320− <title>Meets Nixpkgs contribution standards</title>
321−
322− <para>
323− The last checkbox is fits <link
324− xlink:href="https://github.com/NixOS/nixpkgs/blob/master/.github/CONTRIBUTING.md">CONTRIBUTING.md</link>. The contributing document has detailed information on standards the Nix community has for commit messages, reviews, licensing of contributions you make to the project, etc... Everyone should read and understand the standards the community has for contributing before submitting a pull request.
325− </para>
326− </section>
327− </section>
328− <section xml:id="submitting-changes-hotfixing-pull-requests">
329− <title>Hotfixing pull requests</title>
330−
331− <itemizedlist>
332− <listitem>
333− <para>
334− Make the appropriate changes in you branch.
335− </para>
336− </listitem>
337− <listitem>
338− <para>
339− Don't create additional commits, do
340− <itemizedlist>
341− <listitem>
342− <para>
343− <command>git rebase -i</command>
344− </para>
345− </listitem>
346− <listitem>
347− <para>
348− <command>git push --force</command> to your branch.
349− </para>
350− </listitem>
351− </itemizedlist>
352− </para>
353− </listitem>
354− </itemizedlist>
355− </section>
356− <section xml:id="submitting-changes-commit-policy">
357− <title>Commit policy</title>
358−
359− <itemizedlist>
360− <listitem>
361− <para>
362− Commits must be sufficiently tested before being merged, both for the master and staging branches.
363− </para>
364− </listitem>
365− <listitem>
366− <para>
367− Hydra builds for master and staging should not be used as testing platform, it's a build farm for changes that have been already tested.
368− </para>
369− </listitem>
370− <listitem>
371− <para>
372− When changing the bootloader installation process, extra care must be taken. Grub installations cannot be rolled back, hence changes may break people's installations forever. For any non-trivial change to the bootloader please file a PR asking for review, especially from @edolstra.
373− </para>
374− </listitem>
375− </itemizedlist>
376−
377− <section xml:id="submitting-changes-master-branch">
378− <title>Master branch</title>
379− <para>
380− The <literal>master</literal> branch is the main development branch.
381− It should only see non-breaking commits that do not cause mass rebuilds.
382− </para>
383− </section>
384−
385− <section xml:id="submitting-changes-staging-branch">
386− <title>Staging branch</title>
387− <para>
388− The <literal>staging</literal> branch is a development branch where mass-rebuilds go.
389− It should only see non-breaking mass-rebuild commits.
390− That means it is not to be used for testing, and changes must have been well tested already.
391− If the branch is already in a broken state, please refrain from adding extra new breakages.
392− </para>
393− </section>
394−
395− <section xml:id="submitting-changes-staging-next-branch">
396− <title>Staging-next branch</title>
397− <para>
398− The <literal>staging-next</literal> branch is for stabilizing mass-rebuilds submitted to the <literal>staging</literal> branch prior to merging them into <literal>master</literal>.
399− Mass-rebuilds should go via the <literal>staging</literal> branch.
400− It should only see non-breaking commits that are fixing issues blocking it from being merged into the <literal>master </literal> branch.
401− </para>
402− <para>
403− If the branch is already in a broken state, please refrain from adding extra new breakages. Stabilize it for a few days and then merge into master.
404− </para>
405− </section>
406−
407− <section xml:id="submitting-changes-stable-release-branches">
408− <title>Stable release branches</title>
409−
410− <para>
411− For cherry-picking a commit to a stable release branch (<quote>backporting</quote>), use <literal>git cherry-pick -x &lt;original commit&gt;</literal> so that the original commit id is included in the commit.
412− </para>
413−
414− <para>
415− Add a reason for the backport by using <literal>git cherry-pick -xe &lt;original commit&gt;</literal> instead when it is not obvious from the original commit message. It is not needed when it’s a minor version update that includes security and bug fixes but don’t add new features or when the commit fixes an otherwise broken package.
416− </para>
417−
418− <para>
419− Here is an example of a cherry-picked commit message with good reason description:
420− </para>
421−
422−<screen>
423−zfs: Keep trying root import until it works
424−
425−Works around #11003.
426−
427−(cherry picked from commit 98b213a11041af39b39473906b595290e2a4e2f9)
428−
429−Reason: several people cannot boot with ZFS on NVMe
430−</screen>
431−
432− <para>
433− Other examples of reasons are:
434− </para>
435−
436− <itemizedlist spacing="compact">
437− <listitem>
438− <para>
439− Previously the build would fail due to, e.g., <literal>getaddrinfo</literal> not being defined
440− </para>
441− </listitem>
442− <listitem>
443− <para>
444− The previous download links were all broken
445− </para>
446− </listitem>
447− <listitem>
448− <para>
449− Crash when starting on some X11 systems
450− </para>
451− </listitem>
452− </itemizedlist>
453− </section>
454− </section>
455−</chapter>
doc/contributing/vulnerability-roundup.chapter.mdnew file+45
@@ -0,0 +1,45 @@
1+# Vulnerability Roundup {#chap-vulnerability-roundup}
2+
3+## Issues {#vulnerability-roundup-issues}
4+
5+Vulnerable packages in Nixpkgs are managed using issues.
6+Currently opened ones can be found using the following:
7+
8+[github.com/NixOS/nixpkgs/issues?q=is:issue+is:open+"Vulnerability+roundup"](https://github.com/NixOS/nixpkgs/issues?q=is%3Aissue+is%3Aopen+%22Vulnerability+roundup%22)
9+
10+Each issue correspond to a vulnerable version of a package; As a consequence:
11+
12+- One issue can contain several CVEs;
13+- One CVE can be shared across several issues;
14+- A single package can be concerned by several issues.
15+
16+
17+A "Vulnerability roundup" issue usually respects the following format:
18+
19+```txt
20+<link to relevant package search on search.nix.gsc.io>, <link to relevant files in Nixpkgs on GitHub>
21+
22+<list of related CVEs, their CVSS score, and the impacted NixOS version>
23+
24+<list of the scanned Nixpkgs versions>
25+
26+<list of relevant contributors>
27+```
28+
29+Note that there can be an extra comment containing links to previously reported (and still open) issues for the same package.
30+
31+
32+## Triaging and Fixing {#vulnerability-roundup-triaging-and-fixing}
33+
34+**Note**: An issue can be a "false positive" (i.e. automatically opened, but without the package it refers to being actually vulnerable).
35+If you find such a "false positive", comment on the issue an explanation of why it falls into this category, linking as much information as the necessary to help maintainers double check.
36+
37+If you are investigating a "true positive":
38+
39+- Find the earliest patched version or a code patch in the CVE details;
40+- Is the issue already patched (version up-to-date or patch applied manually) in Nixpkgs's `master` branch?
41+ - **No**:
42+ - [Submit a security fix](#submitting-changes-submitting-security-fixes);
43+ - Once the fix is merged into `master`, [submit the change to the vulnerable release branch(es)](https://nixos.org/manual/nixpkgs/stable/#submitting-changes-stable-release-branches);
44+ - **Yes**: [Backport the change to the vulnerable release branch(es)](https://nixos.org/manual/nixpkgs/stable/#submitting-changes-stable-release-branches).
45+- When the patch has made it into all the relevant branches (`master`, and the vulnerable releases), close the relevant issue(s).
doc/default.nix+13−2
@@ -5,9 +5,17 @@ let
55in pkgs.stdenv.mkDerivation {
66 name = "nixpkgs-manual";
77
8− buildInputs = with pkgs; [ pandoc libxml2 libxslt zip jing xmlformat ];
8+ nativeBuildInputs = with pkgs; [
9+ pandoc
10+ graphviz
11+ libxml2
12+ libxslt
13+ zip
14+ jing
15+ xmlformat
16+ ];
917
10− src = ./.;
18+ src = lib.cleanSource ./.;
1119
1220 postPatch = ''
1321 ln -s ${doc-support} ./doc-support/result
@@ -25,4 +33,7 @@ in pkgs.stdenv.mkDerivation {
2533 echo "doc manual $dest manual.html" >> $out/nix-support/hydra-build-products
2634 echo "doc manual $dest nixpkgs-manual.epub" >> $out/nix-support/hydra-build-products
2735 '';
36+
37+ # Environment variables
38+ PANDOC_LUA_FILTERS_DIR = "${pkgs.pandoc-lua-filters}/share/pandoc/filters";
2839}
doc/doc-support/lib-function-docs.nix+1
@@ -22,5 +22,6 @@ with pkgs; stdenv.mkDerivation {
2222 docgen lists 'List manipulation functions'
2323 docgen debug 'Debugging functions'
2424 docgen options 'NixOS / nixpkgs option handling'
25+ docgen sources 'Source filtering functions'
2526 '';
2627}
doc/functions.xml+4−4
@@ -7,8 +7,8 @@
77 The nixpkgs repository has several utility functions to manipulate Nix expressions.
88 </para>
99 <xi:include href="functions/library.xml" />
10− <xi:include href="functions/generators.xml" />
11− <xi:include href="functions/debug.xml" />
12− <xi:include href="functions/prefer-remote-fetch.xml" />
13− <xi:include href="functions/nix-gitignore.xml" />
10+ <xi:include href="functions/generators.section.xml" />
11+ <xi:include href="functions/debug.section.xml" />
12+ <xi:include href="functions/prefer-remote-fetch.section.xml" />
13+ <xi:include href="functions/nix-gitignore.section.xml" />
1414</chapter>
doc/functions/debug.section.mdnew file+5
@@ -0,0 +1,5 @@
1+# Debugging Nix Expressions {#sec-debug}
2+
3+Nix is a unityped, dynamic language, this means every value can potentially appear anywhere. Since it is also non-strict, evaluation order and what ultimately is evaluated might surprise you. Therefore it is important to be able to debug nix expressions.
4+
5+In the `lib/debug.nix` file you will find a number of functions that help (pretty-)printing values while evaluation is running. You can even specify how deep these values should be printed recursively, and transform them on the fly. Please consult the docstrings in `lib/debug.nix` for usage information.
doc/functions/debug.xmldeleted−14
@@ -1,14 +0,0 @@
1−<section xmlns="http://docbook.org/ns/docbook"
2− xmlns:xlink="http://www.w3.org/1999/xlink"
3− xmlns:xi="http://www.w3.org/2001/XInclude"
4− xml:id="sec-debug">
5− <title>Debugging Nix Expressions</title>
6−
7− <para>
8− Nix is a unityped, dynamic language, this means every value can potentially appear anywhere. Since it is also non-strict, evaluation order and what ultimately is evaluated might surprise you. Therefore it is important to be able to debug nix expressions.
9− </para>
10−
11− <para>
12− In the <literal>lib/debug.nix</literal> file you will find a number of functions that help (pretty-)printing values while evaluation is runnnig. You can even specify how deep these values should be printed recursively, and transform them on the fly. Please consult the docstrings in <literal>lib/debug.nix</literal> for usage information.
13− </para>
14−</section>
doc/functions/generators.section.mdnew file+56
@@ -0,0 +1,56 @@
1+# Generators {#sec-generators}
2+Generators are functions that create file formats from nix data structures, e. g. for configuration files. There are generators available for: `INI`, `JSON` and `YAML`
3+
4+All generators follow a similar call interface: `generatorName configFunctions data`, where `configFunctions` is an attrset of user-defined functions that format nested parts of the content. They each have common defaults, so often they do not need to be set manually. An example is `mkSectionName ? (name: libStr.escape [ "[" "]" ] name)` from the `INI` generator. It receives the name of a section and sanitizes it. The default `mkSectionName` escapes `[` and `]` with a backslash.
5+
6+Generators can be fine-tuned to produce exactly the file format required by your application/service. One example is an INI-file format which uses `: ` as separator, the strings `"yes"`/`"no"` as boolean values and requires all string values to be quoted:
7+
8+```nix
9+with lib;
10+let
11+ customToINI = generators.toINI {
12+ # specifies how to format a key/value pair
13+ mkKeyValue = generators.mkKeyValueDefault {
14+ # specifies the generated string for a subset of nix values
15+ mkValueString = v:
16+ if v == true then ''"yes"''
17+ else if v == false then ''"no"''
18+ else if isString v then ''"${v}"''
19+ # and delegats all other values to the default generator
20+ else generators.mkValueStringDefault {} v;
21+ } ":";
22+ };
23+
24+# the INI file can now be given as plain old nix values
25+in customToINI {
26+ main = {
27+ pushinfo = true;
28+ autopush = false;
29+ host = "localhost";
30+ port = 42;
31+ };
32+ mergetool = {
33+ merge = "diff3";
34+ };
35+}
36+```
37+
38+This will produce the following INI file as nix string:
39+
40+```INI
41+[main]
42+autopush:"no"
43+host:"localhost"
44+port:42
45+pushinfo:"yes"
46+str\:ange:"very::strange"
47+
48+[mergetool]
49+merge:"diff3"
50+```
51+
52+::: {.note}
53+Nix store paths can be converted to strings by enclosing a derivation attribute like so: `"${drv}"`.
54+:::
55+
56+Detailed documentation for each generator can be found in `lib/generators.nix`.
doc/functions/generators.xmldeleted−74
@@ -1,74 +0,0 @@
1−<section xmlns="http://docbook.org/ns/docbook"
2− xmlns:xlink="http://www.w3.org/1999/xlink"
3− xmlns:xi="http://www.w3.org/2001/XInclude"
4− xml:id="sec-generators">
5− <title>Generators</title>
6−
7− <para>
8− Generators are functions that create file formats from nix data structures, e. g. for configuration files. There are generators available for: <literal>INI</literal>, <literal>JSON</literal> and <literal>YAML</literal>
9− </para>
10−
11− <para>
12− All generators follow a similar call interface: <code>generatorName configFunctions data</code>, where <literal>configFunctions</literal> is an attrset of user-defined functions that format nested parts of the content. They each have common defaults, so often they do not need to be set manually. An example is <code>mkSectionName ? (name: libStr.escape [ "[" "]" ] name)</code> from the <literal>INI</literal> generator. It receives the name of a section and sanitizes it. The default <literal>mkSectionName</literal> escapes <literal>[</literal> and <literal>]</literal> with a backslash.
13− </para>
14−
15− <para>
16− Generators can be fine-tuned to produce exactly the file format required by your application/service. One example is an INI-file format which uses <literal>: </literal> as separator, the strings <literal>"yes"</literal>/<literal>"no"</literal> as boolean values and requires all string values to be quoted:
17− </para>
18−
19−<programlisting>
20−with lib;
21−let
22− customToINI = generators.toINI {
23− # specifies how to format a key/value pair
24− mkKeyValue = generators.mkKeyValueDefault {
25− # specifies the generated string for a subset of nix values
26− mkValueString = v:
27− if v == true then ''"yes"''
28− else if v == false then ''"no"''
29− else if isString v then ''"${v}"''
30− # and delegats all other values to the default generator
31− else generators.mkValueStringDefault {} v;
32− } ":";
33− };
34−
35−# the INI file can now be given as plain old nix values
36−in customToINI {
37− main = {
38− pushinfo = true;
39− autopush = false;
40− host = "localhost";
41− port = 42;
42− };
43− mergetool = {
44− merge = "diff3";
45− };
46−}
47−</programlisting>
48−
49− <para>
50− This will produce the following INI file as nix string:
51− </para>
52−
53−<programlisting>
54−[main]
55−autopush:"no"
56−host:"localhost"
57−port:42
58−pushinfo:"yes"
59−str\:ange:"very::strange"
60−
61−[mergetool]
62−merge:"diff3"
63−</programlisting>
64−
65− <note>
66− <para>
67− Nix store paths can be converted to strings by enclosing a derivation attribute like so: <code>"${drv}"</code>.
68− </para>
69− </note>
70−
71− <para>
72− Detailed documentation for each generator can be found in <literal>lib/generators.nix</literal>.
73− </para>
74−</section>
doc/functions/library.xml+2
@@ -25,4 +25,6 @@
2525 <xi:include href="./library/generated/debug.xml" />
2626
2727 <xi:include href="./library/generated/options.xml" />
28+
29+ <xi:include href="./library/generated/sources.xml" />
2830</section>
doc/functions/library/asserts.xml+1−1
@@ -103,7 +103,7 @@ stderr> assert failed
103103 <title>Ensuring a user provided a possible value</title>
104104<programlisting><![CDATA[
105105let sslLibrary = "bearssl";
106−in lib.asserts.assertOneOf "sslLibrary" sslLibrary [ "openssl" "bearssl" ];
106+in lib.asserts.assertOneOf "sslLibrary" sslLibrary [ "openssl" "libressl" ];
107107=> false
108108stderr> trace: sslLibrary must be one of "openssl", "libressl", but is: "bearssl"
109109 ]]></programlisting>
doc/functions/library/attrsets.xml+43−6
@@ -7,7 +7,7 @@
77 <section xml:id="function-library-lib.attrsets.attrByPath">
88 <title><function>lib.attrset.attrByPath</function></title>
99
10− <subtitle><literal>attrByPath :: [String] -> Any -> AttrSet</literal>
10+ <subtitle><literal>attrByPath :: [String] -> Any -> AttrSet -> Any</literal>
1111 </subtitle>
1212
1313 <xi:include href="./locations.xml" xpointer="lib.attrsets.attrByPath" />
@@ -772,7 +772,7 @@ nameValuePair "some" 6
772772 <title>Modifying each value of an attribute set</title>
773773<programlisting><![CDATA[
774774lib.attrsets.mapAttrs
775− (name: value: name + "-" value)
775+ (name: value: name + "-" + value)
776776 { x = "foo"; y = "bar"; }
777777=> { x = "x-foo"; y = "y-bar"; }
778778]]></programlisting>
@@ -855,7 +855,7 @@ lib.attrsets.mapAttrs' (name: value: lib.attrsets.nameValuePair ("foo_" + name)
855855 <title><function>lib.attrsets.mapAttrsToList</function></title>
856856
857857 <subtitle><literal>mapAttrsToList :: (String -> Any -> Any) ->
858− AttrSet -> Any</literal>
858+ AttrSet -> [Any]</literal>
859859 </subtitle>
860860
861861 <xi:include href="./locations.xml" xpointer="lib.attrsets.mapAttrsToList" />
@@ -1474,7 +1474,7 @@ lib.attrsets.zipAttrsWith
14741474 <section xml:id="function-library-lib.attrsets.zipAttrs">
14751475 <title><function>lib.attrsets.zipAttrs</function></title>
14761476
1477− <subtitle><literal>zipAttrsWith :: [ AttrSet ] -> AttrSet</literal>
1477+ <subtitle><literal>zipAttrs :: [ AttrSet ] -> AttrSet</literal>
14781478 </subtitle>
14791479
14801480 <xi:include href="./locations.xml" xpointer="lib.attrsets.zipAttrs" />
@@ -1677,8 +1677,7 @@ recursiveUpdate
16771677 <xi:include href="./locations.xml" xpointer="lib.attrsets.recurseIntoAttrs" />
16781678
16791679 <para>
1680− Make various Nix tools consider the contents of the resulting
1681− attribute set when looking for what to build, find, etc.
1680+ Make various Nix tools consider the contents of the resulting attribute set when looking for what to build, find, etc.
16821681 </para>
16831682
16841683 <para>
@@ -1711,4 +1710,42 @@ recursiveUpdate
17111710 </example>
17121711 </section>
17131712
1713+ <section xml:id="function-library-lib.attrsets.cartesianProductOfSets">
1714+ <title><function>lib.attrsets.cartesianProductOfSets</function></title>
1715+
1716+ <subtitle><literal>cartesianProductOfSets :: AttrSet -> [ AttrSet ]</literal>
1717+ </subtitle>
1718+
1719+ <xi:include href="./locations.xml" xpointer="lib.attrsets.cartesianProductOfSets" />
1720+
1721+ <para>
1722+ Return the cartesian product of attribute set value combinations.
1723+ </para>
1724+
1725+ <variablelist>
1726+ <varlistentry>
1727+ <term>
1728+ <varname>set</varname>
1729+ </term>
1730+ <listitem>
1731+ <para>
1732+ An attribute set with attributes that carry lists of values.
1733+ </para>
1734+ </listitem>
1735+ </varlistentry>
1736+ </variablelist>
1737+
1738+ <example xml:id="function-library-lib.attrsets.cartesianProductOfSets-example">
1739+ <title>Creating the cartesian product of a list of attribute values</title>
1740+<programlisting><![CDATA[
1741+cartesianProductOfSets { a = [ 1 2 ]; b = [ 10 20 ]; }
1742+=> [
1743+ { a = 1; b = 10; }
1744+ { a = 1; b = 20; }
1745+ { a = 2; b = 10; }
1746+ { a = 2; b = 20; }
1747+ ]
1748+]]></programlisting>
1749+ </example>
1750+ </section>
17141751</section>
doc/functions/nix-gitignore.section.mdnew file+49
@@ -0,0 +1,49 @@
1+# pkgs.nix-gitignore {#sec-pkgs-nix-gitignore}
2+
3+`pkgs.nix-gitignore` is a function that acts similarly to `builtins.filterSource` but also allows filtering with the help of the gitignore format.
4+
5+## Usage {#sec-pkgs-nix-gitignore-usage}
6+
7+`pkgs.nix-gitignore` exports a number of functions, but you\'ll most likely need either `gitignoreSource` or `gitignoreSourcePure`. As their first argument, they both accept either 1. a file with gitignore lines or 2. a string with gitignore lines, or 3. a list of either of the two. They will be concatenated into a single big string.
8+
9+```nix
10+{ pkgs ? import <nixpkgs> {} }:
11+
12+ nix-gitignore.gitignoreSource [] ./source
13+ # Simplest version
14+
15+ nix-gitignore.gitignoreSource "supplemental-ignores\n" ./source
16+ # This one reads the ./source/.gitignore and concats the auxiliary ignores
17+
18+ nix-gitignore.gitignoreSourcePure "ignore-this\nignore-that\n" ./source
19+ # Use this string as gitignore, don't read ./source/.gitignore.
20+
21+ nix-gitignore.gitignoreSourcePure ["ignore-this\nignore-that\n", ~/.gitignore] ./source
22+ # It also accepts a list (of strings and paths) that will be concatenated
23+ # once the paths are turned to strings via readFile.
24+```
25+
26+These functions are derived from the `Filter` functions by setting the first filter argument to `(_: _: true)`:
27+
28+```nix
29+gitignoreSourcePure = gitignoreFilterSourcePure (_: _: true);
30+gitignoreSource = gitignoreFilterSource (_: _: true);
31+```
32+
33+Those filter functions accept the same arguments the `builtins.filterSource` function would pass to its filters, thus `fn: gitignoreFilterSourcePure fn ""` should be extensionally equivalent to `filterSource`. The file is blacklisted if it\'s blacklisted by either your filter or the gitignoreFilter.
34+
35+If you want to make your own filter from scratch, you may use
36+
37+```nix
38+gitignoreFilter = ign: root: filterPattern (gitignoreToPatterns ign) root;
39+```
40+
41+## gitignore files in subdirectories {#sec-pkgs-nix-gitignore-usage-recursive}
42+
43+If you wish to use a filter that would search for .gitignore files in subdirectories, just like git does by default, use this function:
44+
45+```nix
46+gitignoreFilterRecursiveSource = filter: patterns: root:
47+# OR
48+gitignoreRecursiveSource = gitignoreFilterSourcePure (_: _: true);
49+```
doc/functions/nix-gitignore.xmldeleted−70
@@ -1,70 +0,0 @@
1−<section xmlns="http://docbook.org/ns/docbook"
2− xmlns:xlink="http://www.w3.org/1999/xlink"
3− xmlns:xi="http://www.w3.org/2001/XInclude"
4− xml:id="sec-pkgs-nix-gitignore">
5− <title>pkgs.nix-gitignore</title>
6−
7− <para>
8− <function>pkgs.nix-gitignore</function> is a function that acts similarly to <literal>builtins.filterSource</literal> but also allows filtering with the help of the gitignore format.
9− </para>
10−
11− <section xml:id="sec-pkgs-nix-gitignore-usage">
12− <title>Usage</title>
13−
14− <para>
15− <literal>pkgs.nix-gitignore</literal> exports a number of functions, but you'll most likely need either <literal>gitignoreSource</literal> or <literal>gitignoreSourcePure</literal>. As their first argument, they both accept either 1. a file with gitignore lines or 2. a string with gitignore lines, or 3. a list of either of the two. They will be concatenated into a single big string.
16− </para>
17−
18−<programlisting><![CDATA[
19−{ pkgs ? import <nixpkgs> {} }:
20−
21− nix-gitignore.gitignoreSource [] ./source
22− # Simplest version
23−
24− nix-gitignore.gitignoreSource "supplemental-ignores\n" ./source
25− # This one reads the ./source/.gitignore and concats the auxiliary ignores
26−
27− nix-gitignore.gitignoreSourcePure "ignore-this\nignore-that\n" ./source
28− # Use this string as gitignore, don't read ./source/.gitignore.
29−
30− nix-gitignore.gitignoreSourcePure ["ignore-this\nignore-that\n", ~/.gitignore] ./source
31− # It also accepts a list (of strings and paths) that will be concatenated
32− # once the paths are turned to strings via readFile.
33− ]]></programlisting>
34−
35− <para>
36− These functions are derived from the <literal>Filter</literal> functions by setting the first filter argument to <literal>(_: _: true)</literal>:
37− </para>
38−
39−<programlisting><![CDATA[
40−gitignoreSourcePure = gitignoreFilterSourcePure (_: _: true);
41−gitignoreSource = gitignoreFilterSource (_: _: true);
42− ]]></programlisting>
43−
44− <para>
45− Those filter functions accept the same arguments the <literal>builtins.filterSource</literal> function would pass to its filters, thus <literal>fn: gitignoreFilterSourcePure fn ""</literal> should be extensionally equivalent to <literal>filterSource</literal>. The file is blacklisted iff it's blacklisted by either your filter or the gitignoreFilter.
46− </para>
47−
48− <para>
49− If you want to make your own filter from scratch, you may use
50− </para>
51−
52−<programlisting><![CDATA[
53−gitignoreFilter = ign: root: filterPattern (gitignoreToPatterns ign) root;
54− ]]></programlisting>
55− </section>
56−
57− <section xml:id="sec-pkgs-nix-gitignore-usage-recursive">
58− <title>gitignore files in subdirectories</title>
59−
60− <para>
61− If you wish to use a filter that would search for .gitignore files in subdirectories, just like git does by default, use this function:
62− </para>
63−
64−<programlisting><![CDATA[
65−gitignoreFilterRecursiveSource = filter: patterns: root:
66−# OR
67−gitignoreRecursiveSource = gitignoreFilterSourcePure (_: _: true);
68− ]]></programlisting>
69− </section>
70−</section>
doc/functions/prefer-remote-fetch.section.mdnew file+17
@@ -0,0 +1,17 @@
1+# prefer-remote-fetch overlay {#sec-prefer-remote-fetch}
2+
3+`prefer-remote-fetch` is an overlay that download sources on remote builder. This is useful when the evaluating machine has a slow upload while the builder can fetch faster directly from the source. To use it, put the following snippet as a new overlay:
4+
5+```nix
6+self: super:
7+ (super.prefer-remote-fetch self super)
8+```
9+
10+A full configuration example for that sets the overlay up for your own account, could look like this
11+
12+```ShellSession
13+$ mkdir ~/.config/nixpkgs/overlays/
14+$ cat > ~/.config/nixpkgs/overlays/prefer-remote-fetch.nix <<EOF
15+ self: super: super.prefer-remote-fetch self super
16+EOF
17+```
doc/functions/prefer-remote-fetch.xmldeleted−21
@@ -1,21 +0,0 @@
1−<section xmlns="http://docbook.org/ns/docbook"
2− xmlns:xlink="http://www.w3.org/1999/xlink"
3− xmlns:xi="http://www.w3.org/2001/xinclude"
4− xml:id="sec-prefer-remote-fetch">
5− <title>prefer-remote-fetch overlay</title>
6−
7− <para>
8− <function>prefer-remote-fetch</function> is an overlay that download sources on remote builder. This is useful when the evaluating machine has a slow upload while the builder can fetch faster directly from the source. To use it, put the following snippet as a new overlay:
9−<programlisting>
10−self: super:
11− (super.prefer-remote-fetch self super)
12−</programlisting>
13− A full configuration example for that sets the overlay up for your own account, could look like this
14−<screen>
15−<prompt>$ </prompt>mkdir ~/.config/nixpkgs/overlays/
16−<prompt>$ </prompt>cat &gt; ~/.config/nixpkgs/overlays/prefer-remote-fetch.nix &lt;&lt;EOF
17− self: super: super.prefer-remote-fetch self super
18−EOF
19−</screen>
20− </para>
21−</section>
doc/hooks/index.xmlnew file+10
@@ -0,0 +1,10 @@
1+<chapter xmlns="http://docbook.org/ns/docbook"
2+ xmlns:xlink="http://www.w3.org/1999/xlink"
3+ xmlns:xi="http://www.w3.org/2001/XInclude"
4+ xml:id="chap-hooks">
5+ <title>Hooks reference</title>
6+ <para>
7+ Nixpkgs has several hook packages that augment the stdenv phases.
8+ </para>
9+ <xi:include href="./postgresql-test-hook.section.xml" />
10+</chapter>
doc/hooks/postgresql-test-hook.section.mdnew file+59
@@ -0,0 +1,59 @@
1+
2+# `postgresqlTestHook` {#sec-postgresqlTestHook}
3+
4+This hook starts a PostgreSQL server during the `checkPhase`. Example:
5+
6+```nix
7+{ stdenv, postgresql, postgresqlTestHook }:
8+stdenv.mkDerivation {
9+
10+ # ...
11+
12+ checkInputs = [
13+ postgresql
14+ postgresqlTestHook
15+ ];
16+}
17+```
18+
19+If you use a custom `checkPhase`, remember to add the `runHook` calls:
20+```nix
21+ checkPhase ''
22+ runHook preCheck
23+
24+ # ... your tests
25+
26+ runHook postCheck
27+ ''
28+```
29+
30+## Variables {#sec-postgresqlTestHook-variables}
31+
32+The hook logic will read a number of variables and set them to a default value if unset or empty.
33+
34+Exported variables:
35+
36+ - `PGDATA`: location of server files.
37+ - `PGHOST`: location of UNIX domain socket directory; the default `host` in a connection string.
38+ - `PGUSER`: user to create / log in with, default: `test_user`.
39+ - `PGDATABASE`: database name, default: `test_db`.
40+
41+Bash-only variables:
42+
43+ - `postgresqlTestUserOptions`: SQL options to use when creating the `$PGUSER` role, default: `LOGIN`.
44+ - `postgresqlTestSetupSQL`: SQL commands to run as database administrator after startup, default: statements that create `$PGUSER` and `$PGDATABASE`.
45+ - `postgresqlTestSetupCommands`: bash commands to run after database start, defaults to running `$postgresqlTestSetupSQL` as database administrator.
46+ - `postgresqlEnableTCP`: set to `1` to enable TCP listening. Flaky; not recommended.
47+ - `postgresqlStartCommands`: defaults to `pg_ctl start`.
48+
49+## TCP and the Nix sandbox {#sec-postgresqlTestHook-tcp}
50+
51+`postgresqlEnableTCP` relies on network sandboxing, which is not available on macOS and some custom Nix installations, resulting in flaky tests.
52+For this reason, it is disabled by default.
53+
54+The preferred solution is to make the test suite use a UNIX domain socket connection. This is the default behavior when no `host` connection parameter is provided.
55+Some test suites hardcode a value for `host` though, so a patch may be required. If you can upstream the patch, you can make `host` default to the `PGHOST` environment variable when set. Otherwise, you can patch it locally to omit the `host` connection string parameter altogether.
56+
57+::: {.note}
58+The error `libpq: failed (could not receive data from server: Connection refused` is generally an indication that the test suite is trying to connect through TCP.
59+:::
doc/languages-frameworks/agda.section.md+178−33
@@ -1,67 +1,126 @@
1−---
2−title: Agda
3−author: Alex Rice (alexarice)
4−date: 2020-01-06
5−---
6−# Agda
1+# Agda {#agda}
72
8−## How to use Agda
3+## How to use Agda {#how-to-use-agda}
94
10−Agda can be installed from `agda`:
11−```
12−$ nix-env -iA agda
13−```
5+Agda is available as the [agda](https://search.nixos.org/packages?channel=unstable&show=agda&from=0&size=30&sort=relevance&query=agda)
6+package.
147
15−To use Agda with libraries, the `agda.withPackages` function can be used. This function either takes:
8+The `agda` package installs an Agda-wrapper, which calls `agda` with `--library-file`
9+set to a generated library-file within the nix store, this means your library-file in
10+`$HOME/.agda/libraries` will be ignored. By default the agda package installs Agda
11+with no libraries, i.e. the generated library-file is empty. To use Agda with libraries,
12+the `agda.withPackages` function can be used. This function either takes:
1613
1714* A list of packages,
1815* or a function which returns a list of packages when given the `agdaPackages` attribute set,
1916* or an attribute set containing a list of packages and a GHC derivation for compilation (see below).
17+* or an attribute set containing a function which returns a list of packages when given the `agdaPackages` attribute set and a GHC derivation for compilation (see below).
2018
2119For example, suppose we wanted a version of Agda which has access to the standard library. This can be obtained with the expressions:
2220
23−```
21+```nix
2422agda.withPackages [ agdaPackages.standard-library ]
2523```
2624
2725or
2826
29−```
27+```nix
3028agda.withPackages (p: [ p.standard-library ])
3129```
3230
3331or can be called as in the [Compiling Agda](#compiling-agda) section.
3432
35−If you want to use a library in your home directory (for instance if it is a development version) then typecheck it manually (using `agda.withPackages` if necessary) and then override the `src` attribute of the package to point to your local repository.
33+If you want to use a different version of a library (for instance a development version)
34+override the `src` attribute of the package to point to your local repository
3635
37−Agda will not by default use these libraries. To tell Agda to use the library we have some options:
38−
39−* Call `agda` with the library flag:
36+```nix
37+agda.withPackages (p: [
38+ (p.standard-library.overrideAttrs (oldAttrs: {
39+ version = "local version";
40+ src = /path/to/local/repo/agda-stdlib;
41+ }))
42+])
4043```
41−$ agda -l standard-library -i . MyFile.agda
44+
45+You can also reference a GitHub repository
46+
47+```nix
48+agda.withPackages (p: [
49+ (p.standard-library.overrideAttrs (oldAttrs: {
50+ version = "1.5";
51+ src = fetchFromGitHub {
52+ repo = "agda-stdlib";
53+ owner = "agda";
54+ rev = "v1.5";
55+ sha256 = "16fcb7ssj6kj687a042afaa2gq48rc8abihpm14k684ncihb2k4w";
56+ };
57+ }))
58+])
4259```
43−* Write a `my-library.agda-lib` file for the project you are working on which may look like:
60+
61+If you want to use a library not added to Nixpkgs, you can add a
62+dependency to a local library by calling `agdaPackages.mkDerivation`.
63+
64+```nix
65+agda.withPackages (p: [
66+ (p.mkDerivation {
67+ pname = "your-agda-lib";
68+ version = "1.0.0";
69+ src = /path/to/your-agda-lib;
70+ })
71+])
4472```
45−name: my-library
46−include: .
47−depend: standard-library
73+
74+Again you can reference GitHub
75+
76+```nix
77+agda.withPackages (p: [
78+ (p.mkDerivation {
79+ pname = "your-agda-lib";
80+ version = "1.0.0";
81+ src = fetchFromGitHub {
82+ repo = "repo";
83+ owner = "owner";
84+ version = "...";
85+ rev = "...";
86+ sha256 = "...";
87+ };
88+ })
89+])
4890```
91+
92+See [Building Agda Packages](#building-agda-packages) for more information on `mkDerivation`.
93+
94+Agda will not by default use these libraries. To tell Agda to use a library we have some options:
95+
96+* Call `agda` with the library flag:
97+ ```ShellSession
98+ $ agda -l standard-library -i . MyFile.agda
99+ ```
100+* Write a `my-library.agda-lib` file for the project you are working on which may look like:
101+ ```
102+ name: my-library
103+ include: .
104+ depend: standard-library
105+ ```
49106* Create the file `~/.agda/defaults` and add any libraries you want to use by default.
50107
51108More information can be found in the [official Agda documentation on library management](https://agda.readthedocs.io/en/v2.6.1/tools/package-system.html).
52109
53−## Compiling Agda
54−Agda modules can be compiled with the `--compile` flag. A version of `ghc` with `ieee` is made available to the Agda program via the `--with-compiler` flag.
110+## Compiling Agda {#compiling-agda}
111+
112+Agda modules can be compiled using the GHC backend with the `--compile` flag. A version of `ghc` with `ieee754` is made available to the Agda program via the `--with-compiler` flag.
55113This can be overridden by a different version of `ghc` as follows:
56114
57−```
115+```nix
58116agda.withPackages {
59117 pkgs = [ ... ];
60118 ghc = haskell.compiler.ghcHEAD;
61119}
62120```
63121
64−## Writing Agda packages
122+## Writing Agda packages {#writing-agda-packages}
123+
65124To write a nix derivation for an Agda library, first check that the library has a `*.agda-lib` file.
66125
67126A derivation can then be written using `agdaPackages.mkDerivation`. This has similar arguments to `stdenv.mkDerivation` with the following additions:
@@ -70,27 +129,66 @@ A derivation can then be written using `agdaPackages.mkDerivation`. This has sim
70129* `libraryName` should be the name that appears in the `*.agda-lib` file, defaulting to `pname`.
71130* `libraryFile` should be the file name of the `*.agda-lib` file, defaulting to `${libraryName}.agda-lib`.
72131
73−### Building Agda packages
132+Here is an example `default.nix`
133+
134+```nix
135+{ nixpkgs ? <nixpkgs> }:
136+with (import nixpkgs {});
137+agdaPackages.mkDerivation {
138+ version = "1.0";
139+ pname = "my-agda-lib";
140+ src = ./.;
141+ buildInputs = [
142+ agdaPackages.standard-library
143+ ];
144+}
145+```
146+
147+### Building Agda packages {#building-agda-packages}
148+
74149The default build phase for `agdaPackages.mkDerivation` simply runs `agda` on the `Everything.agda` file.
75150If something else is needed to build the package (e.g. `make`) then the `buildPhase` should be overridden.
76151Additionally, a `preBuild` or `configurePhase` can be used if there are steps that need to be done prior to checking the `Everything.agda` file.
77152`agda` and the Agda libraries contained in `buildInputs` are made available during the build phase.
78153
79−### Installing Agda packages
154+### Installing Agda packages {#installing-agda-packages}
155+
80156The default install phase copies Agda source files, Agda interface files (`*.agdai`) and `*.agda-lib` files to the output directory.
81157This can be overridden.
82158
83159By default, Agda sources are files ending on `.agda`, or literate Agda files ending on `.lagda`, `.lagda.tex`, `.lagda.org`, `.lagda.md`, `.lagda.rst`. The list of recognised Agda source extensions can be extended by setting the `extraExtensions` config variable.
84160
85−## Adding Agda packages to Nixpkgs
161+## Maintaining the Agda package set on Nixpkgs {#maintaining-the-agda-package-set-on-nixpkgs}
162+
163+We are aiming at providing all common Agda libraries as packages on `nixpkgs`,
164+and keeping them up to date.
165+Contributions and maintenance help is always appreciated,
166+but the maintenance effort is typically low since the Agda ecosystem is quite small.
167+
168+The `nixpkgs` Agda package set tries to take up a role similar to that of [Stackage](https://www.stackage.org/) in the Haskell world.
169+It is a curated set of libraries that:
170+
171+1. Always work together.
172+2. Are as up-to-date as possible.
173+
174+While the Haskell ecosystem is huge, and Stackage is highly automatised,
175+the Agda package set is small and can (still) be maintained by hand.
176+
177+### Adding Agda packages to Nixpkgs {#adding-agda-packages-to-nixpkgs}
86178
87179To add an Agda package to `nixpkgs`, the derivation should be written to `pkgs/development/libraries/agda/${library-name}/` and an entry should be added to `pkgs/top-level/agda-packages.nix`. Here it is called in a scope with access to all other Agda libraries, so the top line of the `default.nix` can look like:
88−```
180+
181+```nix
89182{ mkDerivation, standard-library, fetchFromGitHub }:
90183```
91−and `mkDerivation` should be called instead of `agdaPackages.mkDerivation`. Here is an example skeleton derivation for iowa-stdlib:
92184
93−```
185+Note that the derivation function is called with `mkDerivation` set to `agdaPackages.mkDerivation`, therefore you
186+could use a similar set as in your `default.nix` from [Writing Agda Packages](#writing-agda-packages) with
187+`agdaPackages.mkDerivation` replaced with `mkDerivation`.
188+
189+Here is an example skeleton derivation for iowa-stdlib:
190+
191+```nix
94192mkDerivation {
95193 version = "1.5.0";
96194 pname = "iowa-stdlib";
@@ -106,6 +204,53 @@ mkDerivation {
106204 '';
107205}
108206```
207+
109208This library has a file called `.agda-lib`, and so we give an empty string to `libraryFile` as nothing precedes `.agda-lib` in the filename. This file contains `name: IAL-1.3`, and so we let `libraryName = "IAL-1.3"`. This library does not use an `Everything.agda` file and instead has a Makefile, so there is no need to set `everythingFile` and we set a custom `buildPhase`.
110209
111210When writing an Agda package it is essential to make sure that no `.agda-lib` file gets added to the store as a single file (for example by using `writeText`). This causes Agda to think that the nix store is a Agda library and it will attempt to write to it whenever it typechecks something. See [https://github.com/agda/agda/issues/4613](https://github.com/agda/agda/issues/4613).
211+
212+In the pull request adding this library,
213+you can test whether it builds correctly by writing in a comment:
214+
215+```
216+@ofborg build agdaPackages.iowa-stdlib
217+```
218+
219+### Maintaining Agda packages
220+
221+As mentioned before, the aim is to have a compatible, and up-to-date package set.
222+These two conditions sometimes exclude each other:
223+For example, if we update `agdaPackages.standard-library` because there was an upstream release,
224+this will typically break many reverse dependencies,
225+i.e. downstream Agda libraries that depend on the standard library.
226+In `nixpkgs` we are typically among the first to notice this,
227+since we have build tests in place to check this.
228+
229+In a pull request updating e.g. the standard library, you should write the following comment:
230+
231+```
232+@ofborg build agdaPackages.standard-library.passthru.tests
233+```
234+
235+This will build all reverse dependencies of the standard library,
236+for example `agdaPackages.agda-categories`, or `agdaPackages.generic`.
237+
238+In some cases it is useful to build _all_ Agda packages.
239+This can be done with the following Github comment:
240+
241+```
242+@ofborg build agda.passthru.tests.allPackages
243+```
244+
245+Sometimes, the builds of the reverse dependencies fail because they have not yet been updated and released.
246+You should drop the maintainers a quick issue notifying them of the breakage,
247+citing the build error (which you can get from the ofborg logs).
248+If you are motivated, you might even send a pull request that fixes it.
249+Usually, the maintainers will answer within a week or two with a new release.
250+Bumping the version of that reverse dependency should be a further commit on your PR.
251+
252+In the rare case that a new release is not to be expected within an acceptable time,
253+simply mark the broken package as broken by setting `meta.broken = true;`.
254+This will exclude it from the build test.
255+It can be added later when it is fixed,
256+and does not hinder the advancement of the whole package set in the meantime.
doc/languages-frameworks/android.section.md+149−44
@@ -1,15 +1,10 @@
1−---
2−title: Android
3−author: Sander van der Burg
4−date: 2018-11-18
5−---
6−# Android
1+# Android {#android}
72
83The Android build environment provides three major features and a number of
94supporting features.
105
11−Deploying an Android SDK installation with plugins
12−--------------------------------------------------
6+## Deploying an Android SDK installation with plugins {#deploying-an-android-sdk-installation-with-plugins}
7+
138The first use case is deploying the SDK with a desired set of plugins or subsets
149of an SDK.
1510
@@ -18,21 +13,19 @@ with import <nixpkgs> {};
1813
1914let
2015 androidComposition = androidenv.composeAndroidPackages {
21− toolsVersion = "25.2.5";
22− platformToolsVersion = "27.0.1";
23− buildToolsVersions = [ "27.0.3" ];
16+ toolsVersion = "26.1.1";
17+ platformToolsVersion = "30.0.5";
18+ buildToolsVersions = [ "30.0.3" ];
2419 includeEmulator = false;
25− emulatorVersion = "27.2.0";
26− platformVersions = [ "24" ];
20+ emulatorVersion = "30.3.4";
21+ platformVersions = [ "28" "29" "30" ];
2722 includeSources = false;
28− includeDocs = false;
2923 includeSystemImages = false;
30− systemImageTypes = [ "default" ];
31− abiVersions = [ "armeabi-v7a" ];
32− lldbVersions = [ "2.0.2558144" ];
33− cmakeVersions = [ "3.6.4111459" ];
34− includeNDK = false;
35− ndkVersion = "16.1.4479499";
24+ systemImageTypes = [ "google_apis_playstore" ];
25+ abiVersions = [ "armeabi-v7a" "arm64-v8a" ];
26+ cmakeVersions = [ "3.10.2" ];
27+ includeNDK = true;
28+ ndkVersions = ["22.0.7026061"];
3629 useGoogleAPIs = false;
3730 useGoogleTVAddOns = false;
3831 includeExtras = [
@@ -51,17 +44,19 @@ The following parameters are supported:
5144
5245* `toolsVersion`, specifies the version of the tools package to use
5346* `platformsToolsVersion` specifies the version of the `platform-tools` plugin
54−* `buildToolsVersion` specifies the versions of the `build-tools` plugins to
47+* `buildToolsVersions` specifies the versions of the `build-tools` plugins to
5548 use.
5649* `includeEmulator` specifies whether to deploy the emulator package (`false`
5750 by default). When enabled, the version of the emulator to deploy can be
5851 specified by setting the `emulatorVersion` parameter.
59−* `includeDocs` specifies whether the documentation catalog should be included.
60−* `lldbVersions` specifies what LLDB versions should be deployed.
6152* `cmakeVersions` specifies which CMake versions should be deployed.
6253* `includeNDK` specifies that the Android NDK bundle should be included.
6354 Defaults to: `false`.
64−* `ndkVersion` specifies the NDK version that we want to use.
55+* `ndkVersions` specifies the NDK versions that we want to use. These are linked
56+ under the `ndk` directory of the SDK root, and the first is linked under the
57+ `ndk-bundle` directory.
58+* `ndkVersion` is equivalent to specifying one entry in `ndkVersions`, and
59+ `ndkVersions` overrides this parameter if provided.
6560* `includeExtras` is an array of identifier strings referring to arbitrary
6661 add-on packages that should be installed.
6762* `platformVersions` specifies which platform SDK versions should be included.
@@ -87,6 +82,38 @@ For each requested system image we can specify the following options:
8782
8883Most of the function arguments have reasonable default settings.
8984
85+You can specify license names:
86+
87+* `extraLicenses` is a list of license names.
88+ You can get these names from repo.json or `querypackages.sh licenses`. The SDK
89+ license (`android-sdk-license`) is accepted for you if you set accept_license
90+ to true. If you are doing something like working with preview SDKs, you will
91+ want to add `android-sdk-preview-license` or whichever license applies here.
92+
93+Additionally, you can override the repositories that composeAndroidPackages will
94+pull from:
95+
96+* `repoJson` specifies a path to a generated repo.json file. You can generate this
97+ by running `generate.sh`, which in turn will call into `mkrepo.rb`.
98+* `repoXmls` is an attribute set containing paths to repo XML files. If specified,
99+ it takes priority over `repoJson`, and will trigger a local build writing out a
100+ repo.json to the Nix store based on the given repository XMLs.
101+
102+```nix
103+repoXmls = {
104+ packages = [ ./xml/repository2-1.xml ];
105+ images = [
106+ ./xml/android-sys-img2-1.xml
107+ ./xml/android-tv-sys-img2-1.xml
108+ ./xml/android-wear-sys-img2-1.xml
109+ ./xml/android-wear-cn-sys-img2-1.xml
110+ ./xml/google_apis-sys-img2-1.xml
111+ ./xml/google_apis_playstore-sys-img2-1.xml
112+ ];
113+ addons = [ ./xml/addon2-1.xml ];
114+};
115+```
116+
90117When building the above expression with:
91118
92119```bash
@@ -109,8 +136,8 @@ in
109136androidComposition.platform-tools
110137```
111138
112−Using predefine Android package compositions
113−--------------------------------------------
139+## Using predefined Android package compositions {#using-predefined-android-package-compositions}
140+
114141In addition to composing an Android package set manually, it is also possible
115142to use a predefined composition that contains all basic packages for a specific
116143Android version, such as version 9.0 (API-level 28).
@@ -132,12 +159,13 @@ with import <nixpkgs> {};
132159androidenv.androidPkgs_9_0.platform-tools
133160```
134161
135−Building an Android application
136−-------------------------------
162+## Building an Android application {#building-an-android-application}
163+
137164In addition to the SDK, it is also possible to build an Ant-based Android
138165project and automatically deploy all the Android plugins that a project
139166requires.
140167
168+
141169```nix
142170with import <nixpkgs> {};
143171
@@ -172,8 +200,8 @@ to build Android apps. An Android APK gets exposed as a build product and can be
172200installed on any Android device with a web browser by navigating to the build
173201result page.
174202
175−Spawning emulator instances
176−---------------------------
203+## Spawning emulator instances {#spawning-emulator-instances}
204+
177205For testing purposes, it can also be quite convenient to automatically generate
178206scripts that spawn emulator instances with all desired configuration settings.
179207
@@ -214,27 +242,104 @@ androidenv.emulateApp {
214242In addition to prebuilt APKs, you can also bind the APK parameter to a
215243`buildApp {}` function invocation shown in the previous example.
216244
217−Querying the available versions of each plugin
218−----------------------------------------------
219−When using any of the previously shown functions, it may be a bit inconvenient
220−to find out what options are supported, since the Android SDK provides many
221−plugins.
245+## Notes on environment variables in Android projects {#notes-on-environment-variables-in-android-projects}
246+
247+* `ANDROID_SDK_ROOT` should point to the Android SDK. In your Nix expressions, this should be
248+ `${androidComposition.androidsdk}/libexec/android-sdk`. Note that `ANDROID_HOME` is deprecated,
249+ but if you rely on tools that need it, you can export it too.
250+* `ANDROID_NDK_ROOT` should point to the Android NDK, if you're doing NDK development.
251+ In your Nix expressions, this should be `${ANDROID_SDK_ROOT}/ndk-bundle`.
252+
253+If you are running the Android Gradle plugin, you need to export GRADLE_OPTS to override aapt2
254+to point to the aapt2 binary in the Nix store as well, or use a FHS environment so the packaged
255+aapt2 can run. If you don't want to use a FHS environment, something like this should work:
256+
257+```nix
258+let
259+ buildToolsVersion = "30.0.3";
260+
261+ # Use buildToolsVersion when you define androidComposition
262+ androidComposition = <...>;
263+in
264+pkgs.mkShell rec {
265+ ANDROID_SDK_ROOT = "${androidComposition.androidsdk}/libexec/android-sdk";
266+ ANDROID_NDK_ROOT = "${ANDROID_SDK_ROOT}/ndk-bundle";
267+
268+ # Use the same buildToolsVersion here
269+ GRADLE_OPTS = "-Dorg.gradle.project.android.aapt2FromMavenOverride=${ANDROID_SDK_ROOT}/build-tools/${buildToolsVersion}/aapt2";
270+}
271+```
272+
273+If you are using cmake, you need to add it to PATH in a shell hook or FHS env profile.
274+The path is suffixed with a build number, but properly prefixed with the version.
275+So, something like this should suffice:
276+
277+```nix
278+let
279+ cmakeVersion = "3.10.2";
280+
281+ # Use cmakeVersion when you define androidComposition
282+ androidComposition = <...>;
283+in
284+pkgs.mkShell rec {
285+ ANDROID_SDK_ROOT = "${androidComposition.androidsdk}/libexec/android-sdk";
286+ ANDROID_NDK_ROOT = "${ANDROID_SDK_ROOT}/ndk-bundle";
287+
288+ # Use the same cmakeVersion here
289+ shellHook = ''
290+ export PATH="$(echo "$ANDROID_SDK_ROOT/cmake/${cmakeVersion}".*/bin):$PATH"
291+ '';
292+}
293+```
294+
295+Note that running Android Studio with ANDROID_SDK_ROOT set will automatically write a
296+`local.properties` file with `sdk.dir` set to $ANDROID_SDK_ROOT if one does not already
297+exist. If you are using the NDK as well, you may have to add `ndk.dir` to this file.
298+
299+An example shell.nix that does all this for you is provided in examples/shell.nix.
300+This shell.nix includes a shell hook that overwrites local.properties with the correct
301+sdk.dir and ndk.dir values. This will ensure that the SDK and NDK directories will
302+both be correct when you run Android Studio inside nix-shell.
222303
223−A shell script in the `pkgs/development/mobile/androidenv/` sub directory can be used to retrieve all
304+## Notes on improving build.gradle compatibility {#notes-on-improving-build.gradle-compatibility}
305+
306+Ensure that your buildToolsVersion and ndkVersion match what is declared in androidenv.
307+If you are using cmake, make sure its declared version is correct too.
308+
309+Otherwise, you may get cryptic errors from aapt2 and the Android Gradle plugin warning
310+that it cannot install the build tools because the SDK directory is not writeable.
311+
312+```gradle
313+android {
314+ buildToolsVersion "30.0.3"
315+ ndkVersion = "22.0.7026061"
316+ externalNativeBuild {
317+ cmake {
318+ version "3.10.2"
319+ }
320+ }
321+}
322+
323+```
324+
325+## Querying the available versions of each plugin {#querying-the-available-versions-of-each-plugin}
326+
327+repo.json provides all the options in one file now.
328+
329+A shell script in the `pkgs/development/mobile/androidenv/` subdirectory can be used to retrieve all
224330possible options:
225331
226332```bash
227−sh ./querypackages.sh packages build-tools
333+./querypackages.sh packages
228334```
229335
230−The above command-line instruction queries all build-tools versions in the
231−generated `packages.nix` expression.
336+The above command-line instruction queries all package versions in repo.json.
337+
338+## Updating the generated expressions {#updating-the-generated-expressions}
232339
233−Updating the generated expressions
234−----------------------------------
235−Most of the Nix expressions are generated from XML files that the Android
236−package manager uses. To update the expressions run the `generate.sh` script
237−that is stored in the `pkgs/development/mobile/androidenv/` sub directory:
340+repo.json is generated from XML files that the Android Studio package manager uses.
341+To update the expressions run the `generate.sh` script that is stored in the
342+`pkgs/development/mobile/androidenv/` subdirectory:
238343
239344```bash
240345./generate.sh
doc/languages-frameworks/beam.section.mdnew file+373
@@ -0,0 +1,373 @@
1+# BEAM Languages (Erlang, Elixir & LFE) {#sec-beam}
2+
3+## Introduction {#beam-introduction}
4+
5+In this document and related Nix expressions, we use the term, _BEAM_, to describe the environment. BEAM is the name of the Erlang Virtual Machine and, as far as we're concerned, from a packaging perspective, all languages that run on the BEAM are interchangeable. That which varies, like the build system, is transparent to users of any given BEAM package, so we make no distinction.
6+
7+## Available versions and deprecations schedule {#available-versions-and-deprecations-schedule}
8+
9+### Elixir {#elixir}
10+
11+nixpkgs follows the [official elixir deprecation schedule](https://hexdocs.pm/elixir/compatibility-and-deprecations.html) and keeps the last 5 released versions of Elixir available.
12+
13+## Structure {#beam-structure}
14+
15+All BEAM-related expressions are available via the top-level `beam` attribute, which includes:
16+
17+- `interpreters`: a set of compilers running on the BEAM, including multiple Erlang/OTP versions (`beam.interpreters.erlangR22`, etc), Elixir (`beam.interpreters.elixir`) and LFE (Lisp Flavoured Erlang) (`beam.interpreters.lfe`).
18+
19+- `packages`: a set of package builders (Mix and rebar3), each compiled with a specific Erlang/OTP version, e.g. `beam.packages.erlang22`.
20+
21+The default Erlang compiler, defined by `beam.interpreters.erlang`, is aliased as `erlang`. The default BEAM package set is defined by `beam.packages.erlang` and aliased at the top level as `beamPackages`.
22+
23+To create a package builder built with a custom Erlang version, use the lambda, `beam.packagesWith`, which accepts an Erlang/OTP derivation and produces a package builder similar to `beam.packages.erlang`.
24+
25+Many Erlang/OTP distributions available in `beam.interpreters` have versions with ODBC and/or Java enabled or without wx (no observer support). For example, there's `beam.interpreters.erlangR22_odbc_javac`, which corresponds to `beam.interpreters.erlangR22` and `beam.interpreters.erlangR22_nox`, which corresponds to `beam.interpreters.erlangR22`.
26+
27+## Build Tools {#build-tools}
28+
29+### Rebar3 {#build-tools-rebar3}
30+
31+We provide a version of Rebar3, under `rebar3`. We also provide a helper to fetch Rebar3 dependencies from a lockfile under `fetchRebar3Deps`.
32+
33+We also provide a version on Rebar3 with plugins included, under `rebar3WithPlugins`. This package is a function which takes two arguments: `plugins`, a list of nix derivations to include as plugins (loaded only when specified in `rebar.config`), and `globalPlugins`, which should always be loaded by rebar3. Example: `rebar3WithPlugins { globalPlugins = [beamPackages.pc]; }`.
34+
35+When adding a new plugin it is important that the `packageName` attribute is the same as the atom used by rebar3 to refer to the plugin.
36+
37+### Mix & Erlang.mk {#build-tools-other}
38+
39+Erlang.mk works exactly as expected. There is a bootstrap process that needs to be run, which is supported by the `buildErlangMk` derivation.
40+
41+For Elixir applications use `mixRelease` to make a release. See examples for more details.
42+
43+There is also a `buildMix` helper, whose behavior is closer to that of `buildErlangMk` and `buildRebar3`. The primary difference is that mixRelease makes a release, while buildMix only builds the package, making it useful for libraries and other dependencies.
44+
45+## How to Install BEAM Packages {#how-to-install-beam-packages}
46+
47+BEAM builders are not registered at the top level, simply because they are not relevant to the vast majority of Nix users. To install any of those builders into your profile, refer to them by their attribute path `beamPackages.rebar3`:
48+
49+```ShellSession
50+$ nix-env -f "<nixpkgs>" -iA beamPackages.rebar3
51+```
52+
53+## Packaging BEAM Applications {#packaging-beam-applications}
54+
55+### Erlang Applications {#packaging-erlang-applications}
56+
57+#### Rebar3 Packages {#rebar3-packages}
58+
59+The Nix function, `buildRebar3`, defined in `beam.packages.erlang.buildRebar3` and aliased at the top level, can be used to build a derivation that understands how to build a Rebar3 project.
60+
61+If a package needs to compile native code via Rebar3's port compilation mechanism, add `compilePort = true;` to the derivation.
62+
63+#### Erlang.mk Packages {#erlang-mk-packages}
64+
65+Erlang.mk functions similarly to Rebar3, except we use `buildErlangMk` instead of `buildRebar3`.
66+
67+#### Mix Packages {#mix-packages}
68+
69+`mixRelease` is used to make a release in the mix sense. Dependencies will need to be fetched with `fetchMixDeps` and passed to it.
70+
71+#### mixRelease - Elixir Phoenix example {#mix-release-elixir-phoenix-example}
72+
73+there are 3 steps, frontend dependencies (javascript), backend dependencies (elixir) and the final derivation that puts both of those together
74+
75+##### mixRelease - Frontend dependencies (javascript) {#mix-release-javascript-deps}
76+
77+For phoenix projects, inside of nixpkgs you can either use yarn2nix (mkYarnModule) or node2nix. An example with yarn2nix can be found [here](https://github.com/NixOS/nixpkgs/blob/master/pkgs/servers/web-apps/plausible/default.nix#L39). An example with node2nix will follow. To package something outside of nixpkgs, you have alternatives like [npmlock2nix](https://github.com/nix-community/npmlock2nix) or [nix-npm-buildpackage](https://github.com/serokell/nix-npm-buildpackage)
78+
79+##### mixRelease - backend dependencies (mix) {#mix-release-mix-deps}
80+
81+There are 2 ways to package backend dependencies. With mix2nix and with a fixed-output-derivation (FOD).
82+
83+###### mix2nix {#mix2nix}
84+
85+`mix2nix` is a cli tool available in nixpkgs. it will generate a nix expression from a mix.lock file. It is quite standard in the 2nix tool series.
86+
87+Note that currently mix2nix can't handle git dependencies inside the mix.lock file. If you have git dependencies, you can either add them manually (see [example](https://github.com/NixOS/nixpkgs/blob/master/pkgs/servers/pleroma/default.nix#L20)) or use the FOD method.
88+
89+The advantage of using mix2nix is that nix will know your whole dependency graph. On a dependency update, this won't trigger a full rebuild and download of all the dependencies, where FOD will do so.
90+
91+Practical steps:
92+
93+- run `mix2nix > mix_deps.nix` in the upstream repo.
94+- pass `mixNixDeps = with pkgs; import ./mix_deps.nix { inherit lib beamPackages; };` as an argument to mixRelease.
95+
96+If there are git depencencies.
97+
98+- You'll need to fix the version artificially in mix.exs and regenerate the mix.lock with fixed version (on upstream). This will enable you to run `mix2nix > mix_deps.nix`.
99+- From the mix_deps.nix file, remove the dependencies that had git versions and pass them as an override to the import function.
100+
101+```nix
102+ mixNixDeps = import ./mix.nix {
103+ inherit beamPackages lib;
104+ overrides = (final: prev: {
105+ # mix2nix does not support git dependencies yet,
106+ # so we need to add them manually
107+ prometheus_ex = beamPackages.buildMix rec {
108+ name = "prometheus_ex";
109+ version = "3.0.5";
110+
111+ # Change the argument src with the git src that you actually need
112+ src = fetchFromGitLab {
113+ domain = "git.pleroma.social";
114+ group = "pleroma";
115+ owner = "elixir-libraries";
116+ repo = "prometheus.ex";
117+ rev = "a4e9beb3c1c479d14b352fd9d6dd7b1f6d7deee5";
118+ sha256 = "1v0q4bi7sb253i8q016l7gwlv5562wk5zy3l2sa446csvsacnpjk";
119+ };
120+ # you can re-use the same beamDeps argument as generated
121+ beamDeps = with final; [ prometheus ];
122+ };
123+ });
124+};
125+```
126+
127+You will need to run the build process once to fix the sha256 to correspond to your new git src.
128+
129+###### FOD {#fixed-output-derivation}
130+
131+A fixed output derivation will download mix dependencies from the internet. To ensure reproducibility, a hash will be supplied. Note that mix is relatively reproducible. An FOD generating a different hash on each run hasn't been observed (as opposed to npm where the chances are relatively high). See [elixir_ls](https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/beam-modules/elixir_ls.nix) for a usage example of FOD.
132+
133+Practical steps
134+
135+- start with the following argument to mixRelease
136+
137+```nix
138+ mixFodDeps = fetchMixDeps {
139+ pname = "mix-deps-${pname}";
140+ inherit src version;
141+ sha256 = lib.fakeSha256;
142+ };
143+```
144+
145+The first build will complain about the sha256 value, you can replace with the suggested value after that.
146+
147+Note that if after you've replaced the value, nix suggests another sha256, then mix is not fetching the dependencies reproducibly. An FOD will not work in that case and you will have to use mix2nix.
148+
149+##### mixRelease - example {#mix-release-example}
150+
151+Here is how your `default.nix` file would look for a phoenix project.
152+
153+```nix
154+with import <nixpkgs> { };
155+
156+let
157+ # beam.interpreters.erlangR23 is available if you need a particular version
158+ packages = beam.packagesWith beam.interpreters.erlang;
159+
160+ pname = "your_project";
161+ version = "0.0.1";
162+
163+ src = builtins.fetchgit {
164+ url = "ssh://git@github.com/your_id/your_repo";
165+ rev = "replace_with_your_commit";
166+ };
167+
168+ # if using mix2nix you can use the mixNixDeps attribute
169+ mixFodDeps = packages.fetchMixDeps {
170+ pname = "mix-deps-${pname}";
171+ inherit src version;
172+ # nix will complain and tell you the right value to replace this with
173+ sha256 = lib.fakeSha256;
174+ # if you have build time environment variables add them here
175+ MY_ENV_VAR="my_value";
176+ };
177+
178+ nodeDependencies = (pkgs.callPackage ./assets/default.nix { }).shell.nodeDependencies;
179+
180+in packages.mixRelease {
181+ inherit src pname version mixFodDeps;
182+ # if you have build time environment variables add them here
183+ MY_ENV_VAR="my_value";
184+
185+ postBuild = ''
186+ ln -sf ${nodeDependencies}/lib/node_modules assets/node_modules
187+ npm run deploy --prefix ./assets
188+
189+ # for external task you need a workaround for the no deps check flag
190+ # https://github.com/phoenixframework/phoenix/issues/2690
191+ mix do deps.loadpaths --no-deps-check, phx.digest
192+ mix phx.digest --no-deps-check
193+ '';
194+}
195+```
196+
197+Setup will require the following steps:
198+
199+- Move your secrets to runtime environment variables. For more information refer to the [runtime.exs docs](https://hexdocs.pm/mix/Mix.Tasks.Release.html#module-runtime-configuration). On a fresh Phoenix build that would mean that both `DATABASE_URL` and `SECRET_KEY` need to be moved to `runtime.exs`.
200+- `cd assets` and `nix-shell -p node2nix --run node2nix --development` will generate a Nix expression containing your frontend dependencies
201+- commit and push those changes
202+- you can now `nix-build .`
203+- To run the release, set the `RELEASE_TMP` environment variable to a directory that your program has write access to. It will be used to store the BEAM settings.
204+
205+#### Example of creating a service for an Elixir - Phoenix project {#example-of-creating-a-service-for-an-elixir---phoenix-project}
206+
207+In order to create a service with your release, you could add a `service.nix`
208+in your project with the following
209+
210+```nix
211+{config, pkgs, lib, ...}:
212+
213+let
214+ release = pkgs.callPackage ./default.nix;
215+ release_name = "app";
216+ working_directory = "/home/app";
217+in
218+{
219+ systemd.services.${release_name} = {
220+ wantedBy = [ "multi-user.target" ];
221+ after = [ "network.target" "postgresql.service" ];
222+ # note that if you are connecting to a postgres instance on a different host
223+ # postgresql.service should not be included in the requires.
224+ requires = [ "network-online.target" "postgresql.service" ];
225+ description = "my app";
226+ environment = {
227+ # RELEASE_TMP is used to write the state of the
228+ # VM configuration when the system is running
229+ # it needs to be a writable directory
230+ RELEASE_TMP = working_directory;
231+ # can be generated in an elixir console with
232+ # Base.encode32(:crypto.strong_rand_bytes(32))
233+ RELEASE_COOKIE = "my_cookie";
234+ MY_VAR = "my_var";
235+ };
236+ serviceConfig = {
237+ Type = "exec";
238+ DynamicUser = true;
239+ WorkingDirectory = working_directory;
240+ # Implied by DynamicUser, but just to emphasize due to RELEASE_TMP
241+ PrivateTmp = true;
242+ ExecStart = ''
243+ ${release}/bin/${release_name} start
244+ '';
245+ ExecStop = ''
246+ ${release}/bin/${release_name} stop
247+ '';
248+ ExecReload = ''
249+ ${release}/bin/${release_name} restart
250+ '';
251+ Restart = "on-failure";
252+ RestartSec = 5;
253+ StartLimitBurst = 3;
254+ StartLimitInterval = 10;
255+ };
256+ # disksup requires bash
257+ path = [ pkgs.bash ];
258+ };
259+
260+ # in case you have migration scripts or you want to use a remote shell
261+ environment.systemPackages = [ release ];
262+}
263+```
264+
265+## How to Develop {#how-to-develop}
266+
267+### Creating a Shell {#creating-a-shell}
268+
269+Usually, we need to create a `shell.nix` file and do our development inside of the environment specified therein. Just install your version of Erlang and any other interpreters, and then use your normal build tools. As an example with Elixir:
270+
271+```nix
272+{ pkgs ? import <nixpkgs> {} }:
273+
274+with pkgs;
275+let
276+ elixir = beam.packages.erlangR24.elixir_1_12;
277+in
278+mkShell {
279+ buildInputs = [ elixir ];
280+}
281+```
282+
283+### Using an overlay
284+
285+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 `sha256`) and then use this overlay in your development environment:
286+
287+#### `shell.nix`
288+
289+```nix
290+let
291+ elixir_1_13_1_overlay = (self: super: {
292+ elixir_1_13 = super.elixir_1_13.override {
293+ version = "1.13.1";
294+ sha256 = "0z0b1w2vvw4vsnb99779c2jgn9bgslg7b1pmd9vlbv02nza9qj5p";
295+ };
296+ });
297+ pkgs = import <nixpkgs> { overlays = [ elixir_1_13_1_overlay ]; };
298+in
299+with pkgs;
300+mkShell {
301+ buildInputs = [
302+ elixir_1_13
303+ ];
304+}
305+```
306+
307+#### Elixir - Phoenix project {#elixir---phoenix-project}
308+
309+Here is an example `shell.nix`.
310+
311+```nix
312+with import <nixpkgs> { };
313+
314+let
315+ # define packages to install
316+ basePackages = [
317+ git
318+ # replace with beam.packages.erlang.elixir_1_13 if you need
319+ beam.packages.erlang.elixir
320+ nodejs
321+ postgresql_14
322+ # only used for frontend dependencies
323+ # you are free to use yarn2nix as well
324+ nodePackages.node2nix
325+ # formatting js file
326+ nodePackages.prettier
327+ ];
328+
329+ inputs = basePackages ++ lib.optionals stdenv.isLinux [ inotify-tools ]
330+ ++ lib.optionals stdenv.isDarwin
331+ (with darwin.apple_sdk.frameworks; [ CoreFoundation CoreServices ]);
332+
333+ # define shell startup command
334+ hooks = ''
335+ # this allows mix to work on the local directory
336+ mkdir -p .nix-mix .nix-hex
337+ export MIX_HOME=$PWD/.nix-mix
338+ export HEX_HOME=$PWD/.nix-mix
339+ # make hex from Nixpkgs available
340+ # `mix local.hex` will install hex into MIX_HOME and should take precedence
341+ export MIX_PATH="${beam.packages.erlang.hex}/lib/erlang/lib/hex/ebin"
342+ export PATH=$MIX_HOME/bin:$HEX_HOME/bin:$PATH
343+ export LANG=C.UTF-8
344+ # keep your shell history in iex
345+ export ERL_AFLAGS="-kernel shell_history enabled"
346+
347+ # postges related
348+ # keep all your db data in a folder inside the project
349+ export PGDATA="$PWD/db"
350+
351+ # phoenix related env vars
352+ export POOL_SIZE=15
353+ export DB_URL="postgresql://postgres:postgres@localhost:5432/db"
354+ export PORT=4000
355+ export MIX_ENV=dev
356+ # add your project env vars here, word readable in the nix store.
357+ export ENV_VAR="your_env_var"
358+ '';
359+
360+in mkShell {
361+ buildInputs = inputs;
362+ shellHook = hooks;
363+}
364+```
365+
366+Initializing the project will require the following steps:
367+
368+- create the db directory `initdb ./db` (inside your mix project folder)
369+- create the postgres user `createuser postgres -ds`
370+- create the db `createdb db`
371+- start the postgres instance `pg_ctl -l "$PGDATA/server.log" start`
372+- add the `/db` folder to your `.gitignore`
373+- you can start your phoenix server and get a shell with `iex -S mix phx.server`
doc/languages-frameworks/beam.xmldeleted−159
@@ -1,159 +0,0 @@
1−<section xmlns="http://docbook.org/ns/docbook"
2− xmlns:xlink="http://www.w3.org/1999/xlink"
3− xml:id="sec-beam">
4− <title>BEAM Languages (Erlang, Elixir &amp; LFE)</title>
5−
6− <section xml:id="beam-introduction">
7− <title>Introduction</title>
8−
9− <para>
10− In this document and related Nix expressions, we use the term, <emphasis>BEAM</emphasis>, to describe the environment. BEAM is the name of the Erlang Virtual Machine and, as far as we're concerned, from a packaging perspective, all languages that run on the BEAM are interchangeable. That which varies, like the build system, is transparent to users of any given BEAM package, so we make no distinction.
11− </para>
12− </section>
13−
14− <section xml:id="beam-structure">
15− <title>Structure</title>
16−
17− <para>
18− All BEAM-related expressions are available via the top-level <literal>beam</literal> attribute, which includes:
19− </para>
20−
21− <itemizedlist>
22− <listitem>
23− <para>
24− <literal>interpreters</literal>: a set of compilers running on the BEAM, including multiple Erlang/OTP versions (<literal>beam.interpreters.erlangR19</literal>, etc), Elixir (<literal>beam.interpreters.elixir</literal>) and LFE (<literal>beam.interpreters.lfe</literal>).
25− </para>
26− </listitem>
27− <listitem>
28− <para>
29− <literal>packages</literal>: a set of package builders (Mix and rebar3), each compiled with a specific Erlang/OTP version, e.g. <literal>beam.packages.erlangR19</literal>.
30− </para>
31− </listitem>
32− </itemizedlist>
33−
34− <para>
35− The default Erlang compiler, defined by <literal>beam.interpreters.erlang</literal>, is aliased as <literal>erlang</literal>. The default BEAM package set is defined by <literal>beam.packages.erlang</literal> and aliased at the top level as <literal>beamPackages</literal>.
36− </para>
37−
38− <para>
39− To create a package builder built with a custom Erlang version, use the lambda, <literal>beam.packagesWith</literal>, which accepts an Erlang/OTP derivation and produces a package builder similar to <literal>beam.packages.erlang</literal>.
40− </para>
41−
42− <para>
43− Many Erlang/OTP distributions available in <literal>beam.interpreters</literal> have versions with ODBC and/or Java enabled or without wx (no observer support). For example, there's <literal>beam.interpreters.erlangR22_odbc_javac</literal>, which corresponds to <literal>beam.interpreters.erlangR22</literal> and <literal>beam.interpreters.erlangR22_nox</literal>, which corresponds to <literal>beam.interpreters.erlangR22</literal>.
44− </para>
45− </section>
46−
47− <section xml:id="build-tools">
48− <title>Build Tools</title>
49−
50− <section xml:id="build-tools-rebar3">
51− <title>Rebar3</title>
52−
53− <para>
54− We provide a version of Rebar3, under <literal>rebar3</literal>. We also provide a helper to fetch Rebar3 dependencies from a lockfile under <literal>fetchRebar3Deps</literal>.
55− </para>
56− </section>
57−
58− <section xml:id="build-tools-other">
59− <title>Mix &amp; Erlang.mk</title>
60−
61− <para>
62− Both Mix and Erlang.mk work exactly as expected. There is a bootstrap process that needs to be run for both, however, which is supported by the <literal>buildMix</literal> and <literal>buildErlangMk</literal> derivations, respectively.
63− </para>
64− </section>
65− </section>
66−
67− <section xml:id="how-to-install-beam-packages">
68− <title>How to Install BEAM Packages</title>
69−
70− <para>
71− BEAM builders are not registered at the top level, simply because they are not relevant to the vast majority of Nix users.
72− To install any of those builders into your profile, refer to them by their attribute path <literal>beamPackages.rebar3</literal>:
73− </para>
74−
75−<screen>
76−<prompt>$ </prompt>nix-env -f &quot;&lt;nixpkgs&gt;&quot; -iA beamPackages.rebar3
77−</screen>
78−</section>
79−
80− <section xml:id="packaging-beam-applications">
81− <title>Packaging BEAM Applications</title>
82−
83− <section xml:id="packaging-erlang-applications">
84− <title>Erlang Applications</title>
85−
86− <section xml:id="rebar3-packages">
87− <title>Rebar3 Packages</title>
88−
89− <para>
90− The Nix function, <literal>buildRebar3</literal>, defined in <literal>beam.packages.erlang.buildRebar3</literal> and aliased at the top level, can be used to build a derivation that understands how to build a Rebar3 project.
91− </para>
92−
93− <para>
94− If a package needs to compile native code via Rebar3's port compilation mechanism, add <literal>compilePort = true;</literal> to the derivation.
95− </para>
96− </section>
97−
98− <section xml:id="erlang-mk-packages">
99− <title>Erlang.mk Packages</title>
100−
101− <para>
102− Erlang.mk functions similarly to Rebar3, except we use <literal>buildErlangMk</literal> instead of <literal>buildRebar3</literal>.
103− </para>
104−
105− </section>
106−
107− <section xml:id="mix-packages">
108− <title>Mix Packages</title>
109−
110− <para>
111− Mix functions similarly to Rebar3, except we use <literal>buildMix</literal> instead of <literal>buildRebar3</literal>.
112− </para>
113−
114− <para>
115− Alternatively, we can use <literal>buildHex</literal> as a shortcut:
116− </para>
117− </section>
118− </section>
119− </section>
120−
121− <section xml:id="how-to-develop">
122− <title>How to Develop</title>
123−
124− <section xml:id="creating-a-shell">
125− <title>Creating a Shell</title>
126−
127− <para>
128− Usually, we need to create a <literal>shell.nix</literal> file and do our development inside of the environment specified therein. Just install your version of erlang and other interpreter, and then user your normal build tools.
129− As an example with elixir:
130− </para>
131−
132−<programlisting>
133−{ pkgs ? import &quot;&lt;nixpkgs&quot;&gt; {} }:
134−
135−with pkgs;
136−
137−let
138−
139− elixir = beam.packages.erlangR22.elixir_1_9;
140−
141−in
142−mkShell {
143− buildInputs = [ elixir ];
144−
145− ERL_INCLUDE_PATH="${erlang}/lib/erlang/usr/include";
146−}
147−</programlisting>
148−
149− <section xml:id="building-in-a-shell">
150− <title>Building in a Shell (for Mix Projects)</title>
151−
152− <para>
153− Using a <literal>shell.nix</literal> as described (see <xref
154− linkend="creating-a-shell"/>) should just work.
155− </para>
156− </section>
157− </section>
158− </section>
159−</section>
doc/languages-frameworks/bower.section.mdnew file+158
@@ -0,0 +1,158 @@
1+# Bower {#sec-bower}
2+
3+[Bower](https://bower.io) is a package manager for web site front-end components. Bower packages (comprising of build artefacts and sometimes sources) are stored in `git` repositories, typically on Github. The package registry is run by the Bower team with package metadata coming from the `bower.json` file within each package.
4+
5+The end result of running Bower is a `bower_components` directory which can be included in the web app's build process.
6+
7+Bower can be run interactively, by installing `nodePackages.bower`. More interestingly, the Bower components can be declared in a Nix derivation, with the help of `nodePackages.bower2nix`.
8+
9+## bower2nix usage {#ssec-bower2nix-usage}
10+
11+Suppose you have a `bower.json` with the following contents:
12+
13+### Example bower.json {#ex-bowerJson}
14+
15+```json
16+ "name": "my-web-app",
17+ "dependencies": {
18+ "angular": "~1.5.0",
19+ "bootstrap": "~3.3.6"
20+ }
21+```
22+
23+Running `bower2nix` will produce something like the following output:
24+
25+```nix
26+{ fetchbower, buildEnv }:
27+buildEnv { name = "bower-env"; ignoreCollisions = true; paths = [
28+ (fetchbower "angular" "1.5.3" "~1.5.0" "1749xb0firxdra4rzadm4q9x90v6pzkbd7xmcyjk6qfza09ykk9y")
29+ (fetchbower "bootstrap" "3.3.6" "~3.3.6" "1vvqlpbfcy0k5pncfjaiskj3y6scwifxygfqnw393sjfxiviwmbv")
30+ (fetchbower "jquery" "2.2.2" "1.9.1 - 2" "10sp5h98sqwk90y4k6hbdviwqzvzwqf47r3r51pakch5ii2y7js1")
31+];
32+```
33+
34+Using the `bower2nix` command line arguments, the output can be redirected to a file. A name like `bower-packages.nix` would be fine.
35+
36+The resulting derivation is a union of all the downloaded Bower packages (and their dependencies). To use it, they still need to be linked together by Bower, which is where `buildBowerComponents` is useful.
37+
38+## buildBowerComponents function {#ssec-build-bower-components}
39+
40+The function is implemented in [pkgs/development/bower-modules/generic/default.nix](https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/bower-modules/generic/default.nix).
41+
42+### Example buildBowerComponents {#ex-buildBowerComponents}
43+
44+```{=docbook}
45+<programlisting language="nix">
46+bowerComponents = buildBowerComponents {
47+ name = "my-web-app";
48+ generated = ./bower-packages.nix; <co xml:id="ex-buildBowerComponents-1" />
49+ src = myWebApp; <co xml:id="ex-buildBowerComponents-2" />
50+};
51+</programlisting>
52+```
53+
54+In ["buildBowerComponents" example](#ex-buildBowerComponents) the following arguments are of special significance to the function:
55+
56+```{=docbook}
57+<calloutlist>
58+ <callout arearefs="ex-buildBowerComponents-1">
59+ <para>
60+ <varname>generated</varname> specifies the file which was created by <command>bower2nix</command>.
61+ </para>
62+ </callout>
63+ <callout arearefs="ex-buildBowerComponents-2">
64+ <para>
65+ <varname>src</varname> is your project's sources. It needs to contain a <filename>bower.json</filename> file.
66+ </para>
67+ </callout>
68+</calloutlist>
69+```
70+
71+`buildBowerComponents` will run Bower to link together the output of `bower2nix`, resulting in a `bower_components` directory which can be used.
72+
73+Here is an example of a web frontend build process using `gulp`. You might use `grunt`, or anything else.
74+
75+### Example build script (gulpfile.js) {#ex-bowerGulpFile}
76+
77+```javascript
78+var gulp = require('gulp');
79+
80+gulp.task('default', [], function () {
81+ gulp.start('build');
82+});
83+
84+gulp.task('build', [], function () {
85+ console.log("Just a dummy gulp build");
86+ gulp
87+ .src(["./bower_components/**/*"])
88+ .pipe(gulp.dest("./gulpdist/"));
89+});
90+```
91+
92+### Example Full example — default.nix {#ex-buildBowerComponentsDefaultNix}
93+
94+```{=docbook}
95+<programlisting language="nix">
96+{ myWebApp ? { outPath = ./.; name = "myWebApp"; }
97+, pkgs ? import &lt;nixpkgs&gt; {}
98+}:
99+
100+pkgs.stdenv.mkDerivation {
101+ name = "my-web-app-frontend";
102+ src = myWebApp;
103+
104+ buildInputs = [ pkgs.nodePackages.gulp ];
105+
106+ bowerComponents = pkgs.buildBowerComponents { <co xml:id="ex-buildBowerComponentsDefault-1" />
107+ name = "my-web-app";
108+ generated = ./bower-packages.nix;
109+ src = myWebApp;
110+ };
111+
112+ buildPhase = ''
113+ cp --reflink=auto --no-preserve=mode -R $bowerComponents/bower_components . <co xml:id="ex-buildBowerComponentsDefault-2" />
114+ export HOME=$PWD <co xml:id="ex-buildBowerComponentsDefault-3" />
115+ ${pkgs.nodePackages.gulp}/bin/gulp build <co xml:id="ex-buildBowerComponentsDefault-4" />
116+ '';
117+
118+ installPhase = "mv gulpdist $out";
119+}
120+</programlisting>
121+```
122+
123+A few notes about [Full example — `default.nix`](#ex-buildBowerComponentsDefaultNix):
124+
125+```{=docbook}
126+<calloutlist>
127+ <callout arearefs="ex-buildBowerComponentsDefault-1">
128+ <para>
129+ The result of <varname>buildBowerComponents</varname> is an input to the frontend build.
130+ </para>
131+ </callout>
132+ <callout arearefs="ex-buildBowerComponentsDefault-2">
133+ <para>
134+ Whether to symlink or copy the <filename>bower_components</filename> directory depends on the build tool in use. In this case a copy is used to avoid <command>gulp</command> silliness with permissions.
135+ </para>
136+ </callout>
137+ <callout arearefs="ex-buildBowerComponentsDefault-3">
138+ <para>
139+ <command>gulp</command> requires <varname>HOME</varname> to refer to a writeable directory.
140+ </para>
141+ </callout>
142+ <callout arearefs="ex-buildBowerComponentsDefault-4">
143+ <para>
144+ The actual build command. Other tools could be used.
145+ </para>
146+ </callout>
147+</calloutlist>
148+```
149+
150+## Troubleshooting {#ssec-bower2nix-troubleshooting}
151+
152+### ENOCACHE errors from buildBowerComponents {#enocache-errors-from-buildbowercomponents}
153+
154+This means that Bower was looking for a package version which doesn't exist in the generated `bower-packages.nix`.
155+
156+If `bower.json` has been updated, then run `bower2nix` again.
157+
158+It could also be a bug in `bower2nix` or `fetchbower`. If possible, try reformulating the version specification in `bower.json`.
doc/languages-frameworks/bower.xmldeleted−196
@@ -1,196 +0,0 @@
1−<section xmlns="http://docbook.org/ns/docbook"
2− xmlns:xlink="http://www.w3.org/1999/xlink"
3− xml:id="sec-bower">
4− <title>Bower</title>
5−
6− <para>
7− <link xlink:href="http://bower.io">Bower</link> is a package manager for web site front-end components. Bower packages (comprising of build artefacts and sometimes sources) are stored in <command>git</command> repositories, typically on Github. The package registry is run by the Bower team with package metadata coming from the <filename>bower.json</filename> file within each package.
8− </para>
9−
10− <para>
11− The end result of running Bower is a <filename>bower_components</filename> directory which can be included in the web app's build process.
12− </para>
13−
14− <para>
15− Bower can be run interactively, by installing <varname>nodePackages.bower</varname>. More interestingly, the Bower components can be declared in a Nix derivation, with the help of <varname>nodePackages.bower2nix</varname>.
16− </para>
17−
18− <section xml:id="ssec-bower2nix-usage">
19− <title><command>bower2nix</command> usage</title>
20−
21− <para>
22− Suppose you have a <filename>bower.json</filename> with the following contents:
23− <example xml:id="ex-bowerJson">
24− <title><filename>bower.json</filename></title>
25−<programlisting language="json">
26−<![CDATA[{
27− "name": "my-web-app",
28− "dependencies": {
29− "angular": "~1.5.0",
30− "bootstrap": "~3.3.6"
31− }
32−}]]>
33−</programlisting>
34− </example>
35− </para>
36−
37− <para>
38− Running <command>bower2nix</command> will produce something like the following output:
39−<programlisting language="nix">
40−<![CDATA[{ fetchbower, buildEnv }:
41−buildEnv { name = "bower-env"; ignoreCollisions = true; paths = [
42− (fetchbower "angular" "1.5.3" "~1.5.0" "1749xb0firxdra4rzadm4q9x90v6pzkbd7xmcyjk6qfza09ykk9y")
43− (fetchbower "bootstrap" "3.3.6" "~3.3.6" "1vvqlpbfcy0k5pncfjaiskj3y6scwifxygfqnw393sjfxiviwmbv")
44− (fetchbower "jquery" "2.2.2" "1.9.1 - 2" "10sp5h98sqwk90y4k6hbdviwqzvzwqf47r3r51pakch5ii2y7js1")
45−]; }]]>
46−</programlisting>
47− </para>
48−
49− <para>
50− Using the <command>bower2nix</command> command line arguments, the output can be redirected to a file. A name like <filename>bower-packages.nix</filename> would be fine.
51− </para>
52−
53− <para>
54− The resulting derivation is a union of all the downloaded Bower packages (and their dependencies). To use it, they still need to be linked together by Bower, which is where <varname>buildBowerComponents</varname> is useful.
55− </para>
56− </section>
57−
58− <section xml:id="ssec-build-bower-components">
59− <title><varname>buildBowerComponents</varname> function</title>
60−
61− <para>
62− The function is implemented in <link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/bower-modules/generic/default.nix"> <filename>pkgs/development/bower-modules/generic/default.nix</filename></link>. Example usage:
63− <example xml:id="ex-buildBowerComponents">
64− <title>buildBowerComponents</title>
65−<programlisting language="nix">
66−bowerComponents = buildBowerComponents {
67− name = "my-web-app";
68− generated = ./bower-packages.nix; <co xml:id="ex-buildBowerComponents-1" />
69− src = myWebApp; <co xml:id="ex-buildBowerComponents-2" />
70−};
71−</programlisting>
72− </example>
73− </para>
74−
75− <para>
76− In <xref linkend="ex-buildBowerComponents" />, the following arguments are of special significance to the function:
77− <calloutlist>
78− <callout arearefs="ex-buildBowerComponents-1">
79− <para>
80− <varname>generated</varname> specifies the file which was created by <command>bower2nix</command>.
81− </para>
82− </callout>
83− <callout arearefs="ex-buildBowerComponents-2">
84− <para>
85− <varname>src</varname> is your project's sources. It needs to contain a <filename>bower.json</filename> file.
86− </para>
87− </callout>
88− </calloutlist>
89− </para>
90−
91− <para>
92− <varname>buildBowerComponents</varname> will run Bower to link together the output of <command>bower2nix</command>, resulting in a <filename>bower_components</filename> directory which can be used.
93− </para>
94−
95− <para>
96− Here is an example of a web frontend build process using <command>gulp</command>. You might use <command>grunt</command>, or anything else.
97− </para>
98−
99− <example xml:id="ex-bowerGulpFile">
100− <title>Example build script (<filename>gulpfile.js</filename>)</title>
101−<programlisting language="javascript">
102−<![CDATA[var gulp = require('gulp');
103−
104−gulp.task('default', [], function () {
105− gulp.start('build');
106−});
107−
108−gulp.task('build', [], function () {
109− console.log("Just a dummy gulp build");
110− gulp
111− .src(["./bower_components/**/*"])
112− .pipe(gulp.dest("./gulpdist/"));
113−});]]>
114−</programlisting>
115− </example>
116−
117− <example xml:id="ex-buildBowerComponentsDefaultNix">
118− <title>Full example — <filename>default.nix</filename></title>
119−<programlisting language="nix">
120−{ myWebApp ? { outPath = ./.; name = "myWebApp"; }
121−, pkgs ? import &lt;nixpkgs&gt; {}
122−}:
123−
124−pkgs.stdenv.mkDerivation {
125− name = "my-web-app-frontend";
126− src = myWebApp;
127−
128− buildInputs = [ pkgs.nodePackages.gulp ];
129−
130− bowerComponents = pkgs.buildBowerComponents { <co xml:id="ex-buildBowerComponentsDefault-1" />
131− name = "my-web-app";
132− generated = ./bower-packages.nix;
133− src = myWebApp;
134− };
135−
136− buildPhase = ''
137− cp --reflink=auto --no-preserve=mode -R $bowerComponents/bower_components . <co xml:id="ex-buildBowerComponentsDefault-2" />
138− export HOME=$PWD <co xml:id="ex-buildBowerComponentsDefault-3" />
139− ${pkgs.nodePackages.gulp}/bin/gulp build <co xml:id="ex-buildBowerComponentsDefault-4" />
140− '';
141−
142− installPhase = "mv gulpdist $out";
143−}
144−</programlisting>
145− </example>
146−
147− <para>
148− A few notes about <xref linkend="ex-buildBowerComponentsDefaultNix" />:
149− <calloutlist>
150− <callout arearefs="ex-buildBowerComponentsDefault-1">
151− <para>
152− The result of <varname>buildBowerComponents</varname> is an input to the frontend build.
153− </para>
154− </callout>
155− <callout arearefs="ex-buildBowerComponentsDefault-2">
156− <para>
157− Whether to symlink or copy the <filename>bower_components</filename> directory depends on the build tool in use. In this case a copy is used to avoid <command>gulp</command> silliness with permissions.
158− </para>
159− </callout>
160− <callout arearefs="ex-buildBowerComponentsDefault-3">
161− <para>
162− <command>gulp</command> requires <varname>HOME</varname> to refer to a writeable directory.
163− </para>
164− </callout>
165− <callout arearefs="ex-buildBowerComponentsDefault-4">
166− <para>
167− The actual build command. Other tools could be used.
168− </para>
169− </callout>
170− </calloutlist>
171− </para>
172− </section>
173−
174− <section xml:id="ssec-bower2nix-troubleshooting">
175− <title>Troubleshooting</title>
176−
177− <variablelist>
178− <varlistentry>
179− <term>
180− <literal>ENOCACHE</literal> errors from <varname>buildBowerComponents</varname>
181− </term>
182− <listitem>
183− <para>
184− This means that Bower was looking for a package version which doesn't exist in the generated <filename>bower-packages.nix</filename>.
185− </para>
186− <para>
187− If <filename>bower.json</filename> has been updated, then run <command>bower2nix</command> again.
188− </para>
189− <para>
190− It could also be a bug in <command>bower2nix</command> or <command>fetchbower</command>. If possible, try reformulating the version specification in <filename>bower.json</filename>.
191− </para>
192− </listitem>
193− </varlistentry>
194− </variablelist>
195− </section>
196−</section>
doc/languages-frameworks/chicken.section.mdnew file+49
@@ -0,0 +1,49 @@
1+# CHICKEN {#sec-chicken}
2+
3+[CHICKEN](https://call-cc.org/) is a
4+[R⁵RS](https://schemers.org/Documents/Standards/R5RS/HTML/)-compliant Scheme
5+compiler. It includes an interactive mode and a custom package format, "eggs".
6+
7+## Using Eggs
8+
9+Eggs described in nixpkgs are available inside the
10+`chickenPackages.chickenEggs` attrset. Including an egg as a build input is
11+done in the typical Nix fashion. For example, to include support for [SRFI
12+189](https://srfi.schemers.org/srfi-189/srfi-189.html) in a derivation, one
13+might write:
14+
15+```nix
16+ buildInputs = [
17+ chicken
18+ chickenPackages.chickenEggs.srfi-189
19+ ];
20+```
21+
22+Both `chicken` and its eggs have a setup hook which configures the environment
23+variables `CHICKEN_INCLUDE_PATH` and `CHICKEN_REPOSITORY_PATH`.
24+
25+## Updating Eggs
26+
27+nixpkgs only knows about a subset of all published eggs. It uses
28+[egg2nix](https://github.com/the-kenny/egg2nix) to generate a
29+package set from a list of eggs to include.
30+
31+The package set is regenerated by running the following shell commands:
32+
33+```
34+$ nix-shell -p chickenPackages.egg2nix
35+$ cd pkgs/development/compilers/chicken/5/
36+$ egg2nix eggs.scm > eggs.nix
37+```
38+
39+## Adding Eggs
40+
41+When we run `egg2nix`, we obtain one collection of eggs with
42+mutually-compatible versions. This means that when we add new eggs, we may
43+need to update existing eggs. To keep those separate, follow the procedure for
44+updating eggs before including more eggs.
45+
46+To include more eggs, edit `pkgs/development/compilers/chicken/5/eggs.scm`.
47+The first section of this file lists eggs which are required by `egg2nix`
48+itself; all other eggs go into the second section. After editing, follow the
49+procedure for updating eggs.
doc/languages-frameworks/coq.section.mdnew file+83
@@ -0,0 +1,83 @@
1+# Coq and coq packages {#sec-language-coq}
2+
3+## Coq derivation: `coq` {#coq-derivation-coq}
4+
5+The Coq derivation is overridable through the `coq.override overrides`, where overrides is an attribute set which contains the arguments to override. We recommend overriding either of the following
6+
7+* `version` (optional, defaults to the latest version of Coq selected for nixpkgs, see `pkgs/top-level/coq-packages` to witness this choice), which follows the conventions explained in the `coqPackages` section below,
8+* `customOCamlPackage` (optional, defaults to `null`, which lets Coq choose a version automatically), which can be set to any of the ocaml packages attribute of `ocaml-ng` (such as `ocaml-ng.ocamlPackages_4_10` which is the default for Coq 8.11 for example).
9+* `coq-version` (optional, defaults to the short version e.g. "8.10"), is a version number of the form "x.y" that indicates which Coq's version build behavior to mimic when using a source which is not a release. E.g. `coq.override { version = "d370a9d1328a4e1cdb9d02ee032f605a9d94ec7a"; coq-version = "8.10"; }`.
10+
11+## Coq packages attribute sets: `coqPackages` {#coq-packages-attribute-sets-coqpackages}
12+
13+The recommended way of defining a derivation for a Coq library, is to use the `coqPackages.mkCoqDerivation` function, which is essentially a specialization of `mkDerivation` taking into account most of the specifics of Coq libraries. The following attributes are supported:
14+
15+* `pname` (required) is the name of the package,
16+* `version` (optional, defaults to `null`), is the version to fetch and build,
17+ this attribute is interpreted in several ways depending on its type and pattern:
18+ * if it is a known released version string, i.e. from the `release` attribute below, the according release is picked, and the `version` attribute of the resulting derivation is set to this release string,
19+ * if it is a majorMinor `"x.y"` prefix of a known released version (as defined above), then the latest `"x.y.z"` known released version is selected (for the ordering given by `versionAtLeast`),
20+ * if it is a path or a string representing an absolute path (i.e. starting with `"/"`), the provided path is selected as a source, and the `version` attribute of the resulting derivation is set to `"dev"`,
21+ * if it is a string of the form `owner:branch` then it tries to download the `branch` of owner `owner` for a project of the same name using the same vcs, and the `version` attribute of the resulting derivation is set to `"dev"`, additionally if the owner is not provided (i.e. if the `owner:` prefix is missing), it defaults to the original owner of the package (see below),
22+ * if it is a string of the form `"#N"`, and the domain is github, then it tries to download the current head of the pull request `#N` from github,
23+* `defaultVersion` (optional). Coq libraries may be compatible with some specific versions of Coq only. The `defaultVersion` attribute is used when no `version` is provided (or if `version = null`) to select the version of the library to use by default, depending on the context. This selection will mainly depend on a `coq` version number but also possibly on other packages versions (e.g. `mathcomp`). If its value ends up to be `null`, the package is marked for removal in end-user `coqPackages` attribute set.
24+* `release` (optional, defaults to `{}`), lists all the known releases of the library and for each of them provides an attribute set with at least a `sha256` attribute (you may put the empty string `""` in order to automatically insert a fake sha256, this will trigger an error which will allow you to find the correct sha256), each attribute set of the list of releases also takes optional overloading arguments for the fetcher as below (i.e.`domain`, `owner`, `repo`, `rev` assuming the default fetcher is used) and optional overrides for the result of the fetcher (i.e. `version` and `src`).
25+* `fetcher` (optional, defaults to a generic fetching mechanism supporting github or gitlab based infrastructures), is a function that takes at least an `owner`, a `repo`, a `rev`, and a `sha256` and returns an attribute set with a `version` and `src`.
26+* `repo` (optional, defaults to the value of `pname`),
27+* `owner` (optional, defaults to `"coq-community"`).
28+* `domain` (optional, defaults to `"github.com"`), domains including the strings `"github"` or `"gitlab"` in their names are automatically supported, otherwise, one must change the `fetcher` argument to support them (cf `pkgs/development/coq-modules/heq/default.nix` for an example),
29+* `releaseRev` (optional, defaults to `(v: v)`), provides a default mapping from release names to revision hashes/branch names/tags,
30+* `displayVersion` (optional), provides a way to alter the computation of `name` from `pname`, by explaining how to display version numbers,
31+* `namePrefix` (optional, defaults to `[ "coq" ]`), provides a way to alter the computation of `name` from `pname`, by explaining which dependencies must occur in `name`,
32+* `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,
33+* `extraBuildInputs` (optional), this allows to add more build inputs,
34+* `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.
35+* `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"`,
36+* `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.
37+* `opam-name` (optional, defaults to concatenating with a dash separator the components of `namePrefix` and `pname`), name of the Dune package to build.
38+* `enableParallelBuilding` (optional, defaults to `true`), since it is activated by default, we provide a way to disable it.
39+* `extraInstallFlags` (optional), allows to extend `installFlags` which initializes the variable `COQMF_COQLIB` so as to install in the proper subdirectory. Indeed Coq libraries should be installed in `$(out)/lib/coq/${coq.coq-version}/user-contrib/`. Such directories are automatically added to the `$COQPATH` environment variable by the hook defined in the Coq derivation.
40+* `setCOQBIN` (optional, defaults to `true`), by default, the environment variable `$COQBIN` is set to the current Coq's binary, but one can disable this behavior by setting it to `false`,
41+* `useMelquiondRemake` (optional, default to `null`) is an attribute set, which, if given, overloads the `preConfigurePhases`, `configureFlags`, `buildPhase`, and `installPhase` attributes of the derivation for a specific use in libraries using `remake` as set up by Guillaume Melquiond for `flocq`, `gappalib`, `interval`, and `coquelicot` (see the corresponding derivation for concrete examples of use of this option). For backward compatibility, the attribute `useMelquiondRemake.logpath` must be set to the logical root of the library (otherwise, one can pass `useMelquiondRemake = {}` to activate this without backward compatibility).
42+* `dropAttrs`, `keepAttrs`, `dropDerivationAttrs` are all optional and allow to tune which attribute is added or removed from the final call to `mkDerivation`.
43+
44+It also takes other standard `mkDerivation` attributes, they are added as such, except for `meta` which extends an automatically computed `meta` (where the `platform` is the same as `coq` and the homepage is automatically computed).
45+
46+Here is a simple package example. It is a pure Coq library, thus it depends on Coq. It builds on the Mathematical Components library, thus it also takes some `mathcomp` derivations as `extraBuildInputs`.
47+
48+```nix
49+{ lib, mkCoqDerivation, version ? null
50+, coq, mathcomp, mathcomp-finmap, mathcomp-bigenough }:
51+with lib; mkCoqDerivation {
52+ /* namePrefix leads to e.g. `name = coq8.11-mathcomp1.11-multinomials-1.5.2` */
53+ namePrefix = [ "coq" "mathcomp" ];
54+ pname = "multinomials";
55+ owner = "math-comp";
56+ inherit version;
57+ defaultVersion = with versions; switch [ coq.version mathcomp.version ] [
58+ { cases = [ (range "8.7" "8.12") "1.11.0" ]; out = "1.5.2"; }
59+ { cases = [ (range "8.7" "8.11") (range "1.8" "1.10") ]; out = "1.5.0"; }
60+ { cases = [ (range "8.7" "8.10") (range "1.8" "1.10") ]; out = "1.4"; }
61+ { cases = [ "8.6" (range "1.6" "1.7") ]; out = "1.1"; }
62+ ] null;
63+ release = {
64+ "1.5.2".sha256 = "15aspf3jfykp1xgsxf8knqkxv8aav2p39c2fyirw7pwsfbsv2c4s";
65+ "1.5.1".sha256 = "13nlfm2wqripaq671gakz5mn4r0xwm0646araxv0nh455p9ndjs3";
66+ "1.5.0".sha256 = "064rvc0x5g7y1a0nip6ic91vzmq52alf6in2bc2dmss6dmzv90hw";
67+ "1.5.0".rev = "1.5";
68+ "1.4".sha256 = "0vnkirs8iqsv8s59yx1fvg1nkwnzydl42z3scya1xp1b48qkgn0p";
69+ "1.3".sha256 = "0l3vi5n094nx3qmy66hsv867fnqm196r8v605kpk24gl0aa57wh4";
70+ "1.2".sha256 = "1mh1w339dslgv4f810xr1b8v2w7rpx6fgk9pz96q0fyq49fw2xcq";
71+ "1.1".sha256 = "1q8alsm89wkc0lhcvxlyn0pd8rbl2nnxg81zyrabpz610qqjqc3s";
72+ "1.0".sha256 = "1qmbxp1h81cy3imh627pznmng0kvv37k4hrwi2faa101s6bcx55m";
73+ };
74+
75+ propagatedBuildInputs =
76+ [ mathcomp.ssreflect mathcomp.algebra mathcomp-finmap mathcomp-bigenough ];
77+
78+ meta = {
79+ description = "A Coq/SSReflect Library for Monoidal Rings and Multinomials";
80+ license = licenses.cecill-c;
81+ };
82+}
83+```
doc/languages-frameworks/coq.xmldeleted−52
@@ -1,52 +0,0 @@
1−<section xmlns="http://docbook.org/ns/docbook"
2− xmlns:xlink="http://www.w3.org/1999/xlink"
3− xml:id="sec-language-coq">
4− <title>Coq</title>
5−
6− <para>
7− Coq libraries should be installed in <literal>$(out)/lib/coq/${coq.coq-version}/user-contrib/</literal>. Such directories are automatically added to the <literal>$COQPATH</literal> environment variable by the hook defined in the Coq derivation.
8− </para>
9−
10− <para>
11− Some extensions (plugins) might require OCaml and sometimes other OCaml packages. The <literal>coq.ocamlPackages</literal> attribute can be used to depend on the same package set Coq was built against.
12− </para>
13−
14− <para>
15− Coq libraries may be compatible with some specific versions of Coq only. The <literal>compatibleCoqVersions</literal> attribute is used to precisely select those versions of Coq that are compatible with this derivation.
16− </para>
17−
18− <para>
19− Here is a simple package example. It is a pure Coq library, thus it depends on Coq. It builds on the Mathematical Components library, thus it also takes <literal>mathcomp</literal> as <literal>buildInputs</literal>. Its <literal>Makefile</literal> has been generated using <literal>coq_makefile</literal> so we only have to set the <literal>$COQLIB</literal> variable at install time.
20− </para>
21−
22−<programlisting>
23−{ stdenv, fetchFromGitHub, coq, mathcomp }:
24−
25−stdenv.mkDerivation rec {
26− name = "coq${coq.coq-version}-multinomials-${version}";
27− version = "1.0";
28− src = fetchFromGitHub {
29− owner = "math-comp";
30− repo = "multinomials";
31− rev = version;
32− sha256 = "1qmbxp1h81cy3imh627pznmng0kvv37k4hrwi2faa101s6bcx55m";
33− };
34−
35− buildInputs = [ coq ];
36− propagatedBuildInputs = [ mathcomp ];
37−
38− installFlags = "COQLIB=$(out)/lib/coq/${coq.coq-version}/";
39−
40− meta = {
41− description = "A Coq/SSReflect Library for Monoidal Rings and Multinomials";
42− inherit (src.meta) homepage;
43− license = stdenv.lib.licenses.cecill-b;
44− inherit (coq.meta) platforms;
45− };
46−
47− passthru = {
48− compatibleCoqVersions = v: builtins.elem v [ "8.5" "8.6" "8.7" ];
49− };
50−}
51−</programlisting>
52−</section>
doc/languages-frameworks/crystal.section.md+5−3
@@ -1,20 +1,22 @@
1−# Crystal
1+# Crystal {#crystal}
22
3−## Building a Crystal package
3+## Building a Crystal package {#building-a-crystal-package}
44
55This section uses [Mint](https://github.com/mint-lang/mint) as an example for how to build a Crystal package.
66
7−If the Crystal project has any dependencies, the first step is to get a `shards.nix` file encoding those. Get a copy of the project and go to its root directory such that its `shard.lock` file is in the current directory, then run `crystal2nix` in it
7+If the Crystal project has any dependencies, the first step is to get a `shards.nix` file encoding those. Get a copy of the project and go to its root directory such that its `shard.lock` file is in the current directory. Executable projects should usually commit the `shard.lock` file, but sometimes that's not the case, which means you need to generate it yourself. With an existing `shard.lock` file, `crystal2nix` can be run.
88```bash
99$ git clone https://github.com/mint-lang/mint
1010$ cd mint
1111$ git checkout 0.5.0
12+$ if [ ! -f shard.lock ]; then nix-shell -p shards --run "shards lock"; fi
1213$ nix-shell -p crystal2nix --run crystal2nix
1314```
1415
1516This should have generated a `shards.nix` file.
1617
1718Next create a Nix file for your derivation and use `pkgs.crystal.buildCrystalPackage` as follows:
19+
1820```nix
1921with import <nixpkgs> {};
2022crystal.buildCrystalPackage rec {
doc/languages-frameworks/cuda.section.mdnew file+34
@@ -0,0 +1,34 @@
1+# CUDA {#cuda}
2+
3+CUDA-only packages are stored in the `cudaPackages` packages set. This set
4+includes the `cudatoolkit`, portions of the toolkit in separate derivations,
5+`cudnn`, `cutensor` and `nccl`.
6+
7+A package set is available for each CUDA version, so for example
8+`cudaPackages_11_6`. Within each set is a matching version of the above listed
9+packages. Additionally, other versions of the packages that are packaged and
10+compatible are available as well. For example, there can be a
11+`cudaPackages.cudnn_8_3_2` package.
12+
13+To use one or more CUDA packages in an expression, give the expression a `cudaPackages` parameter, and in case CUDA is optional
14+```nix
15+cudaSupport ? false
16+cudaPackages ? {}
17+```
18+
19+When using `callPackage`, you can choose to pass in a different variant, e.g.
20+when a different version of the toolkit suffices
21+```nix
22+mypkg = callPackage { cudaPackages = cudaPackages_11_5; }
23+```
24+
25+If another version of say `cudnn` or `cutensor` is needed, you can override the
26+package set to make it the default. This guarantees you get a consistent package
27+set.
28+```nix
29+mypkg = let
30+ cudaPackages = cudaPackages_11_5.overrideScope' (final: prev {
31+ cudnn = prev.cudnn_8_3_2;
32+ }});
33+in callPackage { inherit cudaPackages; };
34+```
doc/languages-frameworks/dhall.section.mdnew file+463
@@ -0,0 +1,463 @@
1+# Dhall {#sec-language-dhall}
2+
3+The Nixpkgs support for Dhall assumes some familiarity with Dhall's language
4+support for importing Dhall expressions, which is documented here:
5+
6+* [`dhall-lang.org` - Installing packages](https://docs.dhall-lang.org/tutorials/Language-Tour.html#installing-packages)
7+
8+## Remote imports {#ssec-dhall-remote-imports}
9+
10+Nixpkgs bypasses Dhall's support for remote imports using Dhall's
11+semantic integrity checks. Specifically, any Dhall import can be protected by
12+an integrity check like:
13+
14+```dhall
15+https://prelude.dhall-lang.org/v20.1.0/package.dhall
16+ sha256:26b0ef498663d269e4dc6a82b0ee289ec565d683ef4c00d0ebdd25333a5a3c98
17+```
18+
19+… and if the import is cached then the interpreter will load the import from
20+cache instead of fetching the URL.
21+
22+Nixpkgs uses this trick to add all of a Dhall expression's dependencies into the
23+cache so that the Dhall interpreter never needs to resolve any remote URLs. In
24+fact, Nixpkgs uses a Dhall interpreter with remote imports disabled when
25+packaging Dhall expressions to enforce that the interpreter never resolves a
26+remote import. This means that Nixpkgs only supports building Dhall expressions
27+if all of their remote imports are protected by semantic integrity checks.
28+
29+Instead of remote imports, Nixpkgs uses Nix to fetch remote Dhall code. For
30+example, the Prelude Dhall package uses `pkgs.fetchFromGitHub` to fetch the
31+`dhall-lang` repository containing the Prelude. Relying exclusively on Nix
32+to fetch Dhall code ensures that Dhall packages built using Nix remain pure and
33+also behave well when built within a sandbox.
34+
35+## Packaging a Dhall expression from scratch {#ssec-dhall-packaging-expression}
36+
37+We can illustrate how Nixpkgs integrates Dhall by beginning from the following
38+trivial Dhall expression with one dependency (the Prelude):
39+
40+```dhall
41+-- ./true.dhall
42+
43+let Prelude = https://prelude.dhall-lang.org/v20.1.0/package.dhall
44+
45+in Prelude.Bool.not False
46+```
47+
48+As written, this expression cannot be built using Nixpkgs because the
49+expression does not protect the Prelude import with a semantic integrity
50+check, so the first step is to freeze the expression using `dhall freeze`,
51+like this:
52+
53+```ShellSession
54+$ dhall freeze --inplace ./true.dhall
55+```
56+
57+… which gives us:
58+
59+```dhall
60+-- ./true.dhall
61+
62+let Prelude =
63+ https://prelude.dhall-lang.org/v20.1.0/package.dhall
64+ sha256:26b0ef498663d269e4dc6a82b0ee289ec565d683ef4c00d0ebdd25333a5a3c98
65+
66+in Prelude.Bool.not False
67+```
68+
69+To package that expression, we create a `./true.nix` file containing the
70+following specification for the Dhall package:
71+
72+```nix
73+# ./true.nix
74+
75+{ buildDhallPackage, Prelude }:
76+
77+buildDhallPackage {
78+ name = "true";
79+ code = ./true.dhall;
80+ dependencies = [ Prelude ];
81+ source = true;
82+}
83+```
84+
85+… and we complete the build by incorporating that Dhall package into the
86+`pkgs.dhallPackages` hierarchy using an overlay, like this:
87+
88+```nix
89+# ./example.nix
90+
91+let
92+ nixpkgs = builtins.fetchTarball {
93+ url = "https://github.com/NixOS/nixpkgs/archive/94b2848559b12a8ed1fe433084686b2a81123c99.tar.gz";
94+ sha256 = "1pbl4c2dsaz2lximgd31m96jwbps6apn3anx8cvvhk1gl9rkg107";
95+ };
96+
97+ dhallOverlay = self: super: {
98+ true = self.callPackage ./true.nix { };
99+ };
100+
101+ overlay = self: super: {
102+ dhallPackages = super.dhallPackages.override (old: {
103+ overrides =
104+ self.lib.composeExtensions (old.overrides or (_: _: {})) dhallOverlay;
105+ });
106+ };
107+
108+ pkgs = import nixpkgs { config = {}; overlays = [ overlay ]; };
109+
110+in
111+ pkgs
112+```
113+
114+… which we can then build using this command:
115+
116+```ShellSession
117+$ nix build --file ./example.nix dhallPackages.true
118+```
119+
120+## Contents of a Dhall package {#ssec-dhall-package-contents}
121+
122+The above package produces the following directory tree:
123+
124+```ShellSession
125+$ tree -a ./result
126+result
127+├── .cache
128+│   └── dhall
129+│   └── 122027abdeddfe8503496adeb623466caa47da5f63abd2bc6fa19f6cfcb73ecfed70
130+├── binary.dhall
131+└── source.dhall
132+```
133+
134+… where:
135+
136+* `source.dhall` contains the result of interpreting our Dhall package:
137+
138+ ```ShellSession
139+ $ cat ./result/source.dhall
140+ True
141+ ```
142+
143+* The `.cache` subdirectory contains one binary cache product encoding the
144+ same result as `source.dhall`:
145+
146+ ```ShellSession
147+ $ dhall decode < ./result/.cache/dhall/122027abdeddfe8503496adeb623466caa47da5f63abd2bc6fa19f6cfcb73ecfed70
148+ True
149+ ```
150+
151+* `binary.dhall` contains a Dhall expression which handles fetching and decoding
152+ the same cache product:
153+
154+ ```ShellSession
155+ $ cat ./result/binary.dhall
156+ missing sha256:27abdeddfe8503496adeb623466caa47da5f63abd2bc6fa19f6cfcb73ecfed70
157+ $ cp -r ./result/.cache .cache
158+
159+ $ chmod -R u+w .cache
160+
161+ $ XDG_CACHE_HOME=.cache dhall --file ./result/binary.dhall
162+ True
163+ ```
164+
165+The `source.dhall` file is only present for packages that specify
166+`source = true;`. By default, Dhall packages omit the `source.dhall` in order
167+to conserve disk space when they are used exclusively as dependencies. For
168+example, if we build the Prelude package it will only contain the binary
169+encoding of the expression:
170+
171+```ShellSession
172+$ nix build --file ./example.nix dhallPackages.Prelude
173+
174+$ tree -a result
175+result
176+├── .cache
177+│   └── dhall
178+│   └── 122026b0ef498663d269e4dc6a82b0ee289ec565d683ef4c00d0ebdd25333a5a3c98
179+└── binary.dhall
180+
181+2 directories, 2 files
182+```
183+
184+Typically, you only specify `source = true;` for the top-level Dhall expression
185+of interest (such as our example `true.nix` Dhall package). However, if you
186+wish to specify `source = true` for all Dhall packages, then you can amend the
187+Dhall overlay like this:
188+
189+```nix
190+ dhallOverrides = self: super: {
191+ # Enable source for all Dhall packages
192+ buildDhallPackage =
193+ args: super.buildDhallPackage (args // { source = true; });
194+
195+ true = self.callPackage ./true.nix { };
196+ };
197+```
198+
199+… and now the Prelude will contain the fully decoded result of interpreting
200+the Prelude:
201+
202+```ShellSession
203+$ nix build --file ./example.nix dhallPackages.Prelude
204+
205+$ tree -a result
206+result
207+├── .cache
208+│   └── dhall
209+│   └── 122026b0ef498663d269e4dc6a82b0ee289ec565d683ef4c00d0ebdd25333a5a3c98
210+├── binary.dhall
211+└── source.dhall
212+
213+$ cat ./result/source.dhall
214+{ Bool =
215+ { and =
216+ \(_ : List Bool) ->
217+ List/fold Bool _ Bool (\(_ : Bool) -> \(_ : Bool) -> _@1 && _) True
218+ , build = \(_ : Type -> _ -> _@1 -> _@2) -> _ Bool True False
219+ , even =
220+ \(_ : List Bool) ->
221+ List/fold Bool _ Bool (\(_ : Bool) -> \(_ : Bool) -> _@1 == _) True
222+ , fold =
223+ \(_ : Bool) ->
224+…
225+```
226+
227+## Packaging functions {#ssec-dhall-packaging-functions}
228+
229+We already saw an example of using `buildDhallPackage` to create a Dhall
230+package from a single file, but most Dhall packages consist of more than one
231+file and there are two derived utilities that you may find more useful when
232+packaging multiple files:
233+
234+* `buildDhallDirectoryPackage` - build a Dhall package from a local directory
235+
236+* `buildDhallGitHubPackage` - build a Dhall package from a GitHub repository
237+
238+The `buildDhallPackage` is the lowest-level function and accepts the following
239+arguments:
240+
241+* `name`: The name of the derivation
242+
243+* `dependencies`: Dhall dependencies to build and cache ahead of time
244+
245+* `code`: The top-level expression to build for this package
246+
247+ Note that the `code` field accepts an arbitrary Dhall expression. You're
248+ not limited to just a file.
249+
250+* `source`: Set to `true` to include the decoded result as `source.dhall` in the
251+ build product, at the expense of requiring more disk space
252+
253+* `documentationRoot`: Set to the root directory of the package if you want
254+ `dhall-docs` to generate documentation underneath the `docs` subdirectory of
255+ the build product
256+
257+The `buildDhallDirectoryPackage` is a higher-level function implemented in terms
258+of `buildDhallPackage` that accepts the following arguments:
259+
260+* `name`: Same as `buildDhallPackage`
261+
262+* `dependencies`: Same as `buildDhallPackage`
263+
264+* `source`: Same as `buildDhallPackage`
265+
266+* `src`: The directory containing Dhall code that you want to turn into a Dhall
267+ package
268+
269+* `file`: The top-level file (`package.dhall` by default) that is the entrypoint
270+ to the rest of the package
271+
272+* `document`: Set to `true` to generate documentation for the package
273+
274+The `buildDhallGitHubPackage` is another higher-level function implemented in
275+terms of `buildDhallPackage` that accepts the following arguments:
276+
277+* `name`: Same as `buildDhallPackage`
278+
279+* `dependencies`: Same as `buildDhallPackage`
280+
281+* `source`: Same as `buildDhallPackage`
282+
283+* `owner`: The owner of the repository
284+
285+* `repo`: The repository name
286+
287+* `rev`: The desired revision (or branch, or tag)
288+
289+* `directory`: The subdirectory of the Git repository to package (if a
290+ directory other than the root of the repository)
291+
292+* `file`: The top-level file (`${directory}/package.dhall` by default) that is
293+ the entrypoint to the rest of the package
294+
295+* `document`: Set to `true` to generate documentation for the package
296+
297+Additionally, `buildDhallGitHubPackage` accepts the same arguments as
298+`fetchFromGitHub`, such as `sha256` or `fetchSubmodules`.
299+
300+## `dhall-to-nixpkgs` {#ssec-dhall-dhall-to-nixpkgs}
301+
302+You can use the `dhall-to-nixpkgs` command-line utility to automate
303+packaging Dhall code. For example:
304+
305+```ShellSession
306+$ nix-env --install --attr haskellPackages.dhall-nixpkgs
307+
308+$ nix-env --install --attr nix-prefetch-git # Used by dhall-to-nixpkgs
309+
310+$ dhall-to-nixpkgs github https://github.com/Gabriel439/dhall-semver.git
311+{ buildDhallGitHubPackage, Prelude }:
312+ buildDhallGitHubPackage {
313+ name = "dhall-semver";
314+ githubBase = "github.com";
315+ owner = "Gabriel439";
316+ repo = "dhall-semver";
317+ rev = "2d44ae605302ce5dc6c657a1216887fbb96392a4";
318+ fetchSubmodules = false;
319+ sha256 = "0y8shvp8srzbjjpmnsvz9c12ciihnx1szs0yzyi9ashmrjvd0jcz";
320+ directory = "";
321+ file = "package.dhall";
322+ source = false;
323+ document = false;
324+ dependencies = [ (Prelude.overridePackage { file = "package.dhall"; }) ];
325+ }
326+```
327+
328+The utility takes care of automatically detecting remote imports and converting
329+them to package dependencies. You can also use the utility on local
330+Dhall directories, too:
331+
332+```ShellSession
333+$ dhall-to-nixpkgs directory ~/proj/dhall-semver
334+{ buildDhallDirectoryPackage, Prelude }:
335+ buildDhallDirectoryPackage {
336+ name = "proj";
337+ src = ~/proj/dhall-semver;
338+ file = "package.dhall";
339+ source = false;
340+ document = false;
341+ dependencies = [ (Prelude.overridePackage { file = "package.dhall"; }) ];
342+ }
343+```
344+
345+### Remote imports as fixed-output derivations {#ssec-dhall-remote-imports-as-fod}
346+
347+`dhall-to-nixpkgs` has the ability to fetch and build remote imports as
348+fixed-output derivations by using their Dhall integrity check. This is
349+sometimes easier than manually packaging all remote imports.
350+
351+This can be used like the following:
352+
353+```ShellSession
354+$ dhall-to-nixpkgs directory --fixed-output-derivations ~/proj/dhall-semver
355+{ buildDhallDirectoryPackage, buildDhallUrl }:
356+ buildDhallDirectoryPackage {
357+ name = "proj";
358+ src = ~/proj/dhall-semver;
359+ file = "package.dhall";
360+ source = false;
361+ document = false;
362+ dependencies = [
363+ (buildDhallUrl {
364+ url = "https://prelude.dhall-lang.org/v17.0.0/package.dhall";
365+ hash = "sha256-ENs8kZwl6QRoM9+Jeo/+JwHcOQ+giT2VjDQwUkvlpD4=";
366+ dhallHash = "sha256:10db3c919c25e9046833df897a8ffe2701dc390fa0893d958c3430524be5a43e";
367+ })
368+ ];
369+ }
370+```
371+
372+Here, `dhall-semver`'s `Prelude` dependency is fetched and built with the
373+`buildDhallUrl` helper function, instead of being passed in as a function
374+argument.
375+
376+## Overriding dependency versions {#ssec-dhall-overriding-dependency-versions}
377+
378+Suppose that we change our `true.dhall` example expression to depend on an older
379+version of the Prelude (19.0.0):
380+
381+```dhall
382+-- ./true.dhall
383+
384+let Prelude =
385+ https://prelude.dhall-lang.org/v19.0.0/package.dhall
386+ sha256:eb693342eb769f782174157eba9b5924cf8ac6793897fc36a31ccbd6f56dafe2
387+
388+in Prelude.Bool.not False
389+```
390+
391+If we try to rebuild that expression the build will fail:
392+
393+```ShellSession
394+$ nix build --file ./example.nix dhallPackages.true
395+builder for '/nix/store/0f1hla7ff1wiaqyk1r2ky4wnhnw114fi-true.drv' failed with exit code 1; last 10 log lines:
396+
397+ Dhall was compiled without the 'with-http' flag.
398+
399+ The requested URL was: https://prelude.dhall-lang.org/v19.0.0/package.dhall
400+
401+
402+ 4│ https://prelude.dhall-lang.org/v19.0.0/package.dhall
403+ 5│ sha256:eb693342eb769f782174157eba9b5924cf8ac6793897fc36a31ccbd6f56dafe2
404+
405+ /nix/store/rsab4y99h14912h4zplqx2iizr5n4rc2-true.dhall:4:7
406+[1 built (1 failed), 0.0 MiB DL]
407+error: build of '/nix/store/0f1hla7ff1wiaqyk1r2ky4wnhnw114fi-true.drv' failed
408+```
409+
410+… because the default Prelude selected by Nixpkgs revision
411+`94b2848559b12a8ed1fe433084686b2a81123c99is` is version 20.1.0, which doesn't
412+have the same integrity check as version 19.0.0. This means that version
413+19.0.0 is not cached and the interpreter is not allowed to fall back to
414+importing the URL.
415+
416+However, we can override the default Prelude version by using `dhall-to-nixpkgs`
417+to create a Dhall package for our desired Prelude:
418+
419+```ShellSession
420+$ dhall-to-nixpkgs github https://github.com/dhall-lang/dhall-lang.git \
421+ --name Prelude \
422+ --directory Prelude \
423+ --rev v19.0.0 \
424+ > Prelude.nix
425+```
426+
427+… and then referencing that package in our Dhall overlay, by either overriding
428+the Prelude globally for all packages, like this:
429+
430+```nix
431+ dhallOverrides = self: super: {
432+ true = self.callPackage ./true.nix { };
433+
434+ Prelude = self.callPackage ./Prelude.nix { };
435+ };
436+```
437+
438+… or selectively overriding the Prelude dependency for just the `true` package,
439+like this:
440+
441+```nix
442+ dhallOverrides = self: super: {
443+ true = self.callPackage ./true.nix {
444+ Prelude = self.callPackage ./Prelude.nix { };
445+ };
446+ };
447+```
448+
449+## Overrides {#ssec-dhall-overrides}
450+
451+You can override any of the arguments to `buildDhallGitHubPackage` or
452+`buildDhallDirectoryPackage` using the `overridePackage` attribute of a package.
453+For example, suppose we wanted to selectively enable `source = true` just for the Prelude. We can do that like this:
454+
455+```nix
456+ dhallOverrides = self: super: {
457+ Prelude = super.Prelude.overridePackage { source = true; };
458+
459+ …
460+ };
461+```
462+
463+[semantic-integrity-checks]: https://docs.dhall-lang.org/tutorials/Language-Tour.html#installing-packages
doc/languages-frameworks/dotnet.section.md+77−20
@@ -1,35 +1,34 @@
1−# Dotnet
1+# Dotnet {#dotnet}
22
3−## Local Development Workflow
3+## Local Development Workflow {#local-development-workflow}
44
55For local development, it's recommended to use nix-shell to create a dotnet environment:
66
7−```
7+```nix
88# shell.nix
99with import <nixpkgs> {};
1010
1111mkShell {
1212 name = "dotnet-env";
13− buildInputs = [
13+ packages = [
1414 dotnet-sdk_3
1515 ];
1616}
1717```
1818
19−### Using many sdks in a workflow
19+### Using many sdks in a workflow {#using-many-sdks-in-a-workflow}
2020
2121It's very likely that more than one sdk will be needed on a given project. Dotnet provides several different frameworks (E.g dotnetcore, aspnetcore, etc.) as well as many versions for a given framework. Normally, dotnet is able to fetch a framework and install it relative to the executable. However, this would mean writing to the nix store in nixpkgs, which is read-only. To support the many-sdk use case, one can compose an environment using `dotnetCorePackages.combinePackages`:
2222
23−```
23+```nix
2424with import <nixpkgs> {};
2525
2626mkShell {
2727 name = "dotnet-env";
28− buildInputs = [
28+ packages = [
2929 (with dotnetCorePackages; combinePackages [
3030 sdk_3_1
31− sdk_3_0
32− sdk_2_1
31+ sdk_5_0
3332 ])
3433 ];
3534}
@@ -37,7 +36,7 @@ mkShell {
3736
3837This will produce a dotnet installation that has the dotnet 3.1, 3.0, and 2.1 sdk. The first sdk listed will have it's cli utility present in the resulting environment. Example info output:
3938
40−```
39+```ShellSession
4140$ dotnet --info
4241.NET Core SDK (reflecting any global.json):
4342 Version: 3.1.101
@@ -60,16 +59,74 @@ $ dotnet --info
6059 Microsoft.NETCore.App 3.1.1 [/nix/store/iiv98i2jdi226dgh4jzkkj2ww7f8jgpd-dotnet-core-combined/shared/Microsoft.NETCore.App]
6160```
6261
63−## dotnet-sdk vs dotnetCorePackages.sdk
62+## dotnet-sdk vs dotnetCorePackages.sdk {#dotnet-sdk-vs-dotnetcorepackages.sdk}
6463
6564The `dotnetCorePackages.sdk_X_Y` is preferred over the old dotnet-sdk as both major and minor version are very important for a dotnet environment. If a given minor version isn't present (or was changed), then this will likely break your ability to build a project.
6665
67−## dotnetCorePackages.sdk vs vs dotnetCorePackages.net vs dotnetCorePackages.netcore vs dotnetCorePackages.aspnetcore
68−
69−The `dotnetCorePackages.sdk` contains both a runtime and the full sdk of a given version. The `net`, `netcore` and `aspnetcore` packages are meant to serve as minimal runtimes to deploy alongside already built applications. For runtime versions >= .NET 5 `net` is used while `netcore` is used for older .NET Core runtime version.
70−
71−## Packaging a Dotnet Application
72−
73−Ideally, we would like to build against the sdk, then only have the dotnet runtime available in the runtime closure.
74−
75−TODO: Create closure-friendly way to package dotnet applications
66+## dotnetCorePackages.sdk vs dotnetCorePackages.runtime vs dotnetCorePackages.aspnetcore {#dotnetcorepackages.sdk-vs-dotnetcorepackages.runtime-vs-dotnetcorepackages.aspnetcore}
67+
68+The `dotnetCorePackages.sdk` contains both a runtime and the full sdk of a given version. The `runtime` and `aspnetcore` packages are meant to serve as minimal runtimes to deploy alongside already built applications.
69+
70+## Packaging a Dotnet Application {#packaging-a-dotnet-application}
71+
72+To package Dotnet applications, you can use `buildDotnetModule`. This has similar arguments to `stdenv.mkDerivation`, with the following additions:
73+
74+* `projectFile` has to be used for specifying the dotnet project file relative to the source root. These usually have `.sln` or `.csproj` file extensions. This can be an array of multiple projects as well.
75+* `nugetDeps` has to be used to specify the NuGet dependency file. Unfortunately, these cannot be deterministically fetched without a lockfile. A script to fetch these is available as `passthru.fetch-deps`. This file can also be generated manually using `nuget-to-nix` tool, which is available in nixpkgs.
76+* `packNupkg` is used to pack project as a `nupkg`, and installs it to `$out/share`. If set to `true`, the derivation can be used as a dependency for another dotnet project by adding it to `projectReferences`.
77+* `projectReferences` can be used to resolve `ProjectReference` project items. Referenced projects can be packed with `buildDotnetModule` by setting the `packNupkg = true` attribute and passing a list of derivations to `projectReferences`. Since we are sharing referenced projects as NuGets they must be added to csproj/fsproj files as `PackageReference` as well.
78+ For example, your project has a local dependency:
79+ ```xml
80+ <ProjectReference Include="../foo/bar.fsproj" />
81+ ```
82+ To enable discovery through `projectReferences` you would need to add:
83+ ```xml
84+ <ProjectReference Include="../foo/bar.fsproj" />
85+ <PackageReference Include="bar" Version="*" Condition=" '$(ContinuousIntegrationBuild)'=='true' "/>
86+ ```
87+* `executables` is used to specify which executables get wrapped to `$out/bin`, relative to `$out/lib/$pname`. If this is unset, all executables generated will get installed. If you do not want to install any, set this to `[]`. This gets done in the `preFixup` phase.
88+* `runtimeDeps` is used to wrap libraries into `LD_LIBRARY_PATH`. This is how dotnet usually handles runtime dependencies.
89+* `buildType` is used to change the type of build. Possible values are `Release`, `Debug`, etc. By default, this is set to `Release`.
90+* `dotnet-sdk` is useful in cases where you need to change what dotnet SDK is being used.
91+* `dotnet-runtime` is useful in cases where you need to change what dotnet runtime is being used. This can be either a regular dotnet runtime, or an aspnetcore.
92+* `dotnet-test-sdk` is useful in cases where unit tests expect a different dotnet SDK. By default, this is set to the `dotnet-sdk` attribute.
93+* `testProjectFile` is useful in cases where the regular project file does not contain the unit tests. It gets restored and build, but not installed. You may need to regenerate your nuget lockfile after setting this.
94+* `disabledTests` is used to disable running specific unit tests. This gets passed as: `dotnet test --filter "FullyQualifiedName!={}"`, to ensure compatibility with all unit test frameworks.
95+* `dotnetRestoreFlags` can be used to pass flags to `dotnet restore`.
96+* `dotnetBuildFlags` can be used to pass flags to `dotnet build`.
97+* `dotnetTestFlags` can be used to pass flags to `dotnet test`. Used only if `doCheck` is set to `true`.
98+* `dotnetInstallFlags` can be used to pass flags to `dotnet install`.
99+* `dotnetPackFlags` can be used to pass flags to `dotnet pack`. Used only if `packNupkg` is set to `true`.
100+* `dotnetFlags` can be used to pass flags to all of the above phases.
101+
102+When packaging a new application, you need to fetch it's dependencies. You can set `nugetDeps` to an empty string to make the derivation temporarily evaluate, and then run `nix-build -A package.passthru.fetch-deps` to generate it's dependency fetching script. After running the script, you should have the location of the generated lockfile printed to the console. This can be copied to a stable directory. Note that if either `projectFile` or `nugetDeps` are unset, this script cannot be generated!
103+
104+Here is an example `default.nix`, using some of the previously discussed arguments:
105+```nix
106+{ lib, buildDotnetModule, dotnetCorePackages, ffmpeg }:
107+
108+let
109+ referencedProject = import ../../bar { ... };
110+in buildDotnetModule rec {
111+ pname = "someDotnetApplication";
112+ version = "0.1";
113+
114+ src = ./.;
115+
116+ projectFile = "src/project.sln";
117+ nugetDeps = ./deps.nix; # File generated with `nix-build -A package.passthru.fetch-deps`.
118+
119+ projectReferences = [ referencedProject ]; # `referencedProject` must contain `nupkg` in the folder structure.
120+
121+ dotnet-sdk = dotnetCorePackages.sdk_3_1;
122+ dotnet-runtime = dotnetCorePackages.net_5_0;
123+ dotnetFlags = [ "--runtime linux-x64" ];
124+
125+ executables = [ "foo" ]; # This wraps "$out/lib/$pname/foo" to `$out/bin/foo`.
126+ executables = []; # Don't install any executables.
127+
128+ packNupkg = true; # This packs the project as "foo-0.1.nupkg" at `$out/share`.
129+
130+ runtimeDeps = [ ffmpeg ]; # This will wrap ffmpeg's library path into `LD_LIBRARY_PATH`.
131+}
132+```
doc/languages-frameworks/emscripten.section.md+13−15
@@ -1,4 +1,4 @@
1−# Emscripten
1+# Emscripten {#emscripten}
22
33[Emscripten](https://github.com/kripken/emscripten): An LLVM-to-JavaScript Compiler
44
@@ -15,28 +15,26 @@ Modes of use of `emscripten`:
1515
1616 If you want to work with `emcc`, `emconfigure` and `emmake` as you are used to from Ubuntu and similar distributions you can use these commands:
1717
18− * `nix-env -i emscripten`
18+ * `nix-env -f "<nixpkgs>" -iA emscripten`
1919 * `nix-shell -p emscripten`
2020
2121* **Declarative usage**:
2222
23− This mode is far more power full since this makes use of `nix` for dependency management of emscripten libraries and targets by using the `mkDerivation` which is implemented by `pkgs.emscriptenStdenv` and `pkgs.buildEmscriptenPackage`. The source for the packages is in `pkgs/top-level/emscripten-packages.nix` and the abstraction behind it in `pkgs/development/em-modules/generic/default.nix`.
23+ This mode is far more power full since this makes use of `nix` for dependency management of emscripten libraries and targets by using the `mkDerivation` which is implemented by `pkgs.emscriptenStdenv` and `pkgs.buildEmscriptenPackage`. The source for the packages is in `pkgs/top-level/emscripten-packages.nix` and the abstraction behind it in `pkgs/development/em-modules/generic/default.nix`. From the root of the nixpkgs repository:
2424 * build and install all packages:
2525 * `nix-env -iA emscriptenPackages`
2626
2727 * dev-shell for zlib implementation hacking:
2828 * `nix-shell -A emscriptenPackages.zlib`
2929
30−
31−## Imperative usage
30+## Imperative usage {#imperative-usage}
3231
3332A few things to note:
3433
3534* `export EMCC_DEBUG=2` is nice for debugging
3635* `~/.emscripten`, the build artifact cache sometimes creates issues and needs to be removed from time to time
3736
38−
39−## Declarative usage
37+## Declarative usage {#declarative-usage}
4038
4139Let's see two different examples from `pkgs/top-level/emscripten-packages.nix`:
4240
@@ -50,7 +48,7 @@ A special requirement of the `pkgs.buildEmscriptenPackage` is the `doCheck = tru
5048* Use `export EMCC_DEBUG=2` from within a emscriptenPackage's `phase` to get more detailed debug output what is going wrong.
5149* ~/.emscripten cache is requiring us to set `HOME=$TMPDIR` in individual phases. This makes compilation slower but also makes it more deterministic.
5250
53−### Usage 1: pkgs.zlib.override
51+### Usage 1: pkgs.zlib.override {#usage-1-pkgs.zlib.override}
5452
5553This example uses `zlib` from nixpkgs but instead of compiling **C** to **ELF** it compiles **C** to **JS** since we were using `pkgs.zlib.override` and changed stdenv to `pkgs.emscriptenStdenv`. A few adaptions and hacks were set in place to make it working. One advantage is that when `pkgs.zlib` is updated, it will automatically update this package as well. However, this can also be the downside...
5654
@@ -60,7 +58,7 @@ See the `zlib` example:
6058 stdenv = pkgs.emscriptenStdenv;
6159 }).overrideDerivation
6260 (old: rec {
63− buildInputs = old.buildInputs ++ [ pkgconfig ];
61+ buildInputs = old.buildInputs ++ [ pkg-config ];
6462 # we need to reset this setting!
6563 NIX_CFLAGS_COMPILE="";
6664 configurePhase = ''
@@ -102,7 +100,7 @@ See the `zlib` example:
102100 echo "================= /testing zlib using node ================="
103101 '';
104102
105− postPatch = pkgs.stdenv.lib.optionalString pkgs.stdenv.isDarwin ''
103+ postPatch = pkgs.lib.optionalString pkgs.stdenv.isDarwin ''
106104 substituteInPlace configure \
107105 --replace '/usr/bin/libtool' 'ar' \
108106 --replace 'AR="libtool"' 'AR="ar"' \
@@ -110,15 +108,15 @@ See the `zlib` example:
110108 '';
111109 });
112110
113−### Usage 2: pkgs.buildEmscriptenPackage
111+### Usage 2: pkgs.buildEmscriptenPackage {#usage-2-pkgs.buildemscriptenpackage}
114112
115113This `xmlmirror` example features a emscriptenPackage which is defined completely from this context and no `pkgs.zlib.override` is used.
116114
117115 xmlmirror = pkgs.buildEmscriptenPackage rec {
118116 name = "xmlmirror";
119117
120− buildInputs = [ pkgconfig autoconf automake libtool gnumake libxml2 nodejs openjdk json_c ];
121− nativeBuildInputs = [ pkgconfig zlib ];
118+ buildInputs = [ pkg-config autoconf automake libtool gnumake libxml2 nodejs openjdk json_c ];
119+ nativeBuildInputs = [ pkg-config zlib ];
122120
123121 src = pkgs.fetchgit {
124122 url = "https://gitlab.com/odfplugfest/xmlmirror.git";
@@ -165,7 +163,7 @@ This `xmlmirror` example features a emscriptenPackage which is defined completel
165163 '';
166164 };
167165
168−### Declarative debugging
166+### Declarative debugging {#declarative-debugging}
169167
170168Use `nix-shell -I nixpkgs=/some/dir/nixpkgs -A emscriptenPackages.libz` and from there you can go trough the individual steps. This makes it easy to build a good `unit test` or list the files of the project.
171169
@@ -177,7 +175,7 @@ Use `nix-shell -I nixpkgs=/some/dir/nixpkgs -A emscriptenPackages.libz` and from
1771756. `buildPhase`
1781767. ... happy hacking...
179177
180−## Summary
178+## Summary {#summary}
181179
182180Using this toolchain makes it easy to leverage `nix` from NixOS, MacOSX or even Windows (WSL+ubuntu+nix). This toolchain is reproducible, behaves like the rest of the packages from nixpkgs and contains a set of well working examples to learn and adapt from.
183181
doc/languages-frameworks/gnome.section.mdnew file+218
@@ -0,0 +1,218 @@
1+# GNOME {#sec-language-gnome}
2+
3+## Packaging GNOME applications {#ssec-gnome-packaging}
4+
5+Programs in the GNOME universe are written in various languages but they all use GObject-based libraries like GLib, GTK or GStreamer. These libraries are often modular, relying on looking into certain directories to find their modules. However, due to Nix’s specific file system organization, this will fail without our intervention. Fortunately, the libraries usually allow overriding the directories through environment variables, either natively or thanks to a patch in nixpkgs. [Wrapping](#fun-wrapProgram) the executables to ensure correct paths are available to the application constitutes a significant part of packaging a modern desktop application. In this section, we will describe various modules needed by such applications, environment variables needed to make the modules load, and finally a script that will do the work for us.
6+
7+### Settings {#ssec-gnome-settings}
8+
9+[GSettings](https://developer.gnome.org/gio/stable/GSettings.html) API is often used for storing settings. GSettings schemas are required, to know the type and other metadata of the stored values. GLib looks for `glib-2.0/schemas/gschemas.compiled` files inside the directories of `XDG_DATA_DIRS`.
10+
11+On Linux, GSettings API is implemented using [dconf](https://wiki.gnome.org/Projects/dconf) backend. You will need to add `dconf` [GIO module](#ssec-gnome-gio-modules) to `GIO_EXTRA_MODULES` variable, otherwise the `memory` backend will be used and the saved settings will not be persistent.
12+
13+Last you will need the dconf database D-Bus service itself. You can enable it using `programs.dconf.enable`.
14+
15+Some applications will also require `gsettings-desktop-schemas` for things like reading proxy configuration or user interface customization. This dependency is often not mentioned by upstream, you should grep for `org.gnome.desktop` and `org.gnome.system` to see if the schemas are needed.
16+
17+### GIO modules {#ssec-gnome-gio-modules}
18+
19+GLib’s [GIO](https://developer.gnome.org/gio/stable/ch01.html) library supports several [extension points](https://developer.gnome.org/gio/stable/extending-gio.html). Notably, they allow:
20+
21+* implementing settings backends (already [mentioned](#ssec-gnome-settings))
22+* adding TLS support
23+* proxy settings
24+* virtual file systems
25+
26+The modules are typically installed to `lib/gio/modules/` directory of a package and you need to add them to `GIO_EXTRA_MODULES` if you need any of those features.
27+
28+In particular, we recommend:
29+
30+* adding `dconf.lib` for any software on Linux that reads [GSettings](#ssec-gnome-settings) (even transitivily through e.g. GTK’s file manager)
31+* adding `glib-networking` for any software that accesses network using GIO or libsoup – glib-networking contains a module that implements TLS support and loads system-wide proxy settings
32+
33+To allow software to use various virtual file systems, `gvfs` package can be also added. But that is usually an optional feature so we typically use `gvfs` from the system (e.g. installed globally using NixOS module).
34+
35+### GdkPixbuf loaders {#ssec-gnome-gdk-pixbuf-loaders}
36+
37+GTK applications typically use [GdkPixbuf](https://developer.gnome.org/gdk-pixbuf/stable/) to load images. But `gdk-pixbuf` package only supports basic bitmap formats like JPEG, PNG or TIFF, requiring to use third-party loader modules for other formats. This is especially painful since GTK itself includes SVG icons, which cannot be rendered without a loader provided by `librsvg`.
38+
39+Unlike other libraries mentioned in this section, GdkPixbuf only supports a single value in its controlling environment variable `GDK_PIXBUF_MODULE_FILE`. It is supposed to point to a cache file containing information about the available loaders. Each loader package will contain a `lib/gdk-pixbuf-2.0/2.10.0/loaders.cache` file describing the default loaders in `gdk-pixbuf` package plus the loader contained in the package itself. If you want to use multiple third-party loaders, you will need to create your own cache file manually. Fortunately, this is pretty rare as [not many loaders exist](https://gitlab.gnome.org/federico/gdk-pixbuf-survey/blob/master/src/modules.md).
40+
41+`gdk-pixbuf` contains [a setup hook](#ssec-gnome-hooks-gdk-pixbuf) that sets `GDK_PIXBUF_MODULE_FILE` from dependencies but as mentioned in further section, it is pretty limited. Loaders should propagate this setup hook.
42+
43+### Icons {#ssec-gnome-icons}
44+
45+When an application uses icons, an icon theme should be available in `XDG_DATA_DIRS` during runtime. The package for the default, icon-less [hicolor-icon-theme](https://www.freedesktop.org/wiki/Software/icon-theme/) (should be propagated by every icon theme) contains [a setup hook](#ssec-gnome-hooks-hicolor-icon-theme) that will pick up icon themes from `buildInputs` and add their datadirs to `XDG_ICON_DIRS` environment variable (this is Nixpkgs specific, not actually a XDG standard variable). Unfortunately, relying on that would mean every user has to download the theme included in the package expression no matter their preference. For that reason, we leave the installation of icon theme on the user. If you use one of the desktop environments, you probably already have an icon theme installed.
46+
47+In the rare case you need to use icons from dependencies (e.g. when an app forces an icon theme), you can use the following to pick them up:
48+
49+```nix
50+ buildInputs = [
51+ pantheon.elementary-icon-theme
52+ ];
53+ preFixup = ''
54+ gappsWrapperArgs+=(
55+ # The icon theme is hardcoded.
56+ --prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS"
57+ )
58+ '';
59+```
60+
61+To avoid costly file system access when locating icons, GTK, [as well as Qt](https://woboq.com/blog/qicon-reads-gtk-icon-cache-in-qt57.html), can rely on `icon-theme.cache` files from the themes' top-level directories. These files are generated using `gtk-update-icon-cache`, which is expected to be run whenever an icon is added or removed to an icon theme (typically an application icon into `hicolor` theme) and some programs do indeed run this after icon installation. However, since packages are installed into their own prefix by Nix, this would lead to conflicts. For that reason, `gtk3` provides a [setup hook](#ssec-gnome-hooks-gtk-drop-icon-theme-cache) that will clean the file from installation. Since most applications only ship their own icon that will be loaded on start-up, it should not affect them too much. On the other hand, icon themes are much larger and more widely used so we need to cache them. Because we recommend installing icon themes globally, we will generate the cache files from all packages in a profile using a NixOS module. You can enable the cache generation using `gtk.iconCache.enable` option if your desktop environment does not already do that.
62+
63+### Packaging icon themes {#ssec-icon-theme-packaging}
64+
65+Icon themes may inherit from other icon themes. The inheritance is specified using the `Inherits` key in the `index.theme` file distributed with the icon theme. According to the [icon theme specification](https://specifications.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html), icons not provided by the theme are looked for in its parent icon themes. Therefore the parent themes should be installed as dependencies for a more complete experience regarding the icon sets used.
66+
67+The package `hicolor-icon-theme` provides a setup hook which makes symbolic links for the parent themes into the directory `share/icons` of the current theme directory in the nix store, making sure they can be found at runtime. For that to work the packages providing parent icon themes should be listed as propagated build dependencies, together with `hicolor-icon-theme`.
68+
69+Also make sure that `icon-theme.cache` is installed for each theme provided by the package, and set `dontDropIconThemeCache` to `true` so that the cache file is not removed by the `gtk3` setup hook.
70+
71+### GTK Themes {#ssec-gnome-themes}
72+
73+Previously, a GTK theme needed to be in `XDG_DATA_DIRS`. This is no longer necessary for most programs since GTK incorporated Adwaita theme. Some programs (for example, those designed for [elementary HIG](https://elementary.io/docs/human-interface-guidelines#human-interface-guidelines)) might require a special theme like `pantheon.elementary-gtk-theme`.
74+
75+### GObject introspection typelibs {#ssec-gnome-typelibs}
76+
77+[GObject introspection](https://wiki.gnome.org/Projects/GObjectIntrospection) allows applications to use C libraries in other languages easily. It does this through `typelib` files searched in `GI_TYPELIB_PATH`.
78+
79+### Various plug-ins {#ssec-gnome-plugins}
80+
81+If your application uses [GStreamer](https://gstreamer.freedesktop.org/) or [Grilo](https://wiki.gnome.org/Projects/Grilo), you should set `GST_PLUGIN_SYSTEM_PATH_1_0` and `GRL_PLUGIN_PATH`, respectively.
82+
83+## Onto `wrapGAppsHook` {#ssec-gnome-hooks}
84+
85+Given the requirements above, the package expression would become messy quickly:
86+
87+```nix
88+preFixup = ''
89+ for f in $(find $out/bin/ $out/libexec/ -type f -executable); do
90+ wrapProgram "$f" \
91+ --prefix GIO_EXTRA_MODULES : "${getLib dconf}/lib/gio/modules" \
92+ --prefix XDG_DATA_DIRS : "$out/share" \
93+ --prefix XDG_DATA_DIRS : "$out/share/gsettings-schemas/${name}" \
94+ --prefix XDG_DATA_DIRS : "${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}" \
95+ --prefix XDG_DATA_DIRS : "${hicolor-icon-theme}/share" \
96+ --prefix GI_TYPELIB_PATH : "${lib.makeSearchPath "lib/girepository-1.0" [ pango json-glib ]}"
97+ done
98+'';
99+```
100+
101+Fortunately, there is [`wrapGAppsHook`]{#ssec-gnome-hooks-wrapgappshook}. It works in conjunction with other setup hooks that populate environment variables, and it will then wrap all executables in `bin` and `libexec` directories using said variables.
102+
103+For convenience, it also adds `dconf.lib` for a GIO module implementing a GSettings backend using `dconf`, `gtk3` for GSettings schemas, and `librsvg` for GdkPixbuf loader to the closure. There is also [`wrapGAppsHook4`]{#ssec-gnome-hooks-wrapgappshook4}, which replaces GTK 3 with GTK 4. And in case you are packaging a program without a graphical interface, you might want to use [`wrapGAppsNoGuiHook`]{#ssec-gnome-hooks-wrapgappsnoguihook}, which runs the same script as `wrapGAppsHook` but does not bring `gtk3` and `librsvg` into the closure.
104+
105+- `wrapGAppsHook` itself will add the package’s `share` directory to `XDG_DATA_DIRS`.
106+
107+- []{#ssec-gnome-hooks-glib} `glib` setup hook will populate `GSETTINGS_SCHEMAS_PATH` and then `wrapGAppsHook` will prepend it to `XDG_DATA_DIRS`.
108+
109+- []{#ssec-gnome-hooks-gdk-pixbuf} `gdk-pixbuf` setup hook will populate `GDK_PIXBUF_MODULE_FILE` with the path to biggest `loaders.cache` file from the dependencies containing [GdkPixbuf loaders](#ssec-gnome-gdk-pixbuf-loaders). This works fine when there are only two packages containing loaders (`gdk-pixbuf` and e.g. `librsvg`) – it will choose the second one, reasonably expecting that it will be bigger since it describes extra loader in addition to the default ones. But when there are more than two loader packages, this logic will break. One possible solution would be constructing a custom cache file for each package containing a program like `services/x11/gdk-pixbuf.nix` NixOS module does. `wrapGAppsHook` copies the `GDK_PIXBUF_MODULE_FILE` environment variable into the produced wrapper.
110+
111+- []{#ssec-gnome-hooks-gtk-drop-icon-theme-cache} One of `gtk3`’s setup hooks will remove `icon-theme.cache` files from package’s icon theme directories to avoid conflicts. Icon theme packages should prevent this with `dontDropIconThemeCache = true;`.
112+
113+- []{#ssec-gnome-hooks-dconf} `dconf.lib` is a dependency of `wrapGAppsHook`, which then also adds it to the `GIO_EXTRA_MODULES` variable.
114+
115+- []{#ssec-gnome-hooks-hicolor-icon-theme} `hicolor-icon-theme`’s setup hook will add icon themes to `XDG_ICON_DIRS`.
116+
117+- []{#ssec-gnome-hooks-gobject-introspection} `gobject-introspection` setup hook populates `GI_TYPELIB_PATH` variable with `lib/girepository-1.0` directories of dependencies, which is then added to wrapper by `wrapGAppsHook`. It also adds `share` directories of dependencies to `XDG_DATA_DIRS`, which is intended to promote GIR files but it also [pollutes the closures](https://github.com/NixOS/nixpkgs/issues/32790) of packages using `wrapGAppsHook`.
118+
119+ ::: {.warning}
120+ The setup hook [currently](https://github.com/NixOS/nixpkgs/issues/56943) does not work in expressions with `strictDeps` enabled, like Python packages. In those cases, you will need to disable it with `strictDeps = false;`.
121+ :::
122+
123+- []{#ssec-gnome-hooks-gst-grl-plugins} Setup hooks of `gst_all_1.gstreamer` and `grilo` will populate the `GST_PLUGIN_SYSTEM_PATH_1_0` and `GRL_PLUGIN_PATH` variables, respectively, which will then be added to the wrapper by `wrapGAppsHook`.
124+
125+You can also pass additional arguments to `makeWrapper` using `gappsWrapperArgs` in `preFixup` hook:
126+
127+```nix
128+preFixup = ''
129+ gappsWrapperArgs+=(
130+ # Thumbnailers
131+ --prefix XDG_DATA_DIRS : "${gdk-pixbuf}/share"
132+ --prefix XDG_DATA_DIRS : "${librsvg}/share"
133+ --prefix XDG_DATA_DIRS : "${shared-mime-info}/share"
134+ )
135+'';
136+```
137+
138+## Updating GNOME packages {#ssec-gnome-updating}
139+
140+Most GNOME package offer [`updateScript`](#var-passthru-updateScript), it is therefore possible to update to latest source tarball by running `nix-shell maintainers/scripts/update.nix --argstr package gnome.nautilus` or even en masse with `nix-shell maintainers/scripts/update.nix --argstr path gnome`. Read the package’s `NEWS` file to see what changed.
141+
142+## Frequently encountered issues {#ssec-gnome-common-issues}
143+
144+#### `GLib-GIO-ERROR **: 06:04:50.903: No GSettings schemas are installed on the system` {#ssec-gnome-common-issues-no-schemas}
145+
146+There are no schemas available in `XDG_DATA_DIRS`. Temporarily add a random package containing schemas like `gsettings-desktop-schemas` to `buildInputs`. [`glib`](#ssec-gnome-hooks-glib) and [`wrapGAppsHook`](#ssec-gnome-hooks-wrapgappshook) setup hooks will take care of making the schemas available to application and you will see the actual missing schemas with the [next error](#ssec-gnome-common-issues-missing-schema). Or you can try looking through the source code for the actual schemas used.
147+
148+#### `GLib-GIO-ERROR **: 06:04:50.903: Settings schema ‘org.gnome.foo’ is not installed` {#ssec-gnome-common-issues-missing-schema}
149+
150+Package is missing some GSettings schemas. You can find out the package containing the schema with `nix-locate org.gnome.foo.gschema.xml` and let the hooks handle the wrapping as [above](#ssec-gnome-common-issues-no-schemas).
151+
152+#### When using `wrapGAppsHook` with special derivers you can end up with double wrapped binaries. {#ssec-gnome-common-issues-double-wrapped}
153+
154+This is because derivers like `python.pkgs.buildPythonApplication` or `qt5.mkDerivation` have setup-hooks automatically added that produce wrappers with makeWrapper. The simplest way to workaround that is to disable the `wrapGAppsHook` automatic wrapping with `dontWrapGApps = true;` and pass the arguments it intended to pass to makeWrapper to another.
155+
156+In the case of a Python application it could look like:
157+
158+```nix
159+python3.pkgs.buildPythonApplication {
160+ pname = "gnome-music";
161+ version = "3.32.2";
162+
163+ nativeBuildInputs = [
164+ wrapGAppsHook
165+ gobject-introspection
166+ ...
167+ ];
168+
169+ dontWrapGApps = true;
170+
171+ # Arguments to be passed to `makeWrapper`, only used by buildPython*
172+ preFixup = ''
173+ makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
174+ '';
175+}
176+```
177+
178+And for a QT app like:
179+
180+```nix
181+mkDerivation {
182+ pname = "calibre";
183+ version = "3.47.0";
184+
185+ nativeBuildInputs = [
186+ wrapGAppsHook
187+ qmake
188+ ...
189+ ];
190+
191+ dontWrapGApps = true;
192+
193+ # Arguments to be passed to `makeWrapper`, only used by qt5’s mkDerivation
194+ preFixup = ''
195+ qtWrapperArgs+=("''${gappsWrapperArgs[@]}")
196+ '';
197+}
198+```
199+
200+#### I am packaging a project that cannot be wrapped, like a library or GNOME Shell extension. {#ssec-gnome-common-issues-unwrappable-package}
201+
202+You can rely on applications depending on the library setting the necessary environment variables but that is often easy to miss. Instead we recommend to patch the paths in the source code whenever possible. Here are some examples:
203+
204+- []{#ssec-gnome-common-issues-unwrappable-package-gnome-shell-ext} [Replacing a `GI_TYPELIB_PATH` in GNOME Shell extension](https://github.com/NixOS/nixpkgs/blob/7bb8f05f12ca3cff9da72b56caa2f7472d5732bc/pkgs/desktops/gnome-3/core/gnome-shell-extensions/default.nix#L21-L24) – we are using `substituteAll` to include the path to a typelib into a patch.
205+
206+- []{#ssec-gnome-common-issues-unwrappable-package-gsettings} The following examples are hardcoding GSettings schema paths. To get the schema paths we use the functions
207+
208+ * `glib.getSchemaPath` Takes a nix package attribute as an argument.
209+
210+ * `glib.makeSchemaPath` Takes a package output like `$out` and a derivation name. You should use this if the schemas you need to hardcode are in the same derivation.
211+
212+ []{#ssec-gnome-common-issues-unwrappable-package-gsettings-vala} [Hard-coding GSettings schema path in Vala plug-in (dynamically loaded library)](https://github.com/NixOS/nixpkgs/blob/7bb8f05f12ca3cff9da72b56caa2f7472d5732bc/pkgs/desktops/pantheon/apps/elementary-files/default.nix#L78-L86) – here, `substituteAll` cannot be used since the schema comes from the same package preventing us from pass its path to the function, probably due to a [Nix bug](https://github.com/NixOS/nix/issues/1846).
213+
214+ []{#ssec-gnome-common-issues-unwrappable-package-gsettings-c} [Hard-coding GSettings schema path in C library](https://github.com/NixOS/nixpkgs/blob/29c120c065d03b000224872251bed93932d42412/pkgs/development/libraries/glib-networking/default.nix#L31-L34) – nothing special other than using [Coccinelle patch](https://github.com/NixOS/nixpkgs/pull/67957#issuecomment-527717467) to generate the patch itself.
215+
216+#### I need to wrap a binary outside `bin` and `libexec` directories. {#ssec-gnome-common-issues-weird-location}
217+
218+You can manually trigger the wrapping with `wrapGApp` in `preFixup` phase. It takes a path to a program as a first argument; the remaining arguments are passed directly to [`wrapProgram`](#fun-wrapProgram) function.
doc/languages-frameworks/gnome.xmldeleted−299
@@ -1,299 +0,0 @@
1−<section xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="sec-language-gnome">
2− <title>GNOME</title>
3−
4− <section xml:id="ssec-gnome-packaging">
5− <title>Packaging GNOME applications</title>
6−
7− <para>
8− Programs in the GNOME universe are written in various languages but they all use GObject-based libraries like GLib, GTK or GStreamer. These libraries are often modular, relying on looking into certain directories to find their modules. However, due to Nix’s specific file system organization, this will fail without our intervention. Fortunately, the libraries usually allow overriding the directories through environment variables, either natively or thanks to a patch in nixpkgs. <link xlink:href="#fun-wrapProgram">Wrapping</link> the executables to ensure correct paths are available to the application constitutes a significant part of packaging a modern desktop application. In this section, we will describe various modules needed by such applications, environment variables needed to make the modules load, and finally a script that will do the work for us.
9− </para>
10−
11− <section xml:id="ssec-gnome-settings">
12− <title>Settings</title>
13−
14− <para>
15− <link xlink:href="https://developer.gnome.org/gio/stable/GSettings.html">GSettings</link> API is often used for storing settings. GSettings schemas are required, to know the type and other metadata of the stored values. GLib looks for <filename>glib-2.0/schemas/gschemas.compiled</filename> files inside the directories of <envar>XDG_DATA_DIRS</envar>.
16− </para>
17−
18− <para>
19− On Linux, GSettings API is implemented using <link xlink:href="https://wiki.gnome.org/Projects/dconf">dconf</link> backend. You will need to add <literal>dconf</literal> GIO module to <envar>GIO_EXTRA_MODULES</envar> variable, otherwise the <literal>memory</literal> backend will be used and the saved settings will not be persistent.
20− </para>
21−
22− <para>
23− Last you will need the dconf database D-Bus service itself. You can enable it using <option>programs.dconf.enable</option>.
24− </para>
25−
26− <para>
27− Some applications will also require <package>gsettings-desktop-schemas</package> for things like reading proxy configuration or user interface customization. This dependency is often not mentioned by upstream, you should grep for <literal>org.gnome.desktop</literal> and <literal>org.gnome.system</literal> to see if the schemas are needed.
28− </para>
29− </section>
30−
31− <section xml:id="ssec-gnome-icons">
32− <title>Icons</title>
33−
34− <para>
35− When an application uses icons, an icon theme should be available in <envar>XDG_DATA_DIRS</envar> during runtime. The package for the default, icon-less <link xlink:href="https://www.freedesktop.org/wiki/Software/icon-theme/">hicolor-icon-theme</link> (should be propagated by every icon theme) contains <link linkend="ssec-gnome-hooks-hicolor-icon-theme">a setup hook</link> that will pick up icon themes from <literal>buildInputs</literal> and pass it to our wrapper. Unfortunately, relying on that would mean every user has to download the theme included in the package expression no matter their preference. For that reason, we leave the installation of icon theme on the user. If you use one of the desktop environments, you probably already have an icon theme installed.
36− </para>
37−
38− <para>
39− To avoid costly file system access when locating icons, GTK, <link xlink:href="https://woboq.com/blog/qicon-reads-gtk-icon-cache-in-qt57.html">as well as Qt</link>, can rely on <filename>icon-theme.cache</filename> files from the themes’ top-level directories. These files are generated using <command>gtk-update-icon-cache</command>, which is expected to be run whenever an icon is added or removed to an icon theme (typically an application icon into <literal>hicolor</literal> theme) and some programs do indeed run this after icon installation. However, since packages are installed into their own prefix by Nix, this would lead to conflicts. For that reason, <package>gtk3</package> provides a <link xlink:href="#ssec-gnome-hooks-gtk-drop-icon-theme-cache">setup hook</link> that will clean the file from installation. Since most applications only ship their own icon that will be loaded on start-up, it should not affect them too much. On the other hand, icon themes are much larger and more widely used so we need to cache them. Because we recommend installing icon themes globally, we will generate the cache files from all packages in a profile using a NixOS module. You can enable the cache generation using <option>gtk.iconCache.enable</option> option if your desktop environment does not already do that.
40− </para>
41− </section>
42−
43− <section xml:id="ssec-icon-theme-packaging">
44− <title>Packaging icon themes</title>
45−
46− <para>
47− Icon themes may inherit from other icon themes. The inheritance is specified using the <literal>Inherits</literal> key in the <filename>index.theme</filename> file distributed with the icon theme. According to the <link xlink:href="https://specifications.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html">icon theme specification</link>, icons not provided by the theme are looked for in its parent icon themes. Therefore the parent themes should be installed as dependencies for a more complete experience regarding the icon sets used.
48− </para>
49−
50− <para>
51− The package <package>hicolor-icon-theme</package> provides a setup hook which makes symbolic links for the parent themes into the directory <filename>share/icons</filename> of the current theme directory in the nix store, making sure they can be found at runtime. For that to work the packages providing parent icon themes should be listed as propagated build dependencies, together with <package>hicolor-icon-theme</package>.
52− </para>
53−
54− <para>
55− Also make sure that <filename>icon-theme.cache</filename> is installed for each theme provided by the package, and set <code>dontDropIconThemeCache</code> to <code>true</code> so that the cache file is not removed by the <package>gtk3</package> setup hook.
56− </para>
57−
58− </section>
59−
60− <section xml:id="ssec-gnome-themes">
61− <title>GTK Themes</title>
62−
63− <para>
64− Previously, a GTK theme needed to be in <envar>XDG_DATA_DIRS</envar>. This is no longer necessary for most programs since GTK incorporated Adwaita theme. Some programs (for example, those designed for <link xlink:href="https://elementary.io/docs/human-interface-guidelines#human-interface-guidelines">elementary HIG</link>) might require a special theme like <package>pantheon.elementary-gtk-theme</package>.
65− </para>
66− </section>
67−
68− <section xml:id="ssec-gnome-typelibs">
69− <title>GObject introspection typelibs</title>
70−
71− <para>
72− <link xlink:href="https://wiki.gnome.org/Projects/GObjectIntrospection">GObject introspection</link> allows applications to use C libraries in other languages easily. It does this through <literal>typelib</literal> files searched in <envar>GI_TYPELIB_PATH</envar>.
73− </para>
74− </section>
75−
76− <section xml:id="ssec-gnome-plugins">
77− <title>Various plug-ins</title>
78−
79− <para>
80− If your application uses <link xlink:href="https://gstreamer.freedesktop.org/">GStreamer</link> or <link xlink:href="https://wiki.gnome.org/Projects/Grilo">Grilo</link>, you should set <envar>GST_PLUGIN_SYSTEM_PATH_1_0</envar> and <envar>GRL_PLUGIN_PATH</envar>, respectively.
81− </para>
82− </section>
83− </section>
84−
85− <section xml:id="ssec-gnome-hooks">
86− <title>Onto <package>wrapGAppsHook</package></title>
87−
88− <para>
89− Given the requirements above, the package expression would become messy quickly:
90−<programlisting>
91−preFixup = ''
92− for f in $(find $out/bin/ $out/libexec/ -type f -executable); do
93− wrapProgram "$f" \
94− --prefix GIO_EXTRA_MODULES : "${getLib dconf}/lib/gio/modules" \
95− --prefix XDG_DATA_DIRS : "$out/share" \
96− --prefix XDG_DATA_DIRS : "$out/share/gsettings-schemas/${name}" \
97− --prefix XDG_DATA_DIRS : "${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}" \
98− --prefix XDG_DATA_DIRS : "${hicolor-icon-theme}/share" \
99− --prefix GI_TYPELIB_PATH : "${lib.makeSearchPath "lib/girepository-1.0" [ pango json-glib ]}"
100− done
101−'';
102−</programlisting>
103− Fortunately, there is <package>wrapGAppsHook</package>, that does the wrapping for us. In particular, it works in conjunction with other setup hooks that will populate the variable:
104− <itemizedlist>
105− <listitem xml:id="ssec-gnome-hooks-wrapgappshook">
106− <para>
107− <package>wrapGAppsHook</package> itself will add the package’s <filename>share</filename> directory to <envar>XDG_DATA_DIRS</envar>.
108− </para>
109− </listitem>
110− <listitem xml:id="ssec-gnome-hooks-glib">
111− <para>
112− <package>glib</package> setup hook will populate <envar>GSETTINGS_SCHEMAS_PATH</envar> and then <package>wrapGAppsHook</package> will prepend it to <envar>XDG_DATA_DIRS</envar>.
113− </para>
114− </listitem>
115− <listitem xml:id="ssec-gnome-hooks-gtk-drop-icon-theme-cache">
116− <para>
117− One of <package>gtk3</package>’s setup hooks will remove <filename>icon-theme.cache</filename> files from package’s icon theme directories to avoid conflicts. Icon theme packages should prevent this with <code>dontDropIconThemeCache = true;</code>.
118− </para>
119− </listitem>
120− <listitem xml:id="ssec-gnome-hooks-dconf">
121− <para>
122− <package>dconf.lib</package> is a dependency of <package>wrapGAppsHook</package>, which then also adds it to the <envar>GIO_EXTRA_MODULES</envar> variable.
123− </para>
124− </listitem>
125− <listitem xml:id="ssec-gnome-hooks-hicolor-icon-theme">
126− <para>
127− <package>hicolor-icon-theme</package>’s setup hook will add icon themes to <envar>XDG_ICON_DIRS</envar> which is prepended to <envar>XDG_DATA_DIRS</envar> by <package>wrapGAppsHook</package>.
128− </para>
129− </listitem>
130− <listitem xml:id="ssec-gnome-hooks-gobject-introspection">
131− <para>
132− <package>gobject-introspection</package> setup hook populates <envar>GI_TYPELIB_PATH</envar> variable with <filename>lib/girepository-1.0</filename> directories of dependencies, which is then added to wrapper by <package>wrapGAppsHook</package>. It also adds <filename>share</filename> directories of dependencies to <envar>XDG_DATA_DIRS</envar>, which is intended to promote GIR files but it also <link xlink:href="https://github.com/NixOS/nixpkgs/issues/32790">pollutes the closures</link> of packages using <package>wrapGAppsHook</package>.
133− </para>
134− <warning>
135− <para>
136− The setup hook <link xlink:href="https://github.com/NixOS/nixpkgs/issues/56943">currently</link> does not work in expressions with <literal>strictDeps</literal> enabled, like Python packages. In those cases, you will need to disable it with <code>strictDeps = false;</code>.
137− </para>
138− </warning>
139− </listitem>
140− <listitem xml:id="ssec-gnome-hooks-gst-grl-plugins">
141− <para>
142− Setup hooks of <package>gst_all_1.gstreamer</package> and <package>gnome3.grilo</package> will populate the <envar>GST_PLUGIN_SYSTEM_PATH_1_0</envar> and <envar>GRL_PLUGIN_PATH</envar> variables, respectively, which will then be added to the wrapper by <literal>wrapGAppsHook</literal>.
143− </para>
144− </listitem>
145− </itemizedlist>
146− </para>
147−
148− <para>
149− You can also pass additional arguments to <literal>makeWrapper</literal> using <literal>gappsWrapperArgs</literal> in <literal>preFixup</literal> hook:
150−<programlisting>
151−preFixup = ''
152− gappsWrapperArgs+=(
153− # Thumbnailers
154− --prefix XDG_DATA_DIRS : "${gdk-pixbuf}/share"
155− --prefix XDG_DATA_DIRS : "${librsvg}/share"
156− --prefix XDG_DATA_DIRS : "${shared-mime-info}/share"
157− )
158−'';
159−</programlisting>
160− </para>
161− </section>
162−
163− <section xml:id="ssec-gnome-updating">
164− <title>Updating GNOME packages</title>
165−
166− <para>
167− Most GNOME package offer <link linkend="var-passthru-updateScript"><literal>updateScript</literal></link>, it is therefore possible to update to latest source tarball by running <command>nix-shell maintainers/scripts/update.nix --argstr package gnome3.nautilus</command> or even en masse with <command>nix-shell maintainers/scripts/update.nix --argstr path gnome3</command>. Read the package’s <filename>NEWS</filename> file to see what changed.
168− </para>
169− </section>
170−
171− <section xml:id="ssec-gnome-common-issues">
172− <title>Frequently encountered issues</title>
173−
174− <variablelist>
175− <varlistentry xml:id="ssec-gnome-common-issues-no-schemas">
176− <term>
177− <computeroutput>GLib-GIO-ERROR **: <replaceable>06:04:50.903</replaceable>: No GSettings schemas are installed on the system</computeroutput>
178− </term>
179− <listitem>
180− <para>
181− There are no schemas avalable in <envar>XDG_DATA_DIRS</envar>. Temporarily add a random package containing schemas like <package>gsettings-desktop-schemas</package> to <literal>buildInputs</literal>. <link linkend="ssec-gnome-hooks-glib"><package>glib</package></link> and <link linkend="ssec-gnome-hooks-wrapgappshook"><package>wrapGAppsHook</package></link> setup hooks will take care of making the schemas available to application and you will see the actual missing schemas with the <link linkend="ssec-gnome-common-issues-missing-schema">next error</link>. Or you can try looking through the source code for the actual schemas used.
182− </para>
183− </listitem>
184− </varlistentry>
185− <varlistentry xml:id="ssec-gnome-common-issues-missing-schema">
186− <term>
187− <computeroutput>GLib-GIO-ERROR **: <replaceable>06:04:50.903</replaceable>: Settings schema ‘<replaceable>org.gnome.foo</replaceable>’ is not installed</computeroutput>
188− </term>
189− <listitem>
190− <para>
191− Package is missing some GSettings schemas. You can find out the package containing the schema with <command>nix-locate <replaceable>org.gnome.foo</replaceable>.gschema.xml</command> and let the hooks handle the wrapping as <link linkend="ssec-gnome-common-issues-no-schemas">above</link>.
192− </para>
193− </listitem>
194− </varlistentry>
195− <varlistentry xml:id="ssec-gnome-common-issues-double-wrapped">
196− <term>
197− When using <package>wrapGAppsHook</package> with special derivers you can end up with double wrapped binaries.
198− </term>
199− <listitem>
200− <para>
201− This is because derivers like <function>python.pkgs.buildPythonApplication</function> or <function>qt5.mkDerivation</function> have setup-hooks automatically added that produce wrappers with <package>makeWrapper</package>. The simplest way to workaround that is to disable the <package>wrapGAppsHook</package> automatic wrapping with <code>dontWrapGApps = true;</code> and pass the arguments it intended to pass to <package>makeWrapper</package> to another.
202− </para>
203− <para>
204− In the case of a Python application it could look like:
205−<programlisting>
206−python3.pkgs.buildPythonApplication {
207− pname = "gnome-music";
208− version = "3.32.2";
209−
210− nativeBuildInputs = [
211− wrapGAppsHook
212− gobject-introspection
213− ...
214− ];
215−
216− dontWrapGApps = true;
217−
218− # Arguments to be passed to `makeWrapper`, only used by buildPython*
219− preFixup = ''
220− makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
221− '';
222−}
223−</programlisting>
224− And for a QT app like:
225−<programlisting>
226−mkDerivation {
227− pname = "calibre";
228− version = "3.47.0";
229−
230− nativeBuildInputs = [
231− wrapGAppsHook
232− qmake
233− ...
234− ];
235−
236− dontWrapGApps = true;
237−
238− # Arguments to be passed to `makeWrapper`, only used by qt5’s mkDerivation
239− preFixup = ''
240− qtWrapperArgs+=("''${gappsWrapperArgs[@]}")
241− '';
242−}
243−</programlisting>
244− </para>
245− </listitem>
246− </varlistentry>
247− <varlistentry xml:id="ssec-gnome-common-issues-unwrappable-package">
248− <term>
249− I am packaging a project that cannot be wrapped, like a library or GNOME Shell extension.
250− </term>
251− <listitem>
252− <para>
253− You can rely on applications depending on the library setting the necessary environment variables but that is often easy to miss. Instead we recommend to patch the paths in the source code whenever possible. Here are some examples:
254− <itemizedlist>
255− <listitem xml:id="ssec-gnome-common-issues-unwrappable-package-gnome-shell-ext">
256− <para>
257− <link xlink:href="https://github.com/NixOS/nixpkgs/blob/7bb8f05f12ca3cff9da72b56caa2f7472d5732bc/pkgs/desktops/gnome-3/core/gnome-shell-extensions/default.nix#L21-L24">Replacing a <envar>GI_TYPELIB_PATH</envar> in GNOME Shell extension</link> – we are using <function>substituteAll</function> to include the path to a typelib into a patch.
258− </para>
259− </listitem>
260− <listitem xml:id="ssec-gnome-common-issues-unwrappable-package-gsettings">
261− <para>
262− The following examples are hardcoding GSettings schema paths. To get the schema paths we use the functions
263− <itemizedlist>
264− <listitem>
265− <para>
266− <function>glib.getSchemaPath</function> Takes a nix package attribute as an argument.
267− </para>
268− </listitem>
269− <listitem>
270− <para>
271− <function>glib.makeSchemaPath</function> Takes a package output like <literal>$out</literal> and a derivation name. You should use this if the schemas you need to hardcode are in the same derivation.
272− </para>
273− </listitem>
274− </itemizedlist>
275− </para>
276− <para xml:id="ssec-gnome-common-issues-unwrappable-package-gsettings-vala">
277− <link xlink:href="https://github.com/NixOS/nixpkgs/blob/7bb8f05f12ca3cff9da72b56caa2f7472d5732bc/pkgs/desktops/pantheon/apps/elementary-files/default.nix#L78-L86">Hard-coding GSettings schema path in Vala plug-in (dynamically loaded library)</link> – here, <function>substituteAll</function> cannot be used since the schema comes from the same package preventing us from pass its path to the function, probably due to a <link xlink:href="https://github.com/NixOS/nix/issues/1846">Nix bug</link>.
278− </para>
279− <para xml:id="ssec-gnome-common-issues-unwrappable-package-gsettings-c">
280− <link xlink:href="https://github.com/NixOS/nixpkgs/blob/29c120c065d03b000224872251bed93932d42412/pkgs/development/libraries/glib-networking/default.nix#L31-L34">Hard-coding GSettings schema path in C library</link> – nothing special other than using <link xlink:href="https://github.com/NixOS/nixpkgs/pull/67957#issuecomment-527717467">Coccinelle patch</link> to generate the patch itself.
281− </para>
282− </listitem>
283− </itemizedlist>
284− </para>
285− </listitem>
286− </varlistentry>
287− <varlistentry xml:id="ssec-gnome-common-issues-weird-location">
288− <term>
289− I need to wrap a binary outside <filename>bin</filename> and <filename>libexec</filename> directories.
290− </term>
291− <listitem>
292− <para>
293− You can manually trigger the wrapping with <function>wrapGApp</function> in <literal>preFixup</literal> phase. It takes a path to a program as a first argument; the remaining arguments are passed directly to <function xlink:href="#fun-wrapProgram">wrapProgram</function> function.
294− </para>
295− </listitem>
296− </varlistentry>
297− </variablelist>
298− </section>
299−</section>
doc/languages-frameworks/go.section.mdnew file+149
@@ -0,0 +1,149 @@
1+# Go {#sec-language-go}
2+
3+## Go modules {#ssec-language-go}
4+
5+The function `buildGoModule` builds Go programs managed with Go modules. It builds a [Go Modules](https://github.com/golang/go/wiki/Modules) through a two phase build:
6+
7+- An intermediate fetcher derivation. This derivation will be used to fetch all of the dependencies of the Go module.
8+- A final derivation will use the output of the intermediate derivation to build the binaries and produce the final output.
9+
10+### Example for `buildGoModule` {#ex-buildGoModule}
11+
12+In the following is an example expression using `buildGoModule`, the following arguments are of special significance to the function:
13+
14+- `vendorSha256`: is the hash of the output of the intermediate fetcher derivation. `vendorSha256` can also take `null` as an input. When `null` is used as a value, rather than fetching the dependencies and vendoring them, we use the vendoring included within the source repo. If you'd like to not have to update this field on dependency changes, run `go mod vendor` in your source repo and set `vendorSha256 = null;`
15+- `proxyVendor`: Fetches (go mod download) and proxies the vendor directory. This is useful if your code depends on c code and go mod tidy does not include the needed sources to build or if any dependency has case-insensitive conflicts which will produce platform dependant `vendorSha256` checksums.
16+
17+```nix
18+pet = buildGoModule rec {
19+ pname = "pet";
20+ version = "0.3.4";
21+
22+ src = fetchFromGitHub {
23+ owner = "knqyf263";
24+ repo = "pet";
25+ rev = "v${version}";
26+ sha256 = "0m2fzpqxk7hrbxsgqplkg7h2p7gv6s1miymv3gvw0cz039skag0s";
27+ };
28+
29+ vendorSha256 = "1879j77k96684wi554rkjxydrj8g3hpp0kvxz03sd8dmwr3lh83j";
30+
31+ meta = with lib; {
32+ description = "Simple command-line snippet manager, written in Go";
33+ homepage = "https://github.com/knqyf263/pet";
34+ license = licenses.mit;
35+ maintainers = with maintainers; [ kalbasit ];
36+ };
37+}
38+```
39+
40+## `buildGoPackage` (legacy) {#ssec-go-legacy}
41+
42+The function `buildGoPackage` builds legacy Go programs, not supporting Go modules.
43+
44+### Example for `buildGoPackage` {#example-for-buildgopackage}
45+
46+In the following is an example expression using buildGoPackage, the following arguments are of special significance to the function:
47+
48+- `goPackagePath` specifies the package's canonical Go import path.
49+- `goDeps` is where the Go dependencies of a Go program are listed as a list of package source identified by Go import path. It could be imported as a separate `deps.nix` file for readability. The dependency data structure is described below.
50+
51+```nix
52+deis = buildGoPackage rec {
53+ pname = "deis";
54+ version = "1.13.0";
55+
56+ goPackagePath = "github.com/deis/deis";
57+
58+ src = fetchFromGitHub {
59+ owner = "deis";
60+ repo = "deis";
61+ rev = "v${version}";
62+ sha256 = "1qv9lxqx7m18029lj8cw3k7jngvxs4iciwrypdy0gd2nnghc68sw";
63+ };
64+
65+ goDeps = ./deps.nix;
66+}
67+```
68+
69+The `goDeps` attribute can be imported from a separate `nix` file that defines which Go libraries are needed and should be included in `GOPATH` for `buildPhase`:
70+
71+```nix
72+# deps.nix
73+[ # goDeps is a list of Go dependencies.
74+ {
75+ # goPackagePath specifies Go package import path.
76+ goPackagePath = "gopkg.in/yaml.v2";
77+ fetch = {
78+ # `fetch type` that needs to be used to get package source.
79+ # If `git` is used there should be `url`, `rev` and `sha256` defined next to it.
80+ type = "git";
81+ url = "https://gopkg.in/yaml.v2";
82+ rev = "a83829b6f1293c91addabc89d0571c246397bbf4";
83+ sha256 = "1m4dsmk90sbi17571h6pld44zxz7jc4lrnl4f27dpd1l8g5xvjhh";
84+ };
85+ }
86+ {
87+ goPackagePath = "github.com/docopt/docopt-go";
88+ fetch = {
89+ type = "git";
90+ url = "https://github.com/docopt/docopt-go";
91+ rev = "784ddc588536785e7299f7272f39101f7faccc3f";
92+ sha256 = "0wwz48jl9fvl1iknvn9dqr4gfy1qs03gxaikrxxp9gry6773v3sj";
93+ };
94+ }
95+]
96+```
97+
98+To extract dependency information from a Go package in automated way use [go2nix](https://github.com/kamilchm/go2nix). It can produce complete derivation and `goDeps` file for Go programs.
99+
100+You may use Go packages installed into the active Nix profiles by adding the following to your ~/.bashrc:
101+
102+```bash
103+for p in $NIX_PROFILES; do
104+ GOPATH="$p/share/go:$GOPATH"
105+done
106+```
107+
108+## Attributes used by the builders {#ssec-go-common-attributes}
109+
110+Both `buildGoModule` and `buildGoPackage` can be tweaked to behave slightly differently, if the following attributes are used:
111+
112+### `ldflags` {#var-go-ldflags}
113+
114+Arguments to pass to the Go linker tool via the `-ldflags` argument of `go build`. The most common use case for this argument is to make the resulting executable aware of its own version. For example:
115+
116+```nix
117+ ldflags = [
118+ "-s" "-w"
119+ "-X main.Version=${version}"
120+ "-X main.Commit=${version}"
121+ ];
122+```
123+
124+### `tags` {#var-go-tags}
125+
126+Arguments to pass to the Go via the `-tags` argument of `go build`. For example:
127+
128+```nix
129+ tags = [
130+ "production"
131+ "sqlite"
132+ ];
133+```
134+
135+```nix
136+ tags = [ "production" ] ++ lib.optionals withSqlite [ "sqlite" ];
137+```
138+
139+### `deleteVendor` {#var-go-deleteVendor}
140+
141+Removes the pre-existing vendor directory. This should only be used if the dependencies included in the vendor folder are broken or incomplete.
142+
143+### `subPackages` {#var-go-subPackages}
144+
145+Specified as a string or list of strings. Limits the builder from building child packages that have not been listed. If `subPackages` is not specified, all child packages will be built.
146+
147+### `excludedPackages` {#var-go-excludedPackages}
148+
149+Specified as a string or list of strings. Causes the builder to skip building child packages that match any of the provided values. If `excludedPackages` is not specified, all child packages will be built.
doc/languages-frameworks/go.xmldeleted−248
@@ -1,248 +0,0 @@
1−<section xmlns="http://docbook.org/ns/docbook"
2− xmlns:xlink="http://www.w3.org/1999/xlink"
3− xml:id="sec-language-go">
4− <title>Go</title>
5−
6− <section xml:id="ssec-go-modules">
7− <title>Go modules</title>
8−
9− <para>
10− The function <varname> buildGoModule </varname> builds Go programs managed with Go modules. It builds a <link xlink:href="https://github.com/golang/go/wiki/Modules">Go modules</link> through a two phase build:
11− <itemizedlist>
12− <listitem>
13− <para>
14− An intermediate fetcher derivation. This derivation will be used to fetch all of the dependencies of the Go module.
15− </para>
16− </listitem>
17− <listitem>
18− <para>
19− A final derivation will use the output of the intermediate derivation to build the binaries and produce the final output.
20− </para>
21− </listitem>
22− </itemizedlist>
23− </para>
24−
25− <example xml:id='ex-buildGoModule'>
26− <title>buildGoModule</title>
27−<programlisting>
28−pet = buildGoModule rec {
29− pname = "pet";
30− version = "0.3.4";
31−
32− src = fetchFromGitHub {
33− owner = "knqyf263";
34− repo = "pet";
35− rev = "v${version}";
36− sha256 = "0m2fzpqxk7hrbxsgqplkg7h2p7gv6s1miymv3gvw0cz039skag0s";
37− };
38−
39− vendorSha256 = "1879j77k96684wi554rkjxydrj8g3hpp0kvxz03sd8dmwr3lh83j"; <co xml:id='ex-buildGoModule-1' />
40−
41− runVend = true; <co xml:id='ex-buildGoModule-2' />
42−
43− meta = with lib; {
44− description = "Simple command-line snippet manager, written in Go";
45− homepage = "https://github.com/knqyf263/pet";
46− license = licenses.mit;
47− maintainers = with maintainers; [ kalbasit ];
48− platforms = platforms.linux ++ platforms.darwin;
49− };
50−}
51−</programlisting>
52− </example>
53−
54− <para>
55− <xref linkend='ex-buildGoModule'/> is an example expression using buildGoModule, the following arguments are of special significance to the function:
56− <calloutlist>
57− <callout arearefs='ex-buildGoModule-1'>
58− <para>
59− <varname>vendorSha256</varname> is the hash of the output of the intermediate fetcher derivation.
60− </para>
61− </callout>
62− <callout arearefs='ex-buildGoModule-2'>
63− <para>
64− <varname>runVend</varname> runs the vend command to generate the vendor directory. This is useful if your code depends on c code and go mod tidy does not include the needed sources to build.
65− </para>
66− </callout>
67− </calloutlist>
68− </para>
69−
70− <para>
71− <varname>vendorSha256</varname> can also take <varname>null</varname> as an input. When `null` is used as a value, rather than fetching the dependencies and vendoring them, we use the vendoring included within the source repo. If you'd like to not have to update this field on dependency changes, run `go mod vendor` in your source repo and set 'vendorSha256 = null;'
72− </para>
73− </section>
74−
75− <section xml:id="ssec-go-legacy">
76− <title>Go legacy</title>
77−
78− <para>
79− The function <varname> buildGoPackage </varname> builds legacy Go programs, not supporting Go modules.
80− </para>
81−
82− <example xml:id='ex-buildGoPackage'>
83− <title>buildGoPackage</title>
84−<programlisting>
85−deis = buildGoPackage rec {
86− pname = "deis";
87− version = "1.13.0";
88−
89− goPackagePath = "github.com/deis/deis"; <co xml:id='ex-buildGoPackage-1' />
90−
91− src = fetchFromGitHub {
92− owner = "deis";
93− repo = "deis";
94− rev = "v${version}";
95− sha256 = "1qv9lxqx7m18029lj8cw3k7jngvxs4iciwrypdy0gd2nnghc68sw";
96− };
97−
98− goDeps = ./deps.nix; <co xml:id='ex-buildGoPackage-2' />
99−}
100−</programlisting>
101− </example>
102−
103− <para>
104− <xref linkend='ex-buildGoPackage'/> is an example expression using buildGoPackage, the following arguments are of special significance to the function:
105− <calloutlist>
106− <callout arearefs='ex-buildGoPackage-1'>
107− <para>
108− <varname>goPackagePath</varname> specifies the package's canonical Go import path.
109− </para>
110− </callout>
111− <callout arearefs='ex-buildGoPackage-2'>
112− <para>
113− <varname>goDeps</varname> is where the Go dependencies of a Go program are listed as a list of package source identified by Go import path. It could be imported as a separate <varname>deps.nix</varname> file for readability. The dependency data structure is described below.
114− </para>
115− </callout>
116− </calloutlist>
117− </para>
118−
119− <para>
120− The <varname>goDeps</varname> attribute can be imported from a separate <varname>nix</varname> file that defines which Go libraries are needed and should be included in <varname>GOPATH</varname> for <varname>buildPhase</varname>.
121− </para>
122−
123− <example xml:id='ex-goDeps'>
124− <title>deps.nix</title>
125−<programlisting>
126−[ <co xml:id='ex-goDeps-1' />
127− {
128− goPackagePath = "gopkg.in/yaml.v2"; <co xml:id='ex-goDeps-2' />
129− fetch = {
130− type = "git"; <co xml:id='ex-goDeps-3' />
131− url = "https://gopkg.in/yaml.v2";
132− rev = "a83829b6f1293c91addabc89d0571c246397bbf4";
133− sha256 = "1m4dsmk90sbi17571h6pld44zxz7jc4lrnl4f27dpd1l8g5xvjhh";
134− };
135− }
136− {
137− goPackagePath = "github.com/docopt/docopt-go";
138− fetch = {
139− type = "git";
140− url = "https://github.com/docopt/docopt-go";
141− rev = "784ddc588536785e7299f7272f39101f7faccc3f";
142− sha256 = "0wwz48jl9fvl1iknvn9dqr4gfy1qs03gxaikrxxp9gry6773v3sj";
143− };
144− }
145−]
146−</programlisting>
147− </example>
148−
149− <para>
150− <calloutlist>
151− <callout arearefs='ex-goDeps-1'>
152− <para>
153− <varname>goDeps</varname> is a list of Go dependencies.
154− </para>
155− </callout>
156− <callout arearefs='ex-goDeps-2'>
157− <para>
158− <varname>goPackagePath</varname> specifies Go package import path.
159− </para>
160− </callout>
161− <callout arearefs='ex-goDeps-3'>
162− <para>
163− <varname>fetch type</varname> that needs to be used to get package source. If <varname>git</varname> is used there should be <varname>url</varname>, <varname>rev</varname> and <varname>sha256</varname> defined next to it.
164− </para>
165− </callout>
166− </calloutlist>
167− </para>
168−
169− <para>
170− To extract dependency information from a Go package in automated way use <link xlink:href="https://github.com/kamilchm/go2nix">go2nix</link>. It can produce complete derivation and <varname>goDeps</varname> file for Go programs.
171− </para>
172−
173− <para>
174− You may use Go packages installed into the active Nix profiles by adding the following to your ~/.bashrc:
175−<screen>
176−for p in $NIX_PROFILES; do
177− GOPATH="$p/share/go:$GOPATH"
178−done
179−</screen>
180− </para>
181− </section>
182−
183− <section xml:id="ssec-go-common-attributes">
184− <title>Attributes used by the builders</title>
185−
186− <para>
187− Both <link xlink:href="#ssec-go-modules"><varname>buildGoModule</varname></link> and <link xlink:href="#ssec-go-modules"><varname>buildGoPackage</varname></link> can be tweaked to behave slightly differently, if the following attributes are used:
188− </para>
189−
190− <variablelist>
191− <varlistentry xml:id="var-go-buildFlagsArray">
192− <term>
193− <varname>buildFlagsArray</varname> and <varname>buildFlags</varname>
194− </term>
195− <listitem>
196− <para>
197− These attributes set build flags supported by <varname>go build</varname>. We recommend using <varname>buildFlagsArray</varname>. The most common use case of these attributes is to make the resulting executable aware of its own version. For example:
198− </para>
199− <example xml:id='ex-goBuildFlags-nospaces'>
200− <title>buildFlagsArray</title>
201−<programlisting>
202− buildFlagsArray = [
203− "-ldflags=-X main.Version=${version} -X main.Commit=${version}" <co xml:id='ex-goBuildFlags-1' />
204− ];
205−</programlisting>
206− </example>
207− <calloutlist>
208− <callout arearefs='ex-goBuildFlags-1'>
209− <para>
210− Note: single quotes are not needed.
211− </para>
212− </callout>
213− </calloutlist>
214− <example xml:id='ex-goBuildFlags-noarray'>
215− <title>buildFlagsArray</title>
216−<programlisting>
217− buildFlagsArray = ''
218− -ldflags=
219− -X main.Version=${version}
220− -X main.Commit=${version}
221− '';
222−</programlisting>
223− </example>
224− </listitem>
225− </varlistentry>
226− <varlistentry xml:id="var-go-deleteVendor">
227− <term>
228− <varname>deleteVendor</varname>
229− </term>
230− <listitem>
231− <para>
232− Removes the pre-existing vendor directory. This should only be used if the dependencies included in the vendor folder are broken or incomplete.
233− </para>
234− </listitem>
235− </varlistentry>
236− <varlistentry xml:id="var-go-subPackages">
237− <term>
238− <varname>subPackages</varname>
239− </term>
240− <listitem>
241− <para>
242− Limits the builder from building child packages that have not been listed. If <varname>subPackages</varname> is not specified, all child packages will be built.
243− </para>
244− </listitem>
245− </varlistentry>
246− </variablelist>
247− </section>
248−</section>
doc/languages-frameworks/haskell.section.md+1−7
@@ -1,10 +1,4 @@
1−---
2−title: User's Guide for Haskell in Nixpkgs
3−author: Peter Simons
4−date: 2015-06-01
5−---
6−
7−# Haskell
1+# Haskell {#haskell}
82
93The documentation for the Haskell infrastructure is published at
104<https://haskell4nix.readthedocs.io/>. The source code for that
doc/languages-frameworks/hy.section.mdnew file+31
@@ -0,0 +1,31 @@
1+# Hy {#sec-language-hy}
2+
3+## Installation {#ssec-hy-installation}
4+
5+### Installation without packages {#installation-without-packages}
6+
7+You can install `hy` via nix-env or by adding it to `configuration.nix` by reffering to it as a `hy` attribute. This kind of installation adds `hy` to your environment and it succesfully works with `python3`.
8+
9+::: {.caution}
10+Packages that are installed with your python derivation, are not accesible by `hy` this way.
11+:::
12+
13+### Installation with packages {#installation-with-packages}
14+
15+Creating `hy` derivation with custom `python` packages is really simple and similar to the way that python does it. Attribute `hy` provides function `withPackages` that creates custom `hy` derivation with specified packages.
16+
17+For example if you want to create shell with `matplotlib` and `numpy`, you can do it like so:
18+
19+```ShellSession
20+$ nix-shell -p "hy.withPackages (ps: with ps; [ numpy matplotlib ])"
21+```
22+
23+Or if you want to extend your `configuration.nix`:
24+```nix
25+{ # ...
26+
27+ environment.systemPackages = with pkgs; [
28+ (hy.withPackages (py-packages: with py-packages; [ numpy matplotlib ]))
29+ ];
30+}
31+```
doc/languages-frameworks/idris.section.md+22−23
@@ -1,14 +1,11 @@
1−# Idris
1+# Idris {#idris}
22
3−## Installing Idris
3+## Installing Idris {#installing-idris}
44
55The easiest way to get a working idris version is to install the `idris` attribute:
66
7−```
8−$ # On NixOS
9−$ nix-env -i nixos.idris
10−$ # On non-NixOS
11−$ nix-env -i nixpkgs.idris
7+```ShellSession
8+$ nix-env -f "<nixpkgs>" -iA idris
129```
1310
1411This however only provides the `prelude` and `base` libraries. To install idris with additional libraries, you can use the `idrisPackages.with-packages` function, e.g. in an overlay in `~/.config/nixpkgs/overlays/my-idris.nix`:
@@ -21,7 +18,7 @@ self: super: {
2118
2219And then:
2320
24−```
21+```ShellSession
2522$ # On NixOS
2623$ nix-env -iA nixos.myIdris
2724$ # On non-NixOS
@@ -29,7 +26,8 @@ $ nix-env -iA nixpkgs.myIdris
2926```
3027
3128To see all available Idris packages:
32−```
29+
30+```ShellSession
3331$ # On NixOS
3432$ nix-env -qaPA nixos.idrisPackages
3533$ # On non-NixOS
@@ -37,22 +35,23 @@ $ nix-env -qaPA nixpkgs.idrisPackages
3735```
3836
3937Similarly, entering a `nix-shell`:
40−```
38+
39+```ShellSession
4140$ nix-shell -p 'idrisPackages.with-packages (with idrisPackages; [ contrib pruviloj ])'
4241```
4342
44−## Starting Idris with library support
43+## Starting Idris with library support {#starting-idris-with-library-support}
4544
4645To have access to these libraries in idris, call it with an argument `-p <library name>` for each library:
4746
48−```
47+```ShellSession
4948$ nix-shell -p 'idrisPackages.with-packages (with idrisPackages; [ contrib pruviloj ])'
5049[nix-shell:~]$ idris -p contrib -p pruviloj
5150```
5251
5352A listing of all available packages the Idris binary has access to is available via `--listlibs`:
5453
55−```
54+```ShellSession
5655$ idris --listlibs
575600prelude-idx.ibc
5857pruviloj
@@ -64,16 +63,16 @@ prelude
646300contrib-idx.ibc
6564```
6665
67−## Building an Idris project with Nix
66+## Building an Idris project with Nix {#building-an-idris-project-with-nix}
6867
6968As an example of how a Nix expression for an Idris package can be created, here is the one for `idrisPackages.yaml`:
7069
7170```nix
72−{ build-idris-package
71+{ lib
72+, build-idris-package
7373, fetchFromGitHub
7474, contrib
7575, lightyear
76−, lib
7776}:
7877build-idris-package {
7978 name = "yaml";
@@ -94,18 +93,18 @@ build-idris-package {
9493 sha256 = "1g4pi0swmg214kndj85hj50ccmckni7piprsxfdzdfhg87s0avw7";
9594 };
9695
97− meta = {
96+ meta = with lib; {
9897 description = "Idris YAML lib";
9998 homepage = "https://github.com/Heather/Idris.Yaml";
100− license = lib.licenses.mit;
101− maintainers = [ lib.maintainers.brainrape ];
99+ license = licenses.mit;
100+ maintainers = [ maintainers.brainrape ];
102101 };
103102}
104103```
105104
106105Assuming this file is saved as `yaml.nix`, it's buildable using
107106
108−```
107+```ShellSession
109108$ nix-build -E '(import <nixpkgs> {}).idrisPackages.callPackage ./yaml.nix {}'
110109```
111110
@@ -121,11 +120,11 @@ with import <nixpkgs> {};
121120
122121in another file (say `default.nix`) to be able to build it with
123122
124−```
123+```ShellSession
125124$ nix-build -A yaml
126125```
127126
128−## Passing options to `idris` commands
127+## Passing options to `idris` commands {#passing-options-to-idris-commands}
129128
130129The `build-idris-package` function provides also optional input values to set additional options for the used `idris` commands.
131130
@@ -133,7 +132,7 @@ Specifically, you can set `idrisBuildOptions`, `idrisTestOptions`, `idrisInstall
133132
134133For example you could set
135134
136−```
135+```nix
137136build-idris-package {
138137 idrisBuildOptions = [ "--log" "1" "--verbose" ]
139138
doc/languages-frameworks/index.xml+19−12
@@ -7,29 +7,36 @@
77 </para>
88 <xi:include href="agda.section.xml" />
99 <xi:include href="android.section.xml" />
10− <xi:include href="beam.xml" />
11− <xi:include href="bower.xml" />
12− <xi:include href="coq.xml" />
10+ <xi:include href="beam.section.xml" />
11+ <xi:include href="bower.section.xml" />
12+ <xi:include href="chicken.section.xml" />
13+ <xi:include href="coq.section.xml" />
1314 <xi:include href="crystal.section.xml" />
15+ <xi:include href="cuda.section.xml" />
16+ <xi:include href="dhall.section.xml" />
17+ <xi:include href="dotnet.section.xml" />
1418 <xi:include href="emscripten.section.xml" />
15− <xi:include href="gnome.xml" />
16− <xi:include href="go.xml" />
19+ <xi:include href="gnome.section.xml" />
20+ <xi:include href="go.section.xml" />
1721 <xi:include href="haskell.section.xml" />
22+ <xi:include href="hy.section.xml" />
1823 <xi:include href="idris.section.xml" />
1924 <xi:include href="ios.section.xml" />
20− <xi:include href="java.xml" />
25+ <xi:include href="java.section.xml" />
26+ <xi:include href="javascript.section.xml" />
2127 <xi:include href="lua.section.xml" />
2228 <xi:include href="maven.section.xml" />
23− <xi:include href="node.section.xml" />
24− <xi:include href="ocaml.xml" />
25− <xi:include href="perl.xml" />
29+ <xi:include href="nim.section.xml" />
30+ <xi:include href="ocaml.section.xml" />
31+ <xi:include href="octave.section.xml" />
32+ <xi:include href="perl.section.xml" />
2633 <xi:include href="php.section.xml" />
2734 <xi:include href="python.section.xml" />
28− <xi:include href="qt.xml" />
35+ <xi:include href="qt.section.xml" />
2936 <xi:include href="r.section.xml" />
30− <xi:include href="ruby.xml" />
37+ <xi:include href="ruby.section.xml" />
3138 <xi:include href="rust.section.xml" />
32− <xi:include href="texlive.xml" />
39+ <xi:include href="texlive.section.xml" />
3340 <xi:include href="titanium.section.xml" />
3441 <xi:include href="vim.section.xml" />
3542</chapter>
doc/languages-frameworks/ios.section.md+10−14
@@ -1,9 +1,4 @@
1−---
2−title: iOS
3−author: Sander van der Burg
4−date: 2019-11-10
5−---
6−# iOS
1+# iOS {#ios}
72
83This component is basically a wrapper/workaround that makes it possible to
94expose an Xcode installation as a Nix package by means of symlinking to the
@@ -25,8 +20,8 @@ Hydra.
2520
2621The Xcode build environment implements a number of features.
2722
28−Deploying a proxy component wrapper exposing Xcode
29−--------------------------------------------------
23+## Deploying a proxy component wrapper exposing Xcode {#deploying-a-proxy-component-wrapper-exposing-xcode}
24+
3025The first use case is deploying a Nix package that provides symlinks to the Xcode
3126installation on the host system. This package can be used as a build input to
3227any build function implemented in the Nix expression language that requires
@@ -60,8 +55,8 @@ lrwxr-xr-x 1 sander staff 61 1 jan 1970 xcodebuild -> /Applications/Xcode.a
6055lrwxr-xr-x 1 sander staff 14 1 jan 1970 xcrun -> /usr/bin/xcrun
6156```
6257
63−Building an iOS application
64−---------------------------
58+## Building an iOS application {#building-an-ios-application}
59+
6560We can build an iOS app executable for the simulator, or an IPA/xcarchive file
6661for release purposes, e.g. ad-hoc, enterprise or store installations, by
6762executing the `xcodeenv.buildApp {}` function:
@@ -104,6 +99,7 @@ xcodeenv.buildApp {
10499```
105100
106101The above function takes a variety of parameters:
102+
107103* The `name` and `src` parameters are mandatory and specify the name of the app
108104 and the location where the source code resides
109105* `sdkVersion` specifies which version of the iOS SDK to use.
@@ -156,8 +152,8 @@ the `xcodeenv.composeXcodeWrapper {}` function takes. For example, the
156152`xcodeBaseDir` parameter can be overridden to refer to a different Xcode
157153version.
158154
159−Spawning simulator instances
160−----------------------------
155+## Spawning simulator instances {#spawning-simulator-instances}
156+
161157In addition to building iOS apps, we can also automatically spawn simulator
162158instances:
163159
@@ -218,8 +214,8 @@ xcode.simulateApp {
218214By providing the result of an `xcode.buildApp {}` function and configuring the
219215app bundle id, the app gets deployed automatically and started.
220216
221−Troubleshooting
222−---------------
217+## Troubleshooting {#troubleshooting}
218+
223219In some rare cases, it may happen that after a failure, changes are not picked
224220up. Most likely, this is caused by a derived data cache that Xcode maintains.
225221To wipe it you can run:
doc/languages-frameworks/java.section.mdnew file+100
@@ -0,0 +1,100 @@
1+# Java {#sec-language-java}
2+
3+Ant-based Java packages are typically built from source as follows:
4+
5+```nix
6+stdenv.mkDerivation {
7+ name = "...";
8+ src = fetchurl { ... };
9+
10+ nativeBuildInputs = [ jdk ant ];
11+
12+ buildPhase = "ant";
13+}
14+```
15+
16+Note that `jdk` is an alias for the OpenJDK (self-built where available,
17+or pre-built via Zulu). Platforms with OpenJDK not (yet) in Nixpkgs
18+(`Aarch32`, `Aarch64`) point to the (unfree) `oraclejdk`.
19+
20+JAR files that are intended to be used by other packages should be
21+installed in `$out/share/java`. JDKs have a stdenv setup hook that add
22+any JARs in the `share/java` directories of the build inputs to the
23+`CLASSPATH` environment variable. For instance, if the package `libfoo`
24+installs a JAR named `foo.jar` in its `share/java` directory, and
25+another package declares the attribute
26+
27+```nix
28+buildInputs = [ libfoo ];
29+nativeBuildInputs = [ jdk ];
30+```
31+
32+then `CLASSPATH` will be set to
33+`/nix/store/...-libfoo/share/java/foo.jar`.
34+
35+Private JARs should be installed in a location like
36+`$out/share/package-name`.
37+
38+If your Java package provides a program, you need to generate a wrapper
39+script to run it using a JRE. You can use `makeWrapper` for this:
40+
41+```nix
42+nativeBuildInputs = [ makeWrapper ];
43+
44+installPhase = ''
45+ mkdir -p $out/bin
46+ makeWrapper ${jre}/bin/java $out/bin/foo \
47+ --add-flags "-cp $out/share/java/foo.jar org.foo.Main"
48+'';
49+```
50+
51+Since the introduction of the Java Platform Module System in Java 9,
52+Java distributions typically no longer ship with a general-purpose JRE:
53+instead, they allow generating a JRE with only the modules required for
54+your application(s). Because we can't predict what modules will be
55+needed on a general-purpose system, the default jre package is the full
56+JDK. When building a minimal system/image, you can override the
57+`modules` parameter on `jre_minimal` to build a JRE with only the
58+modules relevant for you:
59+
60+```nix
61+let
62+ my_jre = pkgs.jre_minimal.override {
63+ modules = [
64+ # The modules used by 'something' and 'other' combined:
65+ "java.base"
66+ "java.logging"
67+ ];
68+ };
69+ something = (pkgs.something.override { jre = my_jre; });
70+ other = (pkgs.other.override { jre = my_jre; });
71+in
72+ ...
73+```
74+
75+You can also specify what JDK your JRE should be based on, for example
76+selecting a 'headless' build to avoid including a link to GTK+:
77+
78+```nix
79+my_jre = pkgs.jre_minimal.override {
80+ jdk = jdk11_headless;
81+};
82+```
83+
84+Note all JDKs passthru `home`, so if your application requires
85+environment variables like `JAVA_HOME` being set, that can be done in a
86+generic fashion with the `--set` argument of `makeWrapper`:
87+
88+```bash
89+--set JAVA_HOME ${jdk.home}
90+```
91+
92+It is possible to use a different Java compiler than `javac` from the
93+OpenJDK. For instance, to use the GNU Java Compiler:
94+
95+```nix
96+nativeBuildInputs = [ gcj ant ];
97+```
98+
99+Here, Ant will automatically use `gij` (the GNU Java Runtime) instead of
100+the OpenJRE.
doc/languages-frameworks/java.xmldeleted−77
@@ -1,77 +0,0 @@
1−<section xmlns="http://docbook.org/ns/docbook"
2− xmlns:xlink="http://www.w3.org/1999/xlink"
3− xml:id="sec-language-java">
4− <title>Java</title>
5−
6− <para>
7− Ant-based Java packages are typically built from source as follows:
8−<programlisting>
9−stdenv.mkDerivation {
10− name = "...";
11− src = fetchurl { ... };
12−
13− nativeBuildInputs = [ jdk ant ];
14−
15− buildPhase = "ant";
16−}
17−</programlisting>
18− Note that <varname>jdk</varname> is an alias for the OpenJDK (self-built where available, or pre-built via Zulu). Platforms with OpenJDK not (yet) in Nixpkgs (<literal>Aarch32</literal>, <literal>Aarch64</literal>) point to the (unfree) <literal>oraclejdk</literal>.
19− </para>
20−
21− <para>
22− JAR files that are intended to be used by other packages should be installed in <filename>$out/share/java</filename>. JDKs have a stdenv setup hook that add any JARs in the <filename>share/java</filename> directories of the build inputs to the <envar>CLASSPATH</envar> environment variable. For instance, if the package <literal>libfoo</literal> installs a JAR named <filename>foo.jar</filename> in its <filename>share/java</filename> directory, and another package declares the attribute
23−<programlisting>
24−buildInputs = [ libfoo ];
25−nativeBuildInputs = [ jdk ];
26−</programlisting>
27− then <envar>CLASSPATH</envar> will be set to <filename>/nix/store/...-libfoo/share/java/foo.jar</filename>.
28− </para>
29−
30− <para>
31− Private JARs should be installed in a location like <filename>$out/share/<replaceable>package-name</replaceable></filename>.
32− </para>
33−
34− <para>
35− If your Java package provides a program, you need to generate a wrapper script to run it using a JRE. You can use <literal>makeWrapper</literal> for this:
36−<programlisting>
37−nativeBuildInputs = [ makeWrapper ];
38−
39−installPhase =
40− ''
41− mkdir -p $out/bin
42− makeWrapper ${jre}/bin/java $out/bin/foo \
43− --add-flags "-cp $out/share/java/foo.jar org.foo.Main"
44− '';
45−</programlisting>
46−Since the introduction of the Java Platform Module System in Java 9, Java distributions typically no longer ship with a general-purpose JRE: instead, they allow generating a JRE with only the modules required for your application(s). Because we can't predict what modules will be needed on a general-purpose system, the default <package>jre</package> package is the full JDK. When building a minimal system/image, you can override the <literal>modules</literal> parameter on <literal>jre_minimal</literal> to build a JRE with only the modules relevant for you:
47−<programlisting>
48−let
49− my_jre = pkgs.jre_minimal.override {
50− modules = [
51− # The modules used by 'something' and 'other' combined:
52− "java.base"
53− "java.logging"
54− ];
55− };
56− something = (pkgs.something.override { jre = my_jre; });
57− other = (pkgs.other.override { jre = my_jre; });
58−in
59− ...
60−</programlisting>
61− </para>
62−
63− <para>
64− Note all JDKs passthru <literal>home</literal>, so if your application requires environment variables like <envar>JAVA_HOME</envar> being set, that can be done in a generic fashion with the <literal>--set</literal> argument of <literal>makeWrapper</literal>:
65−<programlisting>
66−--set JAVA_HOME ${jdk.home}
67−</programlisting>
68− </para>
69−
70− <para>
71− It is possible to use a different Java compiler than <command>javac</command> from the OpenJDK. For instance, to use the GNU Java Compiler:
72−<programlisting>
73−nativeBuildInputs = [ gcj ant ];
74−</programlisting>
75− Here, Ant will automatically use <command>gij</command> (the GNU Java Runtime) instead of the OpenJRE.
76− </para>
77−</section>
doc/languages-frameworks/javascript.section.mdnew file+278
@@ -0,0 +1,278 @@
1+# Javascript {#language-javascript}
2+
3+## Introduction {#javascript-introduction}
4+
5+This contains instructions on how to package javascript applications.
6+
7+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.
8+
9+## Getting unstuck / finding code examples
10+
11+If you find you are lacking inspiration for packing javascript applications, the links below might prove useful.
12+Searching online for prior art can be helpful if you are running into solved problems.
13+
14+### Github
15+
16+- Searching Nix files for `mkYarnPackage`: <https://github.com/search?q=mkYarnPackage+language%3ANix&type=code>
17+
18+- Searching just `flake.nix` files for `mkYarnPackage`: <https://github.com/search?q=mkYarnPackage+filename%3Aflake.nix&type=code>
19+
20+### Gitlab
21+
22+- Searching Nix files for `mkYarnPackage`: <https://gitlab.com/search?scope=blobs&search=mkYarnPackage+extension%3Anix>
23+
24+- Searching just `flake.nix` files for `mkYarnPackage`: <https://gitlab.com/search?scope=blobs&search=mkYarnPackage+filename%3Aflake.nix>
25+
26+## Tools overview {#javascript-tools-overview}
27+
28+## General principles {#javascript-general-principles}
29+
30+The following principles are given in order of importance with potential exceptions.
31+
32+### Try to use the same node version used upstream {#javascript-upstream-node-version}
33+
34+It is often not documented which node version is used upstream, but if it is, try to use the same version when packaging.
35+
36+This can be a problem if upstream is using the latest and greatest and you are trying to use an earlier version of node. Some cryptic errors regarding V8 may appear.
37+
38+An exception to this:
39+
40+### Try to respect the package manager originally used by upstream (and use the upstream lock file) {#javascript-upstream-package-manager}
41+
42+A lock file (package-lock.json, yarn.lock...) is supposed to make reproducible installations of node_modules for each tool.
43+
44+Guidelines of package managers, recommend to commit those lock files to the repos. If a particular lock file is present, it is a strong indication of which package manager is used upstream.
45+
46+It's better to try to use a nix tool that understand the lock file. Using a different tool might give you hard to understand error because different packages have been installed. An example of problems that could arise can be found [here](https://github.com/NixOS/nixpkgs/pull/126629). Upstream uses npm, but this is an attempt to package it with yarn2nix (that uses yarn.lock)
47+
48+Using a different tool forces to commit a lock file to the repository. Those files are fairly large, so when packaging for nixpkgs, this approach does not scale well.
49+
50+Exceptions to this rule are:
51+
52+- when you encounter one of the bugs from a nix tool. In each of the tool specific instructions, known problems will be detailed. If you have a problem with a particular tool, then it's best to try another tool, even if this means you will have to recreate a lock file and commit it to nixpkgs. In general yarn2nix has less known problems and so a simple search in nixpkgs will reveal many yarn.lock files committed
53+- Some lock files contain particular version of a package that has been pulled off npm for some reason. In that case, you can recreate upstream lock (by removing the original and `npm install`, `yarn`, ...) and commit this to nixpkgs.
54+- The only tool that supports workspaces (a feature of npm that helps manage sub-directories with different package.json from a single top level package.json) is yarn2nix. If upstream has workspaces you should try yarn2nix.
55+
56+### Try to use upstream package.json {#javascript-upstream-package-json}
57+
58+Exceptions to this rule are
59+
60+- Sometimes the upstream repo assumes some dependencies be installed globally. In that case you can add them manually to the upstream package.json (`yarn add xxx` or `npm install xxx`, ...). Dependencies that are installed locally can be executed with `npx` for cli tools. (e.g. `npx postcss ...`, this is how you can call those dependencies in the phases).
61+- Sometimes there is a version conflict between some dependency requirements. In that case you can fix a version (by removing the `^`).
62+- Sometimes the script defined in the package.json does not work as is. Some scripts for example use cli tools that might not be available, or cd in directory with a different package.json (for workspaces notably). In that case, it's perfectly fine to look at what the particular script is doing and break this down in the phases. In the build script you can see `build:*` calling in turns several other build scripts like `build:ui` or `build:server`. If one of those fails, you can try to separate those into:
63+
64+```Shell
65+yarn build:ui
66+yarn build:server
67+# OR
68+npm run build:ui
69+npm run build:server
70+```
71+
72+when you need to override a package.json. It's nice to use the one from the upstream src and do some explicit override. Here is an example.
73+
74+```nix
75+patchedPackageJSON = final.runCommand "package.json" { } ''
76+ ${jq}/bin/jq '.version = "0.4.0" |
77+ .devDependencies."@jsdoc/cli" = "^0.2.5"
78+ ${sonar-src}/package.json > $out
79+'';
80+```
81+
82+you will still need to commit the modified version of the lock files, but at least the overrides are explicit for everyone to see.
83+
84+### Using node_modules directly {#javascript-using-node_modules}
85+
86+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
87+
88+## Javascript packages inside nixpkgs {#javascript-packages-nixpkgs}
89+
90+The `pkgs/development/node-packages` folder contains a generated collection of
91+[NPM packages](https://npmjs.com/) that can be installed with the Nix package
92+manager.
93+
94+As a rule of thumb, the package set should only provide _end user_ software
95+packages, such as command-line utilities. Libraries should only be added to the
96+package set if there is a non-NPM package that requires it.
97+
98+When it is desired to use NPM libraries in a development project, use the
99+`node2nix` generator directly on the `package.json` configuration file of the
100+project.
101+
102+The package set provides support for the official stable Node.js versions.
103+The latest stable LTS release in `nodePackages`, as well as the latest stable
104+Current release in `nodePackages_latest`.
105+
106+If your package uses native addons, you need to examine what kind of native
107+build system it uses. Here are some examples:
108+
109+- `node-gyp`
110+- `node-gyp-builder`
111+- `node-pre-gyp`
112+
113+After you have identified the correct system, you need to override your package
114+expression while adding in build system as a build input. For example, `dat`
115+requires `node-gyp-build`, so [we override](https://github.com/NixOS/nixpkgs/blob/32f5e5da4a1b3f0595527f5195ac3a91451e9b56/pkgs/development/node-packages/default.nix#L37-L40) its expression in [`default.nix`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/node-packages/default.nix):
116+
117+```nix
118+ dat = super.dat.override {
119+ buildInputs = [ self.node-gyp-build pkgs.libtool pkgs.autoconf pkgs.automake ];
120+ meta.broken = since "12";
121+ };
122+```
123+
124+### Adding and Updating Javascript packages in nixpkgs
125+
126+To add a package from NPM to nixpkgs:
127+
128+1. Modify `pkgs/development/node-packages/node-packages.json` to add, update
129+ or remove package entries to have it included in `nodePackages` and
130+ `nodePackages_latest`.
131+2. Run the script: `./pkgs/development/node-packages/generate.sh`.
132+3. Build your new package to test your changes:
133+ `cd /path/to/nixpkgs && nix-build -A nodePackages.<new-or-updated-package>`.
134+ To build against the latest stable Current Node.js version (e.g. 14.x):
135+ `nix-build -A nodePackages_latest.<new-or-updated-package>`
136+4. Add and commit all modified and generated files.
137+
138+For more information about the generation process, consult the
139+[README.md](https://github.com/svanderburg/node2nix) file of the `node2nix`
140+tool.
141+
142+To update NPM packages in nixpkgs, run the same `generate.sh` script:
143+
144+```sh
145+./pkgs/development/node-packages/generate.sh
146+```
147+
148+#### Git protocol error
149+
150+Some packages may have Git dependencies from GitHub specified with `git://`.
151+GitHub has
152+[disabled unecrypted Git connections](https://github.blog/2021-09-01-improving-git-protocol-security-github/#no-more-unauthenticated-git),
153+so you may see the following error when running the generate script:
154+`The unauthenticated git protocol on port 9418 is no longer supported`.
155+
156+Use the following Git configuration to resolve the issue:
157+
158+```sh
159+git config --global url."https://github.com/".insteadOf git://github.com/
160+```
161+
162+## Tool specific instructions {#javascript-tool-specific}
163+
164+### node2nix {#javascript-node2nix}
165+
166+#### Preparation {#javascript-node2nix-preparation}
167+
168+you will need to generate a nix expression for the dependencies
169+
170+- don't forget the `-l package-lock.json` if there is a lock file
171+- Most probably you will need the `--development` to include the `devDependencies`
172+
173+so the command will most likely be
174+`node2nix --development -l package-lock.json`
175+
176+[link to the doc in the repo](https://github.com/svanderburg/node2nix)
177+
178+#### Pitfalls {#javascript-node2nix-pitfalls}
179+
180+- if upstream package.json does not have a "version" attribute, node2nix will crash. You will need to add it like shown in [the package.json section](#javascript-upstream-package-json)
181+- node2nix has some [bugs](https://github.com/svanderburg/node2nix/issues/238). related to working with lock files from npm distributed with nodejs-16_x
182+- node2nix does not like missing packages from npm. If you see something like `Cannot resolve version: vue-loader-v16@undefined` then you might want to try another tool. The package might have been pulled off of npm.
183+
184+### yarn2nix {#javascript-yarn2nix}
185+
186+#### Preparation {#javascript-yarn2nix-preparation}
187+
188+you will need at least a yarn.lock and yarn.nix file
189+
190+- generate a yarn.lock in upstream if it is not already there
191+- `yarn2nix > yarn.nix` will generate the dependencies in a nix format
192+
193+#### mkYarnPackage {#javascript-yarn2nix-mkYarnPackage}
194+
195+this will by default try to generate a binary. For package only generating static assets (Svelte, Vue, React...), you will need to explicitly override the build step with your instructions. It's important to use the `--offline` flag. For example if you script is `"build": "something"` in package.json use
196+
197+```nix
198+buildPhase = ''
199+ yarn build --offline
200+'';
201+```
202+
203+The dist phase is also trying to build a binary, the only way to override it is with
204+
205+```nix
206+distPhase = "true";
207+```
208+
209+the configure phase can sometimes fail because it tries to be too clever.
210+One common override is
211+
212+```nix
213+configurePhase = "ln -s $node_modules node_modules";
214+```
215+
216+#### mkYarnModules {#javascript-yarn2nix-mkYarnModules}
217+
218+this will generate a derivation including the node_modules. If you have to build a derivation for an integrated web framework (rails, phoenix..), this is probably the easiest way. [Plausible](https://github.com/NixOS/nixpkgs/blob/master/pkgs/servers/web-apps/plausible/default.nix#L39) offers a good example of how to do this.
219+
220+#### Overriding dependency behavior
221+
222+In the `mkYarnPackage` record the property `pkgConfig` can be used to override packages when you encounter problems building.
223+
224+For instance, say your package is throwing errors when trying to invoke node-sass: `ENOENT: no such file or directory, scandir '/build/source/node_modules/node-sass/vendor'`
225+
226+To fix this we will specify different versions of build inputs to use, as well as some post install steps to get the software built the way we want:
227+
228+```nix
229+mkYarnPackage rec {
230+ pkgConfig = {
231+ node-sass = {
232+ buildInputs = with final;[ python libsass pkg-config ];
233+ postInstall = ''
234+ LIBSASS_EXT=auto yarn --offline run build
235+ rm build/config.gypi
236+ '';
237+ };
238+ };
239+}
240+```
241+
242+#### Pitfalls {#javascript-yarn2nix-pitfalls}
243+
244+- if version is missing from upstream package.json, yarn will silently install nothing. In that case, you will need to override package.json as shown in the [package.json section](#javascript-upstream-package-json)
245+
246+- having trouble with node-gyp? Try adding these lines to the `yarnPreBuild` steps:
247+
248+ ```nix
249+ yarnPreBuild = ''
250+ mkdir -p $HOME/.node-gyp/${nodejs.version}
251+ echo 9 > $HOME/.node-gyp/${nodejs.version}/installVersion
252+ ln -sfv ${nodejs}/include $HOME/.node-gyp/${nodejs.version}
253+ export npm_config_nodedir=${nodejs}
254+ '';
255+ ```
256+
257+ - The `echo 9` steps comes from this answer: <https://stackoverflow.com/a/49139496>
258+ - Exporting the headers in `npm_config_nodedir` comes from this issue: <https://github.com/nodejs/node-gyp/issues/1191#issuecomment-301243919>
259+
260+## Outside of nixpkgs {#javascript-outside-nixpkgs}
261+
262+There are some other options available that can't be used inside nixpkgs. Those other options are written in nix. Importing them in nixpkgs will require moving the source code into nixpkgs. Using [Import From Derivation](https://nixos.wiki/wiki/Import_From_Derivation) is not allowed in hydra at present. If you are packaging something outside nixpkgs, those can be considered
263+
264+### npmlock2nix {#javascript-npmlock2nix}
265+
266+[npmlock2nix](https://github.com/nix-community/npmlock2nix) aims at building node_modules without code generation. It hasn't reached v1 yet, the api might be subject to change.
267+
268+#### Pitfalls {#javascript-npmlock2nix-pitfalls}
269+
270+- there are some [problems with npm v7](https://github.com/tweag/npmlock2nix/issues/45).
271+
272+### nix-npm-buildpackage {#javascript-nix-npm-buildpackage}
273+
274+[nix-npm-buildpackage](https://github.com/serokell/nix-npm-buildpackage) aims at building node_modules without code generation. It hasn't reached v1 yet, the api might change. It supports both package-lock.json and yarn.lock.
275+
276+#### Pitfalls {#javascript-nix-npm-buildpackage-pitfalls}
277+
278+- there are some [problems with npm v7](https://github.com/serokell/nix-npm-buildpackage/issues/33).
doc/languages-frameworks/lua.section.md+39−38
@@ -1,14 +1,8 @@
1−---
2−title: Lua
3−author: Matthieu Coudron
4−date: 2019-02-05
5−---
1+# User’s Guide to Lua Infrastructure {#users-guide-to-lua-infrastructure}
62
7−# User's Guide to Lua Infrastructure
3+## Using Lua {#using-lua}
84
9−## Using Lua
10−
11−### Overview of Lua
5+### Overview of Lua {#overview-of-lua}
126
137Several versions of the Lua interpreter are available: luajit, lua 5.1, 5.2, 5.3.
148The attribute `lua` refers to the default interpreter, it is also possible to refer to specific versions, e.g. `lua5_2` refers to Lua 5.2.
@@ -23,27 +17,31 @@ The main package set contains aliases to these package sets, e.g.
2317`luaPackages` refers to `lua5_1.pkgs` and `lua52Packages` to
2418`lua5_2.pkgs`.
2519
26−### Installing Lua and packages
20+### Installing Lua and packages {#installing-lua-and-packages}
2721
28−#### Lua environment defined in separate `.nix` file
22+#### Lua environment defined in separate `.nix` file {#lua-environment-defined-in-separate-.nix-file}
2923
3024Create a file, e.g. `build.nix`, with the following expression
25+
3126```nix
3227with import <nixpkgs> {};
3328
3429lua5_2.withPackages (ps: with ps; [ busted luafilesystem ])
3530```
31+
3632and install it in your profile with
33+
3734```shell
3835nix-env -if build.nix
3936```
4037Now you can use the Lua interpreter, as well as the extra packages (`busted`,
4138`luafilesystem`) that you added to the environment.
4239
43−#### Lua environment defined in `~/.config/nixpkgs/config.nix`
40+#### Lua environment defined in `~/.config/nixpkgs/config.nix` {#lua-environment-defined-in-.confignixpkgsconfig.nix}
4441
4542If you prefer to, you could also add the environment as a package override to the Nixpkgs set, e.g.
4643using `config.nix`,
44+
4745```nix
4846{ # ...
4947
@@ -52,14 +50,16 @@ using `config.nix`,
5250 };
5351}
5452```
53+
5554and install it in your profile with
55+
5656```shell
5757nix-env -iA nixpkgs.myLuaEnv
5858```
59−The environment is is installed by referring to the attribute, and considering
59+The environment is installed by referring to the attribute, and considering
6060the `nixpkgs` channel was used.
6161
62−#### Lua environment defined in `/etc/nixos/configuration.nix`
62+#### Lua environment defined in `/etc/nixos/configuration.nix` {#lua-environment-defined-in-etcnixosconfiguration.nix}
6363
6464For the sake of completeness, here's another example how to install the environment system-wide.
6565
@@ -72,7 +72,7 @@ For the sake of completeness, here's another example how to install the environm
7272}
7373```
7474
75−### How to override a Lua package using overlays?
75+### How to override a Lua package using overlays? {#how-to-override-a-lua-package-using-overlays}
7676
7777Use the following overlay template:
7878
@@ -93,18 +93,22 @@ final: prev:
9393}
9494```
9595
96−### Temporary Lua environment with `nix-shell`
96+### Temporary Lua environment with `nix-shell` {#temporary-lua-environment-with-nix-shell}
9797
9898
9999There are two methods for loading a shell with Lua packages. The first and recommended method
100100is to create an environment with `lua.buildEnv` or `lua.withPackages` and load that. E.g.
101+
101102```sh
102103$ nix-shell -p 'lua.withPackages(ps: with ps; [ busted luafilesystem ])'
103104```
105+
104106opens a shell from which you can launch the interpreter
107+
105108```sh
106109[nix-shell:~] lua
107110```
111+
108112The other method, which is not recommended, does not create an environment and requires you to list the packages directly,
109113
110114```sh
@@ -114,7 +118,7 @@ Again, it is possible to launch the interpreter from the shell.
114118The Lua interpreter has the attribute `pkgs` which contains all Lua libraries for that specific interpreter.
115119
116120
117−## Developing with Lua
121+## Developing with Lua {#developing-with-lua}
118122
119123Now that you know how to get a working Lua environment with Nix, it is time
120124to go forward and start actually developing with Lua. There are two ways to
@@ -122,9 +126,9 @@ package lua software, either it is on luarocks and most of it can be taken care
122126of by the luarocks2nix converter or the packaging has to be done manually.
123127Let's present the luarocks way first and the manual one in a second time.
124128
125−### Packaging a library on luarocks
129+### Packaging a library on luarocks {#packaging-a-library-on-luarocks}
126130
127−[Luarocks.org](www.luarocks.org) is the main repository of lua packages.
131+[Luarocks.org](https://luarocks.org/) is the main repository of lua packages.
128132The site proposes two types of packages, the rockspec and the src.rock
129133(equivalent of a [rockspec](https://github.com/luarocks/luarocks/wiki/Rockspec-format) but with the source).
130134These packages can have different build types such as `cmake`, `builtin` etc .
@@ -135,16 +139,15 @@ the whitelist maintainers/scripts/luarocks-packages.csv and updated by running m
135139[luarocks2nix](https://github.com/nix-community/luarocks) is a tool capable of generating nix derivations from both rockspec and src.rock (and favors the src.rock).
136140The automation only goes so far though and some packages need to be customized.
137141These customizations go in `pkgs/development/lua-modules/overrides.nix`.
138−For instance if the rockspec defines `external_dependencies`, these need to be manually added in in its rockspec file then it won't work.
142+For instance if the rockspec defines `external_dependencies`, these need to be manually added to the overrides.nix.
139143
140144You can try converting luarocks packages to nix packages with the command `nix-shell -p luarocks-nix` and then `luarocks nix PKG_NAME`.
141−Nix rely on luarocks to install lua packages, basically it runs:
142−`luarocks make --deps-mode=none --tree $out`
143145
144−#### Packaging a library manually
146+#### Packaging a library manually {#packaging-a-library-manually}
145147
146148You can develop your package as you usually would, just don't forget to wrap it
147149within a `toLuaModule` call, for instance
150+
148151```nix
149152mynewlib = toLuaModule ( stdenv.mkDerivation { ... });
150153```
@@ -152,16 +155,15 @@ mynewlib = toLuaModule ( stdenv.mkDerivation { ... });
152155There is also the `buildLuaPackage` function that can be used when lua modules
153156are not packaged for luarocks. You can see a few examples at `pkgs/top-level/lua-packages.nix`.
154157
155−## Lua Reference
158+## Lua Reference {#lua-reference}
156159
157−### Lua interpreters
160+### Lua interpreters {#lua-interpreters}
158161
159−Versions 5.1, 5.2 and 5.3 of the lua interpreter are available as
160−respectively `lua5_1`, `lua5_2` and `lua5_3`. Luajit is available too.
162+Versions 5.1, 5.2, 5.3 and 5.4 of the lua interpreter are available as
163+respectively `lua5_1`, `lua5_2`, `lua5_3` and `lua5_4`. Luajit is available too.
161164The Nix expressions for the interpreters can be found in `pkgs/development/interpreters/lua-5`.
162165
163−
164−#### Attributes on lua interpreters packages
166+#### Attributes on lua interpreters packages {#attributes-on-lua-interpreters-packages}
165167
166168Each interpreter has the following attributes:
167169
@@ -170,8 +172,7 @@ Each interpreter has the following attributes:
170172- `withPackages`. Simpler interface to `buildEnv`.
171173- `pkgs`. Set of Lua packages for that specific interpreter. The package set can be modified by overriding the interpreter and passing `packageOverrides`.
172174
173−
174−#### `buildLuarocksPackage` function
175+#### `buildLuarocksPackage` function {#buildluarockspackage-function}
175176
176177The `buildLuarocksPackage` function is implemented in `pkgs/development/interpreters/lua-5/build-lua-package.nix`
177178The following is an example:
@@ -187,7 +188,7 @@ luaposix = buildLuarocksPackage {
187188 disabled = (luaOlder "5.1") || (luaAtLeast "5.4");
188189 propagatedBuildInputs = [ bit32 lua std_normalize ];
189190
190− meta = with stdenv.lib; {
191+ meta = with lib; {
191192 homepage = "https://github.com/luaposix/luaposix/";
192193 description = "Lua bindings for POSIX";
193194 maintainers = with maintainers; [ vyp lblasc ];
@@ -211,16 +212,17 @@ install the package
211212
212213By default `meta.platforms` is set to the same value as the interpreter unless overridden otherwise.
213214
214−#### `buildLuaApplication` function
215+#### `buildLuaApplication` function {#buildluaapplication-function}
215216
216217The `buildLuaApplication` function is practically the same as `buildLuaPackage`.
217218The difference is that `buildLuaPackage` by default prefixes the names of the packages with the version of the interpreter.
218219Because with an application we're not interested in multiple version the prefix is dropped.
219220
220−#### lua.withPackages function
221+#### lua.withPackages function {#lua.withpackages-function}
221222
222223The `lua.withPackages` takes a function as an argument that is passed the set of lua packages and returns the list of packages to be included in the environment.
223224Using the `withPackages` function, the previous example for the luafilesystem environment can be written like this:
225+
224226```nix
225227with import <nixpkgs> {};
226228
@@ -229,6 +231,7 @@ lua.withPackages (ps: [ps.luafilesystem])
229231
230232`withPackages` passes the correct package set for the specific interpreter version as an argument to the function. In the above example, `ps` equals `luaPackages`.
231233But you can also easily switch to using `lua5_2`:
234+
232235```nix
233236with import <nixpkgs> {};
234237
@@ -237,16 +240,14 @@ lua5_2.withPackages (ps: [ps.lua])
237240
238241Now, `ps` is set to `lua52Packages`, matching the version of the interpreter.
239242
240−
241−### Possible Todos
243+### Possible Todos {#possible-todos}
242244
243245* export/use version specific variables such as `LUA_PATH_5_2`/`LUAROCKS_CONFIG_5_2`
244246* let luarocks check for dependencies via exporting the different rocktrees in temporary config
245247
246−### Lua Contributing guidelines
248+### Lua Contributing guidelines {#lua-contributing-guidelines}
247249
248250Following rules should be respected:
249251
250252* Make sure libraries build for all Lua interpreters.
251253* Commit names of Lua libraries should reflect that they are Lua libraries, so write for example `luaPackages.luafilesystem: 1.11 -> 1.12`.
252−
doc/languages-frameworks/maven.section.md+16−19
@@ -1,10 +1,4 @@
1−---
2−title: Maven
3−author: Farid Zakaria
4−date: 2020-10-15
5−---
6−
7−# Maven
1+# Maven {#maven}
82
93Maven is a well-known build tool for the Java ecosystem however it has some challenges when integrating into the Nix build system.
104
@@ -49,9 +43,9 @@ public class Main {
4943
5044You find this demo project at https://github.com/fzakaria/nixos-maven-example
5145
52−## Solving for dependencies
46+## Solving for dependencies {#solving-for-dependencies}
5347
54−### buildMaven with NixOS/mvn2nix-maven-plugin
48+### buildMaven with NixOS/mvn2nix-maven-plugin {#buildmaven-with-nixosmvn2nix-maven-plugin}
5549
5650> ⚠️ Although `buildMaven` is the "blessed" way within nixpkgs, as of 2020, it hasn't seen much activity in quite a while.
5751
@@ -88,6 +82,7 @@ This file is then given to the `buildMaven` function, and it returns 2 attribute
8882 A simple derivation that runs through `mvn compile` & `mvn package` to build the JAR. You may use this as inspiration for more complicated derivations.
8983
9084Here is an [example](https://github.com/fzakaria/nixos-maven-example/blob/main/build-maven-repository.nix) of building the Maven repository
85+
9186```nix
9287{ pkgs ? import <nixpkgs> { } }:
9388with pkgs;
@@ -109,7 +104,8 @@ The benefit over the _double invocation_ as we will see below, is that the _/nix
109104│   └── 4.1.3
110105│   ├── avalon-framework-4.1.3.jar -> /nix/store/iv5fp3955w3nq28ff9xfz86wvxbiw6n9-avalon-framework-4.1.3.jar
111106```
112−### Double Invocation
107+
108+### Double Invocation {#double-invocation}
113109
114110> ⚠️ This pattern is the simplest but may cause unnecessary rebuilds due to the output hash changing.
115111
@@ -122,7 +118,7 @@ The first step will be to build the Maven project as a fixed-output derivation i
122118> Traditionally the Maven repository is at `~/.m2/repository`. We will override this to be the `$out` directory.
123119
124120```nix
125−{ stdenv, maven }:
121+{ lib, stdenv, maven }:
126122stdenv.mkDerivation {
127123 name = "maven-repository";
128124 buildInputs = [ maven ];
@@ -145,7 +141,7 @@ stdenv.mkDerivation {
145141 outputHashAlgo = "sha256";
146142 outputHashMode = "recursive";
147143 # replace this with the correct SHA256
148− outputHash = stdenv.lib.fakeSha256;
144+ outputHash = lib.fakeSha256;
149145}
150146```
151147
@@ -169,12 +165,12 @@ The build will fail, and tell you the expected `outputHash` to place. When you'v
169165
170166If your package uses _SNAPSHOT_ dependencies or _version ranges_; there is a strong likelihood that over-time your output hash will change since the resolved dependencies may change. Hence this method is less recommended then using `buildMaven`.
171167
172−## Building a JAR
168+## Building a JAR {#building-a-jar}
173169
174170Regardless of which strategy is chosen above, the step to build the derivation is the same.
175171
176172```nix
177−{ stdenv, lib, maven, callPackage }:
173+{ stdenv, maven, callPackage }:
178174# pick a repository derivation, here we will use buildMaven
179175let repository = callPackage ./build-maven-repository.nix { };
180176in stdenv.mkDerivation rec {
@@ -207,7 +203,7 @@ in stdenv.mkDerivation rec {
2072032 directories, 1 file
208204```
209205
210−## Runnable JAR
206+## Runnable JAR {#runnable-jar}
211207
212208The previous example builds a `jar` file but that's not a file one can run.
213209
@@ -219,7 +215,7 @@ We will use the same repository we built above (either _double invocation_ or _b
219215
220216The following two methods are more suited to Nix then building an [UberJar](https://imagej.net/Uber-JAR) which may be the more traditional approach.
221217
222−### CLASSPATH
218+### CLASSPATH {#classpath}
223219
224220> This is ideal if you are providing a derivation for _nixpkgs_ and don't want to patch the project's `pom.xml`.
225221
@@ -228,7 +224,7 @@ We will read the Maven repository and flatten it to a single list. This list wil
228224We make sure to provide this classpath to the `makeWrapper`.
229225
230226```nix
231−{ stdenv, lib, maven, callPackage, makeWrapper, jre }:
227+{ stdenv, maven, callPackage, makeWrapper, jre }:
232228let
233229 repository = callPackage ./build-maven-repository.nix { };
234230in stdenv.mkDerivation rec {
@@ -258,11 +254,12 @@ in stdenv.mkDerivation rec {
258254}
259255```
260256
261−### MANIFEST file via Maven Plugin
257+### MANIFEST file via Maven Plugin {#manifest-file-via-maven-plugin}
262258
263259> This is ideal if you are the project owner and want to change your `pom.xml` to set the CLASSPATH within it.
264260
265261Augment the `pom.xml` to create a JAR with the following manifest:
262+
266263```xml
267264<build>
268265 <plugins>
@@ -304,7 +301,7 @@ Main-Class: Main
304301We will modify the derivation above to add a symlink to our repository so that it's accessible to our JAR during the `installPhase`.
305302
306303```nix
307−{ stdenv, lib, maven, callPackage, makeWrapper, jre }:
304+{ stdenv, maven, callPackage, makeWrapper, jre }:
308305# pick a repository derivation, here we will use buildMaven
309306let repository = callPackage ./build-maven-repository.nix { };
310307in stdenv.mkDerivation rec {
doc/languages-frameworks/nim.section.mdnew file+91
@@ -0,0 +1,91 @@
1+# Nim {#nim}
2+
3+## Overview {#nim-overview}
4+
5+The Nim compiler, a builder function, and some packaged libraries are available
6+in Nixpkgs. Until now each compiler release has been effectively backwards
7+compatible so only the latest version is available.
8+
9+## Nim program packages in Nixpkgs {#nim-program-packages-in-nixpkgs}
10+
11+Nim programs can be built using `nimPackages.buildNimPackage`. In the
12+case of packages not containing exported library code the attribute
13+`nimBinOnly` should be set to `true`.
14+
15+The following example shows a Nim program that depends only on Nim libraries:
16+
17+```nix
18+{ lib, nimPackages, fetchurl }:
19+
20+nimPackages.buildNimPackage rec {
21+ pname = "hottext";
22+ version = "1.4";
23+
24+ nimBinOnly = true;
25+
26+ src = fetchurl {
27+ url = "https://git.sr.ht/~ehmry/hottext/archive/v${version}.tar.gz";
28+ sha256 = "sha256-hIUofi81zowSMbt1lUsxCnVzfJGN3FEiTtN8CEFpwzY=";
29+ };
30+
31+ buildInputs = with nimPackages; [
32+ bumpy
33+ chroma
34+ flatty
35+ nimsimd
36+ pixie
37+ sdl2
38+ typography
39+ vmath
40+ zippy
41+ ];
42+}
43+
44+```
45+
46+## Nim library packages in Nixpkgs {#nim-library-packages-in-nixpkgs}
47+
48+
49+Nim libraries can also be built using `nimPackages.buildNimPackage`, but
50+often the product of a fetcher is sufficient to satisfy a dependency.
51+The `fetchgit`, `fetchFromGitHub`, and `fetchNimble` functions yield an
52+output that can be discovered during the `configurePhase` of `buildNimPackage`.
53+
54+Nim library packages are listed in
55+[pkgs/top-level/nim-packages.nix](https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/nim-packages.nix) and implemented at
56+[pkgs/development/nim-packages](https://github.com/NixOS/nixpkgs/tree/master/pkgs/development/nim-packages).
57+
58+The following example shows a Nim library that propagates a dependency on a
59+non-Nim package:
60+```nix
61+{ lib, buildNimPackage, fetchNimble, SDL2 }:
62+
63+buildNimPackage rec {
64+ pname = "sdl2";
65+ version = "2.0.4";
66+ src = fetchNimble {
67+ inherit pname version;
68+ hash = "sha256-Vtcj8goI4zZPQs2TbFoBFlcR5UqDtOldaXSH/+/xULk=";
69+ };
70+ propagatedBuildInputs = [ SDL2 ];
71+}
72+```
73+
74+## `buildNimPackage` parameters {#buildnimpackage-parameters}
75+
76+All parameters from `stdenv.mkDerivation` function are still supported. The
77+following are specific to `buildNimPackage`:
78+
79+* `nimBinOnly ? false`: If `true` then build only the programs listed in
80+ the Nimble file in the packages sources.
81+* `nimbleFile`: Specify the Nimble file location of the package being built
82+ rather than discover the file at build-time.
83+* `nimRelease ? true`: Build the package in *release* mode.
84+* `nimDefines ? []`: A list of Nim defines. Key-value tuples are not supported.
85+* `nimFlags ? []`: A list of command line arguments to pass to the Nim compiler.
86+ Use this to specify defines with arguments in the form of `-d:${name}=${value}`.
87+* `nimDoc` ? false`: Build and install HTML documentation.
88+
89+* `buildInputs` ? []: The packages listed here will be searched for `*.nimble`
90+ files which are used to populate the Nim library path. Otherwise the standard
91+ behavior is in effect.
doc/languages-frameworks/node.section.mddeleted−51
@@ -1,51 +0,0 @@
1−Node.js
2−=======
3−The `pkgs/development/node-packages` folder contains a generated collection of
4−[NPM packages](https://npmjs.com/) that can be installed with the Nix package
5−manager.
6−
7−As a rule of thumb, the package set should only provide *end user* software
8−packages, such as command-line utilities. Libraries should only be added to the
9−package set if there is a non-NPM package that requires it.
10−
11−When it is desired to use NPM libraries in a development project, use the
12−`node2nix` generator directly on the `package.json` configuration file of the
13−project.
14−
15−The package set provides support for the official stable Node.js versions.
16−The latest stable LTS release in `nodePackages`, as well as the latest stable
17−Current release in `nodePackages_latest`.
18−
19−If your package uses native addons, you need to examine what kind of native
20−build system it uses. Here are some examples:
21−
22−* `node-gyp`
23−* `node-gyp-builder`
24−* `node-pre-gyp`
25−
26−After you have identified the correct system, you need to override your package
27−expression while adding in build system as a build input. For example, `dat`
28−requires `node-gyp-build`, so [we override](https://github.com/NixOS/nixpkgs/blob/32f5e5da4a1b3f0595527f5195ac3a91451e9b56/pkgs/development/node-packages/default.nix#L37-L40) its expression in [`default.nix`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/node-packages/default.nix):
29−
30−```nix
31− dat = super.dat.override {
32− buildInputs = [ self.node-gyp-build pkgs.libtool pkgs.autoconf pkgs.automake ];
33− meta.broken = since "12";
34− };
35−```
36−
37−To add a package from NPM to nixpkgs:
38−
39− 1. Modify `pkgs/development/node-packages/node-packages.json` to add, update
40− or remove package entries to have it included in `nodePackages` and
41− `nodePackages_latest`.
42− 2. Run the script: `(cd pkgs/development/node-packages && ./generate.sh)`.
43− 3. Build your new package to test your changes:
44− `cd /path/to/nixpkgs && nix-build -A nodePackages.<new-or-updated-package>`.
45− To build against the latest stable Current Node.js version (e.g. 14.x):
46− `nix-build -A nodePackages_latest.<new-or-updated-package>`
47− 4. Add and commit all modified and generated files.
48−
49−For more information about the generation process, consult the
50−[README.md](https://github.com/svanderburg/node2nix) file of the `node2nix`
51−tool.
doc/languages-frameworks/ocaml.section.mdnew file+131
@@ -0,0 +1,131 @@
1+# OCaml {#sec-language-ocaml}
2+
3+## User guide {#sec-language-ocaml-user-guide}
4+
5+OCaml libraries are available in attribute sets of the form `ocaml-ng.ocamlPackages_X_XX` where X is to be replaced with the desired compiler version. For example, ocamlgraph compiled with OCaml 4.12 can be found in `ocaml-ng.ocamlPackages_4_12.ocamlgraph`. The compiler itself is also located in this set, under the name `ocaml`.
6+
7+If you don't care about the exact compiler version, `ocamlPackages` is a top-level alias pointing to a recent version of OCaml.
8+
9+OCaml applications are usually available top-level, and not inside `ocamlPackages`. Notable exceptions are build tools that must be built with the same compiler version as the compiler you intend to use like `dune` or `ocaml-lsp`.
10+
11+To open a shell able to build a typical OCaml project, put the dependencies in `buildInputs` and add `ocamlPackages.ocaml` and `ocamlPackages.findlib` to `nativeBuildInputs` at least.
12+For example:
13+```nix
14+let
15+ pkgs = import <nixpkgs> {};
16+ # choose the ocaml version you want to use
17+ ocamlPackages = pkgs.ocaml-ng.ocamlPackages_4_12;
18+in
19+pkgs.mkShell {
20+ # build tools
21+ nativeBuildInputs = with ocamlPackages; [ ocaml findlib dune_2 ocaml-lsp ];
22+ # dependencies
23+ buildInputs = with ocamlPackages; [ ocamlgraph ];
24+}
25+```
26+
27+## Packaging guide {#sec-language-ocaml-packaging}
28+
29+OCaml libraries should be installed in `$(out)/lib/ocaml/${ocaml.version}/site-lib/`. Such directories are automatically added to the `$OCAMLPATH` environment variable when building another package that depends on them or when opening a `nix-shell`.
30+
31+Given that most of the OCaml ecosystem is now built with dune, nixpkgs includes a convenience build support function called `buildDunePackage` that will build an OCaml package using dune, OCaml and findlib and any additional dependencies provided as `buildInputs` or `propagatedBuildInputs`.
32+
33+Here is a simple package example.
34+
35+- It defines an (optional) attribute `minimalOCamlVersion` (see note below)
36+ that will be used to throw a descriptive evaluation error if building with
37+ an older OCaml is attempted.
38+
39+- It uses the `fetchFromGitHub` fetcher to get its source.
40+
41+- `duneVersion = "2"` ensures that Dune version 2 is used for the
42+ build (this is the default; valid values are `"1"`, `"2"`, and `"3"`);
43+ note that there is also a legacy `useDune2` boolean attribute:
44+ set to `false` it corresponds to `duneVersion = "1"`; set to `true` it
45+ corresponds to `duneVersion = "2"`. If both arguments (`duneVersion` and
46+ `useDune2`) are given, the second one (`useDune2`) is silently ignored.
47+
48+- It sets the optional `doCheck` attribute such that tests will be run with
49+ `dune runtest -p angstrom` after the build (`dune build -p angstrom`) is
50+ complete, but only if the Ocaml version is at at least `"4.05"`.
51+
52+- It uses the package `ocaml-syntax-shims` as a build input, `alcotest` and
53+ `ppx_let` as check inputs (because they are needed to run the tests), and
54+ `bigstringaf` and `result` as propagated build inputs (thus they will also be
55+ available to libraries depending on this library).
56+
57+- The library will be installed using the `angstrom.install` file that dune
58+ generates.
59+
60+```nix
61+{ lib,
62+ fetchFromGitHub,
63+ buildDunePackage,
64+ ocaml,
65+ ocaml-syntax-shims,
66+ alcotest,
67+ result,
68+ bigstringaf,
69+ ppx_let }:
70+
71+buildDunePackage rec {
72+ pname = "angstrom";
73+ version = "0.15.0";
74+ duneVersion = "2";
75+
76+ minimalOCamlVersion = "4.04";
77+
78+ src = fetchFromGitHub {
79+ owner = "inhabitedtype";
80+ repo = pname;
81+ rev = version;
82+ sha256 = "1hmrkdcdlkwy7rxhngf3cv3sa61cznnd9p5lmqhx20664gx2ibrh";
83+ };
84+
85+ checkInputs = [ alcotest ppx_let ];
86+ buildInputs = [ ocaml-syntax-shims ];
87+ propagatedBuildInputs = [ bigstringaf result ];
88+ doCheck = lib.versionAtLeast ocaml.version "4.05";
89+
90+ meta = {
91+ homepage = "https://github.com/inhabitedtype/angstrom";
92+ description = "OCaml parser combinators built for speed and memory efficiency";
93+ license = lib.licenses.bsd3;
94+ maintainers = with lib.maintainers; [ sternenseemann ];
95+ };
96+```
97+
98+Here is a second example, this time using a source archive generated with `dune-release`. It is a good idea to use this archive when it is available as it will usually contain substituted variables such as a `%%VERSION%%` field. This library does not depend on any other OCaml library and no tests are run after building it.
99+
100+```nix
101+{ lib, fetchurl, buildDunePackage }:
102+
103+buildDunePackage rec {
104+ pname = "wtf8";
105+ version = "1.0.2";
106+
107+ useDune2 = true;
108+
109+ minimalOCamlVersion = "4.02";
110+
111+ src = fetchurl {
112+ url = "https://github.com/flowtype/ocaml-${pname}/releases/download/v${version}/${pname}-v${version}.tbz";
113+ sha256 = "09ygcxxd5warkdzz17rgpidrd0pg14cy2svvnvy1hna080lzg7vp";
114+ };
115+
116+ meta = with lib; {
117+ homepage = "https://github.com/flowtype/ocaml-wtf8";
118+ description = "WTF-8 is a superset of UTF-8 that allows unpaired surrogates.";
119+ license = licenses.mit;
120+ maintainers = [ maintainers.eqyiel ];
121+ };
122+}
123+```
124+
125+Note about `minimalOCamlVersion`. A deprecated version of this argument was
126+spelled `minimumOCamlVersion`; setting the old attribute wrongly modifies the
127+derivation hash and is therefore inappropriate. As a technical dept, currently
128+packaged libraries may still use the old spelling: maintainers are invited to
129+fix this when updating packages. Massive renaming is strongly discouraged as it
130+would be challenging to review, difficult to test, and will cause unnecessary
131+rebuild.
doc/languages-frameworks/ocaml.xmldeleted−73
@@ -1,73 +0,0 @@
1−<section xmlns="http://docbook.org/ns/docbook"
2− xmlns:xlink="http://www.w3.org/1999/xlink"
3− xml:id="sec-language-ocaml">
4− <title>OCaml</title>
5−
6− <para>
7− OCaml libraries should be installed in <literal>$(out)/lib/ocaml/${ocaml.version}/site-lib/</literal>. Such directories are automatically added to the <literal>$OCAMLPATH</literal> environment variable when building another package that depends on them or when opening a <literal>nix-shell</literal>.
8− </para>
9−
10− <para>
11− Given that most of the OCaml ecosystem is now built with dune, nixpkgs includes a convenience build support function called <literal>buildDunePackage</literal> that will build an OCaml package using dune, OCaml and findlib and any additional dependencies provided as <literal>buildInputs</literal> or <literal>propagatedBuildInputs</literal>.
12− </para>
13−
14− <para>
15− Here is a simple package example. It defines an (optional) attribute <literal>minimumOCamlVersion</literal> that will be used to throw a descriptive evaluation error if building with an older OCaml is attempted. It uses the <literal>fetchFromGitHub</literal> fetcher to get its source. It sets the <literal>doCheck</literal> (optional) attribute to <literal>true</literal> which means that tests will be run with <literal>dune runtest -p angstrom</literal> after the build (<literal>dune build -p angstrom</literal>) is complete. It uses <literal>alcotest</literal> as a build input (because it is needed to run the tests) and <literal>bigstringaf</literal> and <literal>result</literal> as propagated build inputs (thus they will also be available to libraries depending on this library). The library will be installed using the <literal>angstrom.install</literal> file that dune generates.
16− </para>
17−
18−<programlisting>
19−{ stdenv, fetchFromGitHub, buildDunePackage, alcotest, result, bigstringaf }:
20−
21−buildDunePackage rec {
22− pname = "angstrom";
23− version = "0.10.0";
24−
25− minimumOCamlVersion = "4.03";
26−
27− src = fetchFromGitHub {
28− owner = "inhabitedtype";
29− repo = pname;
30− rev = version;
31− sha256 = "0lh6024yf9ds0nh9i93r9m6p5psi8nvrqxl5x7jwl13zb0r9xfpw";
32− };
33−
34− buildInputs = [ alcotest ];
35− propagatedBuildInputs = [ bigstringaf result ];
36− doCheck = true;
37−
38− meta = {
39− homepage = "https://github.com/inhabitedtype/angstrom";
40− description = "OCaml parser combinators built for speed and memory efficiency";
41− license = stdenv.lib.licenses.bsd3;
42− maintainers = with stdenv.lib.maintainers; [ sternenseemann ];
43− };
44−}
45−</programlisting>
46−
47− <para>
48− Here is a second example, this time using a source archive generated with <literal>dune-release</literal>. It is a good idea to use this archive when it is available as it will usually contain substituted variables such as a <literal>%%VERSION%%</literal> field. This library does not depend on any other OCaml library and no tests are run after building it.
49− </para>
50−
51−<programlisting>
52−{ stdenv, fetchurl, buildDunePackage }:
53−
54−buildDunePackage rec {
55− pname = "wtf8";
56− version = "1.0.1";
57−
58− minimumOCamlVersion = "4.01";
59−
60− src = fetchurl {
61− url = "https://github.com/flowtype/ocaml-${pname}/releases/download/v${version}/${pname}-${version}.tbz";
62− sha256 = "1msg3vycd3k8qqj61sc23qks541cxpb97vrnrvrhjnqxsqnh6ygq";
63− };
64−
65− meta = with stdenv.lib; {
66− homepage = "https://github.com/flowtype/ocaml-wtf8";
67− description = "WTF-8 is a superset of UTF-8 that allows unpaired surrogates.";
68− license = licenses.mit;
69− maintainers = [ maintainers.eqyiel ];
70− };
71−}
72−</programlisting>
73−</section>
doc/languages-frameworks/octave.section.mdnew file+92
@@ -0,0 +1,92 @@
1+# Octave {#sec-octave}
2+
3+## Introduction {#ssec-octave-introduction}
4+
5+Octave is a modular scientific programming language and environment.
6+A majority of the packages supported by Octave from their [website](https://octave.sourceforge.io/packages.php) are packaged in nixpkgs.
7+
8+## Structure {#ssec-octave-structure}
9+
10+All Octave add-on packages are available in two ways:
11+1. Under the top-level `Octave` attribute, `octave.pkgs`.
12+2. As a top-level attribute, `octavePackages`.
13+
14+## Packaging Octave Packages {#ssec-octave-packaging}
15+
16+Nixpkgs provides a function `buildOctavePackage`, a generic package builder function for any Octave package that complies with the Octave's current packaging format.
17+
18+All Octave packages are defined in [pkgs/top-level/octave-packages.nix](https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/octave-packages.nix) rather than `pkgs/all-packages.nix`.
19+Each package is defined in their own file in the [pkgs/development/octave-modules](https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/octave-modules) directory.
20+Octave packages are made available through `all-packages.nix` through both the attribute `octavePackages` and `octave.pkgs`.
21+You can test building an Octave package as follows:
22+
23+```ShellSession
24+$ nix-build -A octavePackages.symbolic
25+```
26+
27+To install it into your user profile, run this command from the root of the repository:
28+
29+```ShellSession
30+$ nix-env -f. -iA octavePackages.symbolic
31+```
32+
33+You can build Octave with packages by using the `withPackages` passed-through function.
34+
35+```ShellSession
36+$ nix-shell -p 'octave.withPackages (ps: with ps; [ symbolic ])'
37+```
38+
39+This will also work in a `shell.nix` file.
40+
41+```nix
42+{ pkgs ? import <nixpkgs> { }}:
43+
44+pkgs.mkShell {
45+ nativeBuildInputs = with pkgs; [
46+ (octave.withPackages (opkgs: with opkgs; [ symbolic ]))
47+ ];
48+}
49+```
50+
51+### `buildOctavePackage` Steps {#sssec-buildOctavePackage-steps}
52+
53+The `buildOctavePackage` does several things to make sure things work properly.
54+
55+1. Sets the environment variable `OCTAVE_HISTFILE` to `/dev/null` during package compilation so that the commands run through the Octave interpreter directly are not logged.
56+2. Skips the configuration step, because the packages are stored as gzipped tarballs, which Octave itself handles directly.
57+3. Change the hierarchy of the tarball so that only a single directory is at the top-most level of the tarball.
58+4. Use Octave itself to run the `pkg build` command, which unzips the tarball, extracts the necessary files written in Octave, and compiles any code written in C++ or Fortran, and places the fully compiled artifact in `$out`.
59+
60+`buildOctavePackage` is built on top of `stdenv` in a standard way, allowing most things to be customized.
61+
62+### Handling Dependencies {#sssec-octave-handling-dependencies}
63+
64+In Octave packages, there are four sets of dependencies that can be specified:
65+
66+`nativeBuildInputs`
67+: Just like other packages, `nativeBuildInputs` is intended for architecture-dependent build-time-only dependencies.
68+
69+`buildInputs`
70+: Like other packages, `buildInputs` is intended for architecture-independent build-time-only dependencies.
71+
72+`propagatedBuildInputs`
73+: Similar to other packages, `propagatedBuildInputs` is intended for packages that are required for both building and running of the package.
74+See [Symbolic](https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/octave-modules/symbolic/default.nix) for how this works and why it is needed.
75+
76+`requiredOctavePackages`
77+: This is a special dependency that ensures the specified Octave packages are dependent on others, and are made available simultaneously when loading them in Octave.
78+
79+### Installing Octave Packages {#sssec-installing-octave-packages}
80+
81+By default, the `buildOctavePackage` function does _not_ install the requested package into Octave for use.
82+The function will only build the requested package.
83+This is due to Octave maintaining an text-based database about which packages are installed where.
84+To this end, when all the requested packages have been built, the Octave package and all its add-on packages are put together into an environment, similar to Python.
85+
86+1. First, all the Octave binaries are wrapped with the environment variable `OCTAVE_SITE_INITFILE` set to a file in `$out`, which is required for Octave to be able to find the non-standard package database location.
87+2. Because of the way `buildEnv` works, all tarballs that are present (which should be all Octave packages to install) should be removed.
88+3. The path down to the default install location of Octave packages is recreated so that Nix-operated Octave can install the packages.
89+4. Install the packages into the `$out` environment while writing package entries to the database file.
90+This database file is unique for each different (according to Nix) environment invocation.
91+5. Rewrite the Octave-wide startup file to read from the list of packages installed in that particular environment.
92+6. Wrap any programs that are required by the Octave packages so that they work with all the paths defined within the environment.
doc/languages-frameworks/perl.section.mdnew file+159
@@ -0,0 +1,159 @@
1+# Perl {#sec-language-perl}
2+
3+## Running perl programs on the shell {#ssec-perl-running}
4+
5+When executing a Perl script, it is possible you get an error such as `./myscript.pl: bad interpreter: /usr/bin/perl: no such file or directory`. This happens when the script expects Perl to be installed at `/usr/bin/perl`, which is not the case when using Perl from nixpkgs. You can fix the script by changing the first line to:
6+
7+```perl
8+#!/usr/bin/env perl
9+```
10+
11+to take the Perl installation from the `PATH` environment variable, or invoke Perl directly with:
12+
13+```ShellSession
14+$ perl ./myscript.pl
15+```
16+
17+When the script is using a Perl library that is not installed globally, you might get an error such as `Can't locate DB_File.pm in @INC (you may need to install the DB_File module)`. In that case, you can use `nix-shell` to start an ad-hoc shell with that library installed, for instance:
18+
19+```ShellSession
20+$ nix-shell -p perl perlPackages.DBFile --run ./myscript.pl
21+```
22+
23+If you are always using the script in places where `nix-shell` is available, you can embed the `nix-shell` invocation in the shebang like this:
24+
25+```perl
26+#!/usr/bin/env nix-shell
27+#! nix-shell -i perl -p perl perlPackages.DBFile
28+```
29+
30+## Packaging Perl programs {#ssec-perl-packaging}
31+
32+Nixpkgs provides a function `buildPerlPackage`, a generic package builder function for any Perl package that has a standard `Makefile.PL`. It’s implemented in [pkgs/development/perl-modules/generic](https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/perl-modules/generic).
33+
34+Perl packages from CPAN are defined in [pkgs/top-level/perl-packages.nix](https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/perl-packages.nix) rather than `pkgs/all-packages.nix`. Most Perl packages are so straight-forward to build that they are defined here directly, rather than having a separate function for each package called from `perl-packages.nix`. However, more complicated packages should be put in a separate file, typically in `pkgs/development/perl-modules`. Here is an example of the former:
35+
36+```nix
37+ClassC3 = buildPerlPackage rec {
38+ name = "Class-C3-0.21";
39+ src = fetchurl {
40+ url = "mirror://cpan/authors/id/F/FL/FLORA/${name}.tar.gz";
41+ sha256 = "1bl8z095y4js66pwxnm7s853pi9czala4sqc743fdlnk27kq94gz";
42+ };
43+};
44+```
45+
46+Note the use of `mirror://cpan/`, and the `${name}` in the URL definition to ensure that the name attribute is consistent with the source that we’re actually downloading. Perl packages are made available in `all-packages.nix` through the variable `perlPackages`. For instance, if you have a package that needs `ClassC3`, you would typically write
47+
48+```nix
49+foo = import ../path/to/foo.nix {
50+ inherit stdenv fetchurl ...;
51+ inherit (perlPackages) ClassC3;
52+};
53+```
54+
55+in `all-packages.nix`. You can test building a Perl package as follows:
56+
57+```ShellSession
58+$ nix-build -A perlPackages.ClassC3
59+```
60+
61+To install it with `nix-env` instead: `nix-env -f. -iA perlPackages.ClassC3`.
62+
63+So what does `buildPerlPackage` do? It does the following:
64+
65+1. In the configure phase, it calls `perl Makefile.PL` to generate a Makefile. You can set the variable `makeMakerFlags` to pass flags to `Makefile.PL`
66+2. It adds the contents of the `PERL5LIB` environment variable to `#! .../bin/perl` line of Perl scripts as `-Idir` flags. This ensures that a script can find its dependencies. (This can cause this shebang line to become too long for Darwin to handle; see the note below.)
67+3. In the fixup phase, it writes the propagated build inputs (`propagatedBuildInputs`) to the file `$out/nix-support/propagated-user-env-packages`. `nix-env` recursively installs all packages listed in this file when you install a package that has it. This ensures that a Perl package can find its dependencies.
68+
69+`buildPerlPackage` is built on top of `stdenv`, so everything can be customised in the usual way. For instance, the `BerkeleyDB` module has a `preConfigure` hook to generate a configuration file used by `Makefile.PL`:
70+
71+```nix
72+{ buildPerlPackage, fetchurl, db }:
73+
74+buildPerlPackage rec {
75+ name = "BerkeleyDB-0.36";
76+
77+ src = fetchurl {
78+ url = "mirror://cpan/authors/id/P/PM/PMQS/${name}.tar.gz";
79+ sha256 = "07xf50riarb60l1h6m2dqmql8q5dij619712fsgw7ach04d8g3z1";
80+ };
81+
82+ preConfigure = ''
83+ echo "LIB = ${db.out}/lib" > config.in
84+ echo "INCLUDE = ${db.dev}/include" >> config.in
85+ '';
86+}
87+```
88+
89+Dependencies on other Perl packages can be specified in the `buildInputs` and `propagatedBuildInputs` attributes. If something is exclusively a build-time dependency, use `buildInputs`; if it’s (also) a runtime dependency, use `propagatedBuildInputs`. For instance, this builds a Perl module that has runtime dependencies on a bunch of other modules:
90+
91+```nix
92+ClassC3Componentised = buildPerlPackage rec {
93+ name = "Class-C3-Componentised-1.0004";
94+ src = fetchurl {
95+ url = "mirror://cpan/authors/id/A/AS/ASH/${name}.tar.gz";
96+ sha256 = "0xql73jkcdbq4q9m0b0rnca6nrlvf5hyzy8is0crdk65bynvs8q1";
97+ };
98+ propagatedBuildInputs = [
99+ ClassC3 ClassInspector TestException MROCompat
100+ ];
101+};
102+```
103+
104+On Darwin, if a script has too many `-Idir` flags in its first line (its “shebang line”), it will not run. This can be worked around by calling the `shortenPerlShebang` function from the `postInstall` phase:
105+
106+```nix
107+{ lib, stdenv, buildPerlPackage, fetchurl, shortenPerlShebang }:
108+
109+ImageExifTool = buildPerlPackage {
110+ pname = "Image-ExifTool";
111+ version = "11.50";
112+
113+ src = fetchurl {
114+ url = "https://www.sno.phy.queensu.ca/~phil/exiftool/Image-ExifTool-11.50.tar.gz";
115+ sha256 = "0d8v48y94z8maxkmw1rv7v9m0jg2dc8xbp581njb6yhr7abwqdv3";
116+ };
117+
118+ buildInputs = lib.optional stdenv.isDarwin shortenPerlShebang;
119+ postInstall = lib.optionalString stdenv.isDarwin ''
120+ shortenPerlShebang $out/bin/exiftool
121+ '';
122+};
123+```
124+
125+This will remove the `-I` flags from the shebang line, rewrite them in the `use lib` form, and put them on the next line instead. This function can be given any number of Perl scripts as arguments; it will modify them in-place.
126+
127+### Generation from CPAN {#ssec-generation-from-CPAN}
128+
129+Nix expressions for Perl packages can be generated (almost) automatically from CPAN. This is done by the program `nix-generate-from-cpan`, which can be installed as follows:
130+
131+```ShellSession
132+$ nix-env -f "<nixpkgs>" -iA nix-generate-from-cpan
133+```
134+
135+Substitute `<nixpkgs>` by the path of a nixpkgs clone to use the latest version.
136+
137+This program takes a Perl module name, looks it up on CPAN, fetches and unpacks the corresponding package, and prints a Nix expression on standard output. For example:
138+
139+```ShellSession
140+$ nix-generate-from-cpan XML::Simple
141+ XMLSimple = buildPerlPackage rec {
142+ name = "XML-Simple-2.22";
143+ src = fetchurl {
144+ url = "mirror://cpan/authors/id/G/GR/GRANTM/${name}.tar.gz";
145+ sha256 = "b9450ef22ea9644ae5d6ada086dc4300fa105be050a2030ebd4efd28c198eb49";
146+ };
147+ propagatedBuildInputs = [ XMLNamespaceSupport XMLSAX XMLSAXExpat ];
148+ meta = {
149+ description = "An API for simple XML files";
150+ license = with lib.licenses; [ artistic1 gpl1Plus ];
151+ };
152+ };
153+```
154+
155+The output can be pasted into `pkgs/top-level/perl-packages.nix` or wherever else you need it.
156+
157+### Cross-compiling modules {#ssec-perl-cross-compilation}
158+
159+Nixpkgs has experimental support for cross-compiling Perl modules. In many cases, it will just work out of the box, even for modules with native extensions. Sometimes, however, the Makefile.PL for a module may (indirectly) import a native module. In that case, you will need to make a stub for that module that will satisfy the Makefile.PL and install it into `lib/perl5/site_perl/cross_perl/${perl.version}`. See the `postInstall` for `DBI` for an example.
doc/languages-frameworks/perl.xmldeleted−195
@@ -1,195 +0,0 @@
1−<section xmlns="http://docbook.org/ns/docbook"
2− xmlns:xlink="http://www.w3.org/1999/xlink"
3− xml:id="sec-language-perl">
4− <title>Perl</title>
5−
6− <section xml:id="ssec-perl-running">
7− <title>Running perl programs on the shell</title>
8−
9− <para>
10− When executing a Perl script, it is possible you get an error such as <literal>./myscript.pl: bad interpreter: /usr/bin/perl: no such file or directory</literal>. This happens when the script expects Perl to be installed at <filename>/usr/bin/perl</filename>, which is not the case when using Perl from nixpkgs. You can fix the script by changing the first line to:
11−<programlisting>
12−#!/usr/bin/env perl
13−</programlisting>
14− to take the Perl installation from the <literal>PATH</literal> environment variable, or invoke Perl directly with:
15−<screen>
16−<prompt>$ </prompt>perl ./myscript.pl
17−</screen>
18− </para>
19−
20− <para>
21− When the script is using a Perl library that is not installed globally, you might get an error such as <literal>Can't locate DB_File.pm in @INC (you may need to install the DB_File module)</literal>. In that case, you can use <command>nix-shell</command> to start an ad-hoc shell with that library installed, for instance:
22−<screen>
23−<prompt>$ </prompt>nix-shell -p perl perlPackages.DBFile --run ./myscript.pl
24−</screen>
25− </para>
26−
27− <para>
28− If you are always using the script in places where <command>nix-shell</command> is available, you can embed the <command>nix-shell</command> invocation in the shebang like this:
29−<programlisting>
30−#!/usr/bin/env nix-shell
31−#! nix-shell -i perl -p perl perlPackages.DBFile
32−</programlisting>
33− </para>
34− </section>
35−
36− <section xml:id="ssec-perl-packaging">
37− <title>Packaging Perl programs</title>
38−
39− <para>
40− Nixpkgs provides a function <varname>buildPerlPackage</varname>, a generic package builder function for any Perl package that has a standard <varname>Makefile.PL</varname>. It’s implemented in <link
41− xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/perl-modules/generic"><filename>pkgs/development/perl-modules/generic</filename></link>.
42− </para>
43−
44− <para>
45− Perl packages from CPAN are defined in <link
46− xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/perl-packages.nix"><filename>pkgs/top-level/perl-packages.nix</filename></link>, rather than <filename>pkgs/all-packages.nix</filename>. Most Perl packages are so straight-forward to build that they are defined here directly, rather than having a separate function for each package called from <filename>perl-packages.nix</filename>. However, more complicated packages should be put in a separate file, typically in <filename>pkgs/development/perl-modules</filename>. Here is an example of the former:
47−<programlisting>
48−ClassC3 = buildPerlPackage rec {
49− name = "Class-C3-0.21";
50− src = fetchurl {
51− url = "mirror://cpan/authors/id/F/FL/FLORA/${name}.tar.gz";
52− sha256 = "1bl8z095y4js66pwxnm7s853pi9czala4sqc743fdlnk27kq94gz";
53− };
54−};
55−</programlisting>
56− Note the use of <literal>mirror://cpan/</literal>, and the <literal>${name}</literal> in the URL definition to ensure that the name attribute is consistent with the source that we’re actually downloading. Perl packages are made available in <filename>all-packages.nix</filename> through the variable <varname>perlPackages</varname>. For instance, if you have a package that needs <varname>ClassC3</varname>, you would typically write
57−<programlisting>
58−foo = import ../path/to/foo.nix {
59− inherit stdenv fetchurl ...;
60− inherit (perlPackages) ClassC3;
61−};
62−</programlisting>
63− in <filename>all-packages.nix</filename>. You can test building a Perl package as follows:
64−<screen>
65−<prompt>$ </prompt>nix-build -A perlPackages.ClassC3
66−</screen>
67− <varname>buildPerlPackage</varname> adds <literal>perl-</literal> to the start of the name attribute, so the package above is actually called <literal>perl-Class-C3-0.21</literal>. So to install it, you can say:
68−<screen>
69−<prompt>$ </prompt>nix-env -i perl-Class-C3
70−</screen>
71− (Of course you can also install using the attribute name: <literal>nix-env -i -A perlPackages.ClassC3</literal>.)
72− </para>
73−
74− <para>
75− So what does <varname>buildPerlPackage</varname> do? It does the following:
76− <orderedlist>
77− <listitem>
78− <para>
79− In the configure phase, it calls <literal>perl Makefile.PL</literal> to generate a Makefile. You can set the variable <varname>makeMakerFlags</varname> to pass flags to <filename>Makefile.PL</filename>
80− </para>
81− </listitem>
82− <listitem>
83− <para>
84− It adds the contents of the <envar>PERL5LIB</envar> environment variable to <literal>#! .../bin/perl</literal> line of Perl scripts as <literal>-I<replaceable>dir</replaceable></literal> flags. This ensures that a script can find its dependencies. (This can cause this shebang line to become too long for Darwin to handle; see the note below.)
85− </para>
86− </listitem>
87− <listitem>
88− <para>
89− In the fixup phase, it writes the propagated build inputs (<varname>propagatedBuildInputs</varname>) to the file <filename>$out/nix-support/propagated-user-env-packages</filename>. <command>nix-env</command> recursively installs all packages listed in this file when you install a package that has it. This ensures that a Perl package can find its dependencies.
90− </para>
91− </listitem>
92− </orderedlist>
93− </para>
94−
95− <para>
96− <varname>buildPerlPackage</varname> is built on top of <varname>stdenv</varname>, so everything can be customised in the usual way. For instance, the <literal>BerkeleyDB</literal> module has a <varname>preConfigure</varname> hook to generate a configuration file used by <filename>Makefile.PL</filename>:
97−<programlisting>
98−{ buildPerlPackage, fetchurl, db }:
99−
100−buildPerlPackage rec {
101− name = "BerkeleyDB-0.36";
102−
103− src = fetchurl {
104− url = "mirror://cpan/authors/id/P/PM/PMQS/${name}.tar.gz";
105− sha256 = "07xf50riarb60l1h6m2dqmql8q5dij619712fsgw7ach04d8g3z1";
106− };
107−
108− preConfigure = ''
109− echo "LIB = ${db.out}/lib" > config.in
110− echo "INCLUDE = ${db.dev}/include" >> config.in
111− '';
112−}
113−</programlisting>
114− </para>
115−
116− <para>
117− Dependencies on other Perl packages can be specified in the <varname>buildInputs</varname> and <varname>propagatedBuildInputs</varname> attributes. If something is exclusively a build-time dependency, use <varname>buildInputs</varname>; if it’s (also) a runtime dependency, use <varname>propagatedBuildInputs</varname>. For instance, this builds a Perl module that has runtime dependencies on a bunch of other modules:
118−<programlisting>
119−ClassC3Componentised = buildPerlPackage rec {
120− name = "Class-C3-Componentised-1.0004";
121− src = fetchurl {
122− url = "mirror://cpan/authors/id/A/AS/ASH/${name}.tar.gz";
123− sha256 = "0xql73jkcdbq4q9m0b0rnca6nrlvf5hyzy8is0crdk65bynvs8q1";
124− };
125− propagatedBuildInputs = [
126− ClassC3 ClassInspector TestException MROCompat
127− ];
128−};
129−</programlisting>
130− </para>
131−
132− <para>
133− On Darwin, if a script has too many <literal>-I<replaceable>dir</replaceable></literal> flags in its first line (its “shebang line”), it will not run. This can be worked around by calling the <literal>shortenPerlShebang</literal> function from the <literal>postInstall</literal> phase:
134−<programlisting>
135−{ stdenv, buildPerlPackage, fetchurl, shortenPerlShebang }:
136−
137−ImageExifTool = buildPerlPackage {
138− pname = "Image-ExifTool";
139− version = "11.50";
140−
141− src = fetchurl {
142− url = "https://www.sno.phy.queensu.ca/~phil/exiftool/Image-ExifTool-11.50.tar.gz";
143− sha256 = "0d8v48y94z8maxkmw1rv7v9m0jg2dc8xbp581njb6yhr7abwqdv3";
144− };
145−
146− buildInputs = stdenv.lib.optional stdenv.isDarwin shortenPerlShebang;
147− postInstall = stdenv.lib.optional stdenv.isDarwin ''
148− shortenPerlShebang $out/bin/exiftool
149− '';
150−};
151−</programlisting>
152− This will remove the <literal>-I</literal> flags from the shebang line, rewrite them in the <literal>use lib</literal> form, and put them on the next line instead. This function can be given any number of Perl scripts as arguments; it will modify them in-place.
153− </para>
154−
155− <section xml:id="ssec-generation-from-CPAN">
156− <title>Generation from CPAN</title>
157−
158− <para>
159− Nix expressions for Perl packages can be generated (almost) automatically from CPAN. This is done by the program <command>nix-generate-from-cpan</command>, which can be installed as follows:
160− </para>
161−
162−<screen>
163−<prompt>$ </prompt>nix-env -i nix-generate-from-cpan
164−</screen>
165−
166− <para>
167− This program takes a Perl module name, looks it up on CPAN, fetches and unpacks the corresponding package, and prints a Nix expression on standard output. For example:
168−<screen>
169−<prompt>$ </prompt>nix-generate-from-cpan XML::Simple
170− XMLSimple = buildPerlPackage rec {
171− name = "XML-Simple-2.22";
172− src = fetchurl {
173− url = "mirror://cpan/authors/id/G/GR/GRANTM/${name}.tar.gz";
174− sha256 = "b9450ef22ea9644ae5d6ada086dc4300fa105be050a2030ebd4efd28c198eb49";
175− };
176− propagatedBuildInputs = [ XMLNamespaceSupport XMLSAX XMLSAXExpat ];
177− meta = {
178− description = "An API for simple XML files";
179− license = with stdenv.lib.licenses; [ artistic1 gpl1Plus ];
180− };
181− };
182−</screen>
183− The output can be pasted into <filename>pkgs/top-level/perl-packages.nix</filename> or wherever else you need it.
184− </para>
185− </section>
186−
187− <section xml:id="ssec-perl-cross-compilation">
188− <title>Cross-compiling modules</title>
189−
190− <para>
191− Nixpkgs has experimental support for cross-compiling Perl modules. In many cases, it will just work out of the box, even for modules with native extensions. Sometimes, however, the Makefile.PL for a module may (indirectly) import a native module. In that case, you will need to make a stub for that module that will satisfy the Makefile.PL and install it into <filename>lib/perl5/site_perl/cross_perl/${perl.version}</filename>. See the <varname>postInstall</varname> for <varname>DBI</varname> for an example.
192− </para>
193− </section>
194− </section>
195−</section>
doc/languages-frameworks/php.section.md+18
@@ -135,3 +135,21 @@ Example of building `composer` with additional extensions:
135135 enabled ++ (with all; [ imagick redis ]))
136136).packages.composer
137137```
138+
139+### Overriding PHP packages {#ssec-php-user-guide-overriding-packages}
140+
141+`php-packages.nix` form a scope, allowing us to override the packages defined within. For example, to apply a patch to a `mysqlnd` extension, you can simply pass an overlay-style function to `php`’s `packageOverrides` argument:
142+
143+```nix
144+php.override {
145+ packageOverrides = final: prev: {
146+ extensions = prev.extensions // {
147+ mysqlnd = prev.extensions.mysqlnd.overrideAttrs (attrs: {
148+ patches = attrs.patches or [] ++ [
149+ …
150+ ];
151+ });
152+ };
153+ };
154+}
155+```
doc/languages-frameworks/python.section.md+221−107
@@ -1,14 +1,15 @@
1−# Python
1+# Python {#python}
22
3−## User Guide
3+## User Guide {#user-guide}
44
5−### Using Python
5+### Using Python {#using-python}
66
7−#### Overview
7+#### Overview {#overview}
88
99Several versions of the Python interpreter are available on Nix, as well as a
10−high amount of packages. The attribute `python` refers to the default
11−interpreter, which is currently CPython 2.7. It is also possible to refer to
10+high amount of packages. The attribute `python3` refers to the default
11+interpreter, which is currently CPython 3.9. The attribute `python` refers to
12+CPython 2.7 for backwards-compatibility. It is also possible to refer to
1213specific versions, e.g. `python38` refers to CPython 3.8, and `pypy` refers to
1314the default PyPy interpreter.
1415
@@ -30,7 +31,7 @@ The main package set contains aliases to these package sets, e.g.
3031`pythonPackages` refers to `python.pkgs` and `python38Packages` to
3132`python38.pkgs`.
3233
33−#### Installing Python and packages
34+#### Installing Python and packages {#installing-python-and-packages}
3435
3536The Nix and NixOS manuals explain how packages are generally installed. In the
3637case of Python and Nix, it is important to make a distinction between whether the
@@ -61,7 +62,7 @@ Philosphically, this should be familiar to users who are used to a `venv` style
6162of development: individual projects create their own Python environments without
6263impacting the global environment or each other.
6364
64−#### Ad-hoc temporary Python environment with `nix-shell`
65+#### Ad-hoc temporary Python environment with `nix-shell` {#ad-hoc-temporary-python-environment-with-nix-shell}
6566
6667The simplest way to start playing with the way nix wraps and sets up Python
6768environments is with `nix-shell` at the cmdline. These environments create a
@@ -78,7 +79,7 @@ $ nix-shell -p 'python38.withPackages(ps: with ps; [ numpy toolz ])'
7879By default `nix-shell` will start a `bash` session with this interpreter in our
7980`PATH`, so if we then run:
8081
81−```
82+```Python console
8283[nix-shell:~/src/nixpkgs]$ python3
8384Python 3.8.1 (default, Dec 18 2019, 19:06:26)
8485[GCC 9.2.0] on linux
@@ -89,7 +90,7 @@ Type "help", "copyright", "credits" or "license" for more information.
8990Note that no other modules are in scope, even if they were imperatively
9091installed into our user environment as a dependency of a Python application:
9192
92−```
93+```Python console
9394>>> import requests
9495Traceback (most recent call last):
9596 File "<stdin>", line 1, in <module>
@@ -130,7 +131,7 @@ arbitrary dependencies. This is a good way to get a feel for how the Python
130131interpreter and dependencies work in Nix and NixOS, but to do some actual
131132development, we'll want to make it a bit more persistent.
132133
133−##### Running Python scripts and using `nix-shell` as shebang
134+##### Running Python scripts and using `nix-shell` as shebang {#running-python-scripts-and-using-nix-shell-as-shebang}
134135
135136Sometimes, we have a script whose header looks like this:
136137
@@ -145,15 +146,15 @@ print(f"The dot product of {a} and {b} is: {np.dot(a, b)}")
145146Executing this script requires a `python3` that has `numpy`. Using what we learned
146147in the previous section, we could startup a shell and just run it like so:
147148
148−```
149−nix-shell -p 'python38.withPackages(ps: with ps; [ numpy ])' --run 'python3 foo.py'
149+```ShellSession
150+$ nix-shell -p 'python38.withPackages(ps: with ps; [ numpy ])' --run 'python3 foo.py'
150151The dot product of [1 2] and [3 4] is: 11
151152```
152153
153154But if we maintain the script ourselves, and if there are more dependencies, it
154155may be nice to encode those dependencies in source to make the script re-usable
155156without that bit of knowledge. That can be done by using `nix-shell` as a
156−[shebang](https://en.wikipedia.org/wiki/Shebang_(Unix), like so:
157+[shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)), like so:
157158
158159```python
159160#!/usr/bin/env nix-shell
@@ -202,7 +203,7 @@ of the package versions.
202203This is also a great way to ensure the script executes identically on different
203204servers.
204205
205−##### Load environment from `.nix` expression
206+##### Load environment from `.nix` expression {#load-environment-from-.nix-expression}
206207
207208We've now seen how to create an ad-hoc temporary shell session, and how to
208209create a single script with Python dependencies, but in the course of normal
@@ -244,7 +245,7 @@ let
244245 ps.toolz
245246 ]);
246247in mkShell {
247− buildInputs = [
248+ packages = [
248249 pythonEnv
249250
250251 black
@@ -261,7 +262,7 @@ and its Python dependencies, but also tools like `black` or `mypy` and libraries
261262like `libffi` the `openssl` in scope. This is generic and can span any number of
262263tools or languages across the Nixpkgs ecosystem.
263264
264−##### Installing environments globally on the system
265+##### Installing environments globally on the system {#installing-environments-globally-on-the-system}
265266
266267Up to now, we've been creating environments scoped to an ad-hoc shell session,
267268or a single script, or a single project. This is generally advisable, as it
@@ -314,7 +315,7 @@ If you get a conflict or prefer to keep the setup clean, you can have `nix-env`
314315atomically *uninstall* all other imperatively installed packages and replace
315316your profile with just `myEnv` by using the `--replace` flag.
316317
317−##### Environment defined in `/etc/nixos/configuration.nix`
318+##### Environment defined in `/etc/nixos/configuration.nix` {#environment-defined-in-etcnixosconfiguration.nix}
318319
319320For the sake of completeness, here's how to install the environment system-wide
320321on NixOS.
@@ -328,16 +329,16 @@ on NixOS.
328329}
329330```
330331
331−### Developing with Python
332+### Developing with Python {#developing-with-python}
332333
333334Above, we were mostly just focused on use cases and what to do to get started
334335creating working Python environments in nix.
335336
336337Now that you know the basics to be up and running, it is time to take a step
337−back and take a deeper look at at how Python packages are packaged on Nix. Then,
338+back and take a deeper look at how Python packages are packaged on Nix. Then,
338339we will look at how you can use development mode with your code.
339340
340−#### Python library packages in Nixpkgs
341+#### Python library packages in Nixpkgs {#python-library-packages-in-nixpkgs}
341342
342343With Nix all packages are built by functions. The main function in Nix for
343344building Python libraries is `buildPythonPackage`. Let's see how we can build the
@@ -424,7 +425,7 @@ of `withPackages` we used a `let` expression. You can see that we used
424425`toolz` from the Nixpkgs package set this time, but instead took our own version
425426that we introduced with the `let` expression.
426427
427−#### Handling dependencies
428+#### Handling dependencies {#handling-dependencies}
428429
429430Our example, `toolz`, does not have any dependencies on other Python packages or
430431system libraries. According to the manual, `buildPythonPackage` uses the
@@ -438,7 +439,7 @@ The following example shows which arguments are given to `buildPythonPackage` in
438439order to build [`datashape`](https://github.com/blaze/datashape).
439440
440441```nix
441−{ lib, buildPythonPackage, fetchPypi, numpy, multipledispatch, dateutil, pytest }:
442+{ lib, buildPythonPackage, fetchPypi, numpy, multipledispatch, python-dateutil, pytest }:
442443
443444buildPythonPackage rec {
444445 pname = "datashape";
@@ -450,7 +451,7 @@ buildPythonPackage rec {
450451 };
451452
452453 checkInputs = [ pytest ];
453− propagatedBuildInputs = [ numpy multipledispatch dateutil ];
454+ propagatedBuildInputs = [ numpy multipledispatch python-dateutil ];
454455
455456 meta = with lib; {
456457 homepage = "https://github.com/ContinuumIO/datashape";
@@ -462,7 +463,7 @@ buildPythonPackage rec {
462463```
463464
464465We can see several runtime dependencies, `numpy`, `multipledispatch`, and
465−`dateutil`. Furthermore, we have one `checkInputs`, i.e. `pytest`. `pytest` is a
466+`python-dateutil`. Furthermore, we have one `checkInputs`, i.e. `pytest`. `pytest` is a
466467test runner and is only used during the `checkPhase` and is therefore not added
467468to `propagatedBuildInputs`.
468469
@@ -536,9 +537,10 @@ buildPythonPackage rec {
536537 };
537538}
538539```
540+
539541Note also the line `doCheck = false;`, we explicitly disabled running the test-suite.
540542
541−#### Testing Python Packages
543+#### Testing Python Packages {#testing-python-packages}
542544
543545It is highly encouraged to have testing as part of the package build. This
544546helps to avoid situations where the package was able to build and install,
@@ -558,10 +560,11 @@ thus can cause issues when a test suite asserts on that behavior.
558560as many tests should be enabled as possible. Failing tests can still be
559561a good indication that the package is not in a valid state.
560562
561−#### Using pytest
563+#### Using pytest {#using-pytest}
562564
563565Pytest is the most common test runner for python repositories. A trivial
564566test run would be:
567+
565568```
566569 checkInputs = [ pytest ];
567570 checkPhase = "pytest";
@@ -571,6 +574,7 @@ However, many repositories' test suites do not translate well to nix's build
571574sandbox, and will generally need many tests to be disabled.
572575
573576To filter tests using pytest, one can do the following:
577+
574578```
575579 checkInputs = [ pytest ];
576580 # avoid tests which need additional data or touch network
@@ -586,19 +590,20 @@ easier than having to create a new package.
586590
587591`-k` is used to define a predicate for test names. In this example, we are
588592filtering out tests which contain `download` or `update` in their test case name.
589−Only one `-k` argument is allows, and thus a long predicate should be concatenated
590−with "\" and wrapped to the next line.
593+Only one `-k` argument is allowed, and thus a long predicate should be concatenated
594+with “\\” and wrapped to the next line.
591595
592−*NOTE:* In pytest==6.0.1, the use of "\" to continue a line (e.g. `-k 'not download \'`) has
596+*NOTE:* In pytest==6.0.1, the use of “\\” to continue a line (e.g. `-k 'not download \'`) has
593597been removed, in this case, it's recommended to use `pytestCheckHook`.
594598
595−#### Using pytestCheckHook
599+#### Using pytestCheckHook {#using-pytestcheckhook}
596600
597601`pytestCheckHook` is a convenient hook which will substitute the setuptools
598602`test` command for a checkPhase which runs `pytest`. This is also beneficial
599603when a package may need many items disabled to run the test suite.
600604
601605Using the example above, the analagous pytestCheckHook usage would be:
606+
602607```
603608 checkInputs = [ pytestCheckHook ];
604609
@@ -610,6 +615,10 @@ Using the example above, the analagous pytestCheckHook usage would be:
610615 "download"
611616 "update"
612617 ];
618+
619+ disabledTestPaths = [
620+ "tests/test_failing.py"
621+ ];
613622```
614623
615624This is expecially useful when tests need to be conditionallydisabled,
@@ -632,9 +641,9 @@ Trying to concatenate the related strings to disable tests in a regular checkPha
632641would be much harder to read. This also enables us to comment on why specific tests
633642are disabled.
634643
635−#### Using pythonImportsCheck
644+#### Using pythonImportsCheck {#using-pythonimportscheck}
636645
637−Although unit tests are highly prefered to valid correctness of a package. Not
646+Although unit tests are highly prefered to validate correctness of a package, not
638647all packages have test suites that can be ran easily, and some have none at all.
639648To help ensure the package still works, `pythonImportsCheck` can attempt to import
640649the listed modules.
@@ -654,7 +663,7 @@ However, this is done in it's own phase, and not dependent on whether `doCheck =
654663This can also be useful in verifying that the package doesn't assume commonly
655664present packages (e.g. `setuptools`)
656665
657−### Develop local package
666+### Develop local package {#develop-local-package}
658667
659668As a Python developer you're likely aware of [development mode](http://setuptools.readthedocs.io/en/latest/setuptools.html#development-mode)
660669(`python setup.py develop`); instead of installing the package this command
@@ -689,7 +698,7 @@ buildPythonPackage rec {
689698It is important to note that due to how development mode is implemented on Nix
690699it is not possible to have multiple packages simultaneously in development mode.
691700
692−### Organising your packages
701+### Organising your packages {#organising-your-packages}
693702
694703So far we discussed how you can use Python on Nix, and how you can develop with
695704it. We've looked at how you write expressions to package Python packages, and we
@@ -701,7 +710,7 @@ like to be able to use in different projects. In order to minimise unnecessary
701710duplication we now look at how you can maintain a repository with your
702711own packages. The important functions here are `import` and `callPackage`.
703712
704−### Including a derivation using `callPackage`
713+### Including a derivation using `callPackage` {#including-a-derivation-using-callpackage}
705714
706715Earlier we created a Python environment using `withPackages`, and included the
707716`toolz` package via a `let` expression.
@@ -751,28 +760,28 @@ don't explicitly define which `python` derivation should be used. In the above
751760example we use `buildPythonPackage` that is part of the set `python38Packages`,
752761and in this case the `python38` interpreter is automatically used.
753762
754−## Reference
763+## Reference {#reference}
755764
756−### Interpreters
765+### Interpreters {#interpreters}
757766
758−Versions 2.7, 3.6, 3.7, 3.8 and 3.9 of the CPython interpreter are available as
759−respectively `python27`, `python36`, `python37`, `python38` and `python39`. The
767+Versions 2.7, 3.7, 3.8 and 3.9 of the CPython interpreter are available as
768+respectively `python27`, `python37`, `python38` and `python39`. The
760769aliases `python2` and `python3` correspond to respectively `python27` and
761−`python38`. The default interpreter, `python`, maps to `python2`. The PyPy
762−interpreters compatible with Python 2.7 and 3 are available as `pypy27` and
763−`pypy3`, with aliases `pypy2` mapping to `pypy27` and `pypy` mapping to `pypy2`.
764−The Nix expressions for the interpreters can be found in
770+`python39`. The attribute `python` maps to `python2`. The PyPy interpreters
771+compatible with Python 2.7 and 3 are available as `pypy27` and `pypy3`, with
772+aliases `pypy2` mapping to `pypy27` and `pypy` mapping to `pypy2`. The Nix
773+expressions for the interpreters can be found in
765774`pkgs/development/interpreters/python`.
766775
767776All packages depending on any Python interpreter get appended
768777`out/{python.sitePackages}` to `$PYTHONPATH` if such directory
769778exists.
770779
771−#### Missing `tkinter` module standard library
780+#### Missing `tkinter` module standard library {#missing-tkinter-module-standard-library}
772781
773782To reduce closure size the `Tkinter`/`tkinter` is available as a separate package, `pythonPackages.tkinter`.
774783
775−#### Attributes on interpreters packages
784+#### Attributes on interpreters packages {#attributes-on-interpreters-packages}
776785
777786Each interpreter has the following attributes:
778787
@@ -784,7 +793,24 @@ Each interpreter has the following attributes:
784793- `executable`. Name of the interpreter executable, e.g. `python3.8`.
785794- `pkgs`. Set of Python packages for that specific interpreter. The package set can be modified by overriding the interpreter and passing `packageOverrides`.
786795
787−### Building packages and applications
796+### Optimizations {#optimizations}
797+
798+The Python interpreters are by default not build with optimizations enabled, because
799+the builds are in that case not reproducible. To enable optimizations, override the
800+interpreter of interest, e.g using
801+
802+```
803+let
804+ pkgs = import ./. {};
805+ mypython = pkgs.python3.override {
806+ enableOptimizations = true;
807+ reproducibleBuild = false;
808+ self = mypython;
809+ };
810+in mypython
811+```
812+
813+### Building packages and applications {#building-packages-and-applications}
788814
789815Python libraries and applications that use `setuptools` or
790816`distutils` are typically built with respectively the `buildPythonPackage` and
@@ -804,19 +830,20 @@ attribute set is created for each available Python interpreter. The available
804830sets are
805831
806832* `pkgs.python27Packages`
807−* `pkgs.python36Packages`
808833* `pkgs.python37Packages`
809834* `pkgs.python38Packages`
810835* `pkgs.python39Packages`
836+* `pkgs.python310Packages`
837+* `pkgs.python311Packages`
811838* `pkgs.pypyPackages`
812839
813840and the aliases
814841
815842* `pkgs.python2Packages` pointing to `pkgs.python27Packages`
816−* `pkgs.python3Packages` pointing to `pkgs.python38Packages`
843+* `pkgs.python3Packages` pointing to `pkgs.python39Packages`
817844* `pkgs.pythonPackages` pointing to `pkgs.python2Packages`
818845
819−#### `buildPythonPackage` function
846+#### `buildPythonPackage` function {#buildpythonpackage-function}
820847
821848The `buildPythonPackage` function is implemented in
822849`pkgs/development/interpreters/python/mk-python-derivation`
@@ -825,7 +852,7 @@ using setup hooks.
825852The following is an example:
826853
827854```nix
828−{ lib, buildPythonPackage, fetchPypi, hypothesis, setuptools_scm, attrs, py, setuptools, six, pluggy }:
855+{ lib, buildPythonPackage, fetchPypi, hypothesis, setuptools-scm, attrs, py, setuptools, six, pluggy }:
829856
830857buildPythonPackage rec {
831858 pname = "pytest";
@@ -842,7 +869,7 @@ buildPythonPackage rec {
842869 '';
843870
844871 checkInputs = [ hypothesis ];
845− nativeBuildInputs = [ setuptools_scm ];
872+ nativeBuildInputs = [ setuptools-scm ];
846873 propagatedBuildInputs = [ attrs py setuptools six pluggy ];
847874
848875 meta = with lib; {
@@ -868,7 +895,7 @@ e.g. the test runner, should be added to `checkInputs`.
868895By default `meta.platforms` is set to the same value
869896as the interpreter unless overridden otherwise.
870897
871−##### `buildPythonPackage` parameters
898+##### `buildPythonPackage` parameters {#buildpythonpackage-parameters}
872899
873900All parameters from `stdenv.mkDerivation` function are still supported. The
874901following are specific to `buildPythonPackage`:
@@ -914,7 +941,7 @@ because their behaviour is different:
914941
915942* `nativeBuildInputs ? []`: Build-time only dependencies. Typically executables
916943 as well as the items listed in `setup_requires`.
917−* `buildInputs ? []`: Build and/or run-time dependencies that need to be be
944+* `buildInputs ? []`: Build and/or run-time dependencies that need to be
918945 compiled for the host machine. Typically non-Python libraries which are being
919946 linked.
920947* `checkInputs ? []`: Dependencies needed for running the `checkPhase`. These
@@ -924,7 +951,7 @@ because their behaviour is different:
924951 `buildPythonPackage` also injects code into and wraps executables with the
925952 paths included in this list. Items listed in `install_requires` go here.
926953
927−##### Overriding Python packages
954+##### Overriding Python packages {#overriding-python-packages}
928955
929956The `buildPythonPackage` function has a `overridePythonAttrs` method that can be
930957used to override the package. In the following example we create an environment
@@ -952,7 +979,32 @@ with import <nixpkgs> {};
952979in python.withPackages(ps: [ps.blaze])).env
953980```
954981
955−#### `buildPythonApplication` function
982+#### Optional extra dependencies
983+
984+Some packages define optional dependencies for additional features. With
985+`setuptools` this is called `extras_require` and `flit` calls it `extras-require`. A
986+method for supporting this is by declaring the extras of a package in its
987+`passthru`, e.g. in case of the package `dask`
988+
989+```nix
990+passthru.extras-require = {
991+ complete = [ distributed ];
992+};
993+```
994+
995+and letting the package requiring the extra add the list to its dependencies
996+
997+```nix
998+propagatedBuildInputs = [
999+ ...
1000+] ++ dask.extras-require.complete;
1001+```
1002+
1003+Note this method is preferred over adding parameters to builders, as that can
1004+result in packages depending on different variants and thereby causing
1005+collisions.
1006+
1007+#### `buildPythonApplication` function {#buildpythonapplication-function}
9561008
9571009The `buildPythonApplication` function is practically the same as
9581010`buildPythonPackage`. The main purpose of this function is to build a Python
@@ -969,18 +1021,18 @@ called with `callPackage` and passed `python` or `pythonPackages` (possibly
9691021specifying an interpreter version), like this:
9701022
9711023```nix
972−{ lib, python3Packages }:
1024+{ lib, python3 }:
9731025
974−python3Packages.buildPythonApplication rec {
1026+python3.pkgs.buildPythonApplication rec {
9751027 pname = "luigi";
9761028 version = "2.7.9";
9771029
978− src = python3Packages.fetchPypi {
1030+ src = python3.pkgs.fetchPypi {
9791031 inherit pname version;
9801032 sha256 = "035w8gqql36zlan0xjrzz9j4lh9hs0qrsgnbyw07qs7lnkvbdv9x";
9811033 };
9821034
983− propagatedBuildInputs = with python3Packages; [ tornado_4 python-daemon ];
1035+ propagatedBuildInputs = with python3.pkgs; [ tornado python-daemon ];
9841036
9851037 meta = with lib; {
9861038 ...
@@ -997,7 +1049,7 @@ luigi = callPackage ../applications/networking/cluster/luigi { };
9971049Since the package is an application, a consumer doesn't need to care about
9981050Python versions or modules, which is why they don't go in `pythonPackages`.
9991051
1000−#### `toPythonApplication` function
1052+#### `toPythonApplication` function {#topythonapplication-function}
10011053
10021054A distinction is made between applications and libraries, however, sometimes a
10031055package is used as both. In this case the package is added as a library to
@@ -1009,11 +1061,12 @@ The Nix expression shall use `buildPythonPackage` and be called from
10091061`python-packages.nix`. A reference shall be created from `all-packages.nix` to
10101062the attribute in `python-packages.nix`, and the `toPythonApplication` shall be
10111063applied to the reference:
1064+
10121065```nix
10131066youtube-dl = with pythonPackages; toPythonApplication youtube-dl;
10141067```
10151068
1016−#### `toPythonModule` function
1069+#### `toPythonModule` function {#topythonmodule-function}
10171070
10181071In some cases, such as bindings, a package is created using
10191072`stdenv.mkDerivation` and added as attribute in `all-packages.nix`. The Python
@@ -1030,7 +1083,7 @@ opencv = toPythonModule (pkgs.opencv.override {
10301083
10311084Do pay attention to passing in the right Python version!
10321085
1033−#### `python.buildEnv` function
1086+#### `python.buildEnv` function {#python.buildenv-function}
10341087
10351088Python environments can be created using the low-level `pkgs.buildEnv` function.
10361089This example shows how to create an environment that has the Pyramid Web Framework.
@@ -1068,8 +1121,8 @@ with import <nixpkgs> {};
10681121will drop you into a shell where Python will have the
10691122specified packages in its path.
10701123
1124+##### `python.buildEnv` arguments {#python.buildenv-arguments}
10711125
1072−##### `python.buildEnv` arguments
10731126
10741127* `extraLibs`: List of packages installed inside the environment.
10751128* `postBuild`: Shell command executed after the build of environment.
@@ -1077,7 +1130,7 @@ specified packages in its path.
10771130* `permitUserSite`: Skip setting the `PYTHONNOUSERSITE` environment variable in
10781131 wrapped binaries in the environment.
10791132
1080−#### `python.withPackages` function
1133+#### `python.withPackages` function {#python.withpackages-function}
10811134
10821135The `python.withPackages` function provides a simpler interface to the `python.buildEnv` functionality.
10831136It takes a function as an argument that is passed the set of python packages and returns the list
@@ -1119,7 +1172,7 @@ need them, you have to use `python.buildEnv`.
11191172Python 2 namespace packages may provide `__init__.py` that collide. In that case
11201173`python.buildEnv` should be used with `ignoreCollisions = true`.
11211174
1122−#### Setup hooks
1175+#### Setup hooks {#setup-hooks}
11231176
11241177The following are setup hooks specifically for Python packages. Most of these
11251178are used in `buildPythonPackage`.
@@ -1144,7 +1197,7 @@ are used in `buildPythonPackage`.
11441197- `wheelUnpackHook` to move a wheel to the correct folder so it can be installed
11451198 with the `pipInstallHook`.
11461199
1147−### Development mode
1200+### Development mode {#development-mode}
11481201
11491202Development or editable mode is supported. To develop Python packages
11501203`buildPythonPackage` has additional logic inside `shellPhase` to run `pip
@@ -1153,6 +1206,7 @@ install -e . --prefix $TMPDIR/`for the package.
11531206Warning: `shellPhase` is executed only if `setup.py` exists.
11541207
11551208Given a `default.nix`:
1209+
11561210```nix
11571211with import <nixpkgs> {};
11581212
@@ -1175,7 +1229,7 @@ nix-shell -p pythonPackages.pyramid zlib libjpeg git
11751229
11761230Note: There is a boolean value `lib.inNixShell` set to `true` if nix-shell is invoked.
11771231
1178−### Tools
1232+### Tools {#tools}
11791233
11801234Packages inside nixpkgs are written by hand. However many tools exist in
11811235community to help save time. No tool is preferred at the moment.
@@ -1184,9 +1238,10 @@ community to help save time. No tool is preferred at the moment.
11841238 expressions for your Python project. Note that [sharing derivations from
11851239 pypi2nix with nixpkgs is possible but not
11861240 encouraged](https://github.com/nix-community/pypi2nix/issues/222#issuecomment-443497376).
1187−- [python2nix](https://github.com/proger/python2nix) by Vladimir Kirillov.
1241+- [nixpkgs-pytools](https://github.com/nix-community/nixpkgs-pytools)
1242+- [poetry2nix](https://github.com/nix-community/poetry2nix)
11881243
1189−### Deterministic builds
1244+### Deterministic builds {#deterministic-builds}
11901245
11911246The Python interpreters are now built deterministically. Minor modifications had
11921247to be made to the interpreters in order to generate deterministic bytecode. This
@@ -1198,7 +1253,7 @@ have timestamp 1. The `buildPythonPackage` function sets `DETERMINISTIC_BUILD=1`
11981253and [PYTHONHASHSEED=0](https://docs.python.org/3.8/using/cmdline.html#envvar-PYTHONHASHSEED).
11991254Both are also exported in `nix-shell`.
12001255
1201−### Automatic tests
1256+### Automatic tests {#automatic-tests}
12021257
12031258It is recommended to test packages as part of the build process.
12041259Source distributions (`sdist`) often include test files, but not always.
@@ -1207,7 +1262,7 @@ By default the command `python setup.py test` is run as part of the
12071262`checkPhase`, but often it is necessary to pass a custom `checkPhase`. An
12081263example of such a situation is when `py.test` is used.
12091264
1210−#### Common issues
1265+#### Common issues {#common-issues}
12111266
12121267* Non-working tests can often be deselected. By default `buildPythonPackage`
12131268 runs `python setup.py test`. Most Python modules follows the standard test
@@ -1224,18 +1279,19 @@ example of such a situation is when `py.test` is used.
12241279 '';
12251280 }
12261281 ```
1282+
12271283* Tests that attempt to access `$HOME` can be fixed by using the following
12281284 work-around before running tests (e.g. `preCheck`): `export HOME=$(mktemp -d)`
12291285
1230−## FAQ
1286+## FAQ {#faq}
12311287
1232−### How to solve circular dependencies?
1288+### How to solve circular dependencies? {#how-to-solve-circular-dependencies}
12331289
12341290Consider the packages `A` and `B` that depend on each other. When packaging `B`,
12351291a solution is to override package `A` not to depend on `B` as an input. The same
12361292should also be done when packaging `A`.
12371293
1238−### How to override a Python package?
1294+### How to override a Python package? {#how-to-override-a-python-package}
12391295
12401296We can override the interpreter and pass `packageOverrides`. In the following
12411297example we rename the `pandas` package and build it.
@@ -1293,7 +1349,7 @@ let
12931349in newpkgs.inkscape
12941350```
12951351
1296−### `python setup.py bdist_wheel` cannot create .whl
1352+### `python setup.py bdist_wheel` cannot create .whl {#python-setup.py-bdist_wheel-cannot-create-.whl}
12971353
12981354Executing `python setup.py bdist_wheel` in a `nix-shell `fails with
12991355```
@@ -1326,7 +1382,7 @@ or unset `SOURCE_DATE_EPOCH`:
13261382nix-shell --run "unset SOURCE_DATE_EPOCH; python3 setup.py bdist_wheel"
13271383```
13281384
1329−### `install_data` / `data_files` problems
1385+### `install_data` / `data_files` problems {#install_data-data_files-problems}
13301386
13311387If you get the following error:
13321388
@@ -1346,7 +1402,7 @@ ${python.interpreter} setup.py install_data --install-dir=$out --root=$out
13461402sed -i '/ = data\_files/d' setup.py
13471403```
13481404
1349−### Rationale of non-existent global site-packages
1405+### Rationale of non-existent global site-packages {#rationale-of-non-existent-global-site-packages}
13501406
13511407On most operating systems a global `site-packages` is maintained. This however
13521408becomes problematic if you want to run multiple Python versions or have multiple
@@ -1361,7 +1417,7 @@ If you want to create a Python environment for development, then the recommended
13611417method is to use `nix-shell`, either with or without the `python.buildEnv`
13621418function.
13631419
1364−### How to consume Python modules using pip in a virtual environment like I am used to on other Operating Systems?
1420+### How to consume Python modules using pip in a virtual environment like I am used to on other Operating Systems? {#how-to-consume-python-modules-using-pip-in-a-virtual-environment-like-i-am-used-to-on-other-operating-systems}
13651421
13661422While this approach is not very idiomatic from Nix perspective, it can still be
13671423useful when dealing with pre-existing projects or in situations where it's not
@@ -1474,7 +1530,7 @@ is executed it will attempt to download the Python modules listed in
14741530requirements.txt. However these will be cached locally within the `virtualenv`
14751531folder and not downloaded again.
14761532
1477−### How to override a Python package from `configuration.nix`?
1533+### How to override a Python package from `configuration.nix`? {#how-to-override-a-python-package-from-configuration.nix}
14781534
14791535If you need to change a package's attribute(s) from `configuration.nix` you could do:
14801536
@@ -1482,11 +1538,12 @@ If you need to change a package's attribute(s) from `configuration.nix` you coul
14821538 nixpkgs.config.packageOverrides = super: {
14831539 python = super.python.override {
14841540 packageOverrides = python-self: python-super: {
1485− zerobin = python-super.zerobin.overrideAttrs (oldAttrs: {
1486− src = super.fetchgit {
1487− url = "https://github.com/sametmax/0bin";
1488− rev = "a344dbb18fe7a855d0742b9a1cede7ce423b34ec";
1489− sha256 = "16d769kmnrpbdr0ph0whyf4yff5df6zi4kmwx7sz1d3r6c8p6xji";
1541+ twisted = python-super.twisted.overrideAttrs (oldAttrs: {
1542+ src = super.fetchPypi {
1543+ pname = "twisted";
1544+ version = "19.10.0";
1545+ sha256 = "7394ba7f272ae722a74f3d969dcf599bc4ef093bc392038748a490f1724a515d";
1546+ extension = "tar.bz2";
14901547 };
14911548 });
14921549 };
@@ -1494,9 +1551,11 @@ If you need to change a package's attribute(s) from `configuration.nix` you coul
14941551 };
14951552```
14961553
1497−`pythonPackages.zerobin` is now globally overridden. All packages and also the
1498−`zerobin` NixOS service use the new definition. Note that `python-super` refers
1499−to the old package set and `python-self` to the new, overridden version.
1554+`pythonPackages.twisted` is now globally overridden.
1555+All packages and also all NixOS services that reference `twisted`
1556+(such as `services.buildbot-worker`) now use the new definition.
1557+Note that `python-super` refers to the old package set and `python-self`
1558+to the new, overridden version.
15001559
15011560To modify only a Python package set instead of a whole Python derivation, use
15021561this snippet:
@@ -1504,12 +1563,12 @@ this snippet:
15041563```nix
15051564 myPythonPackages = pythonPackages.override {
15061565 overrides = self: super: {
1507− zerobin = ...;
1566+ twisted = ...;
15081567 };
15091568 }
15101569```
15111570
1512−### How to override a Python package using overlays?
1571+### How to override a Python package using overlays? {#how-to-override-a-python-package-using-overlays}
15131572
15141573Use the following overlay template:
15151574
@@ -1517,11 +1576,12 @@ Use the following overlay template:
15171576self: super: {
15181577 python = super.python.override {
15191578 packageOverrides = python-self: python-super: {
1520− zerobin = python-super.zerobin.overrideAttrs (oldAttrs: {
1521− src = super.fetchgit {
1522− url = "https://github.com/sametmax/0bin";
1523− rev = "a344dbb18fe7a855d0742b9a1cede7ce423b34ec";
1524− sha256 = "16d769kmnrpbdr0ph0whyf4yff5df6zi4kmwx7sz1d3r6c8p6xji";
1579+ twisted = python-super.twisted.overrideAttrs (oldAttrs: {
1580+ src = super.fetchPypi {
1581+ pname = "twisted";
1582+ version = "19.10.0";
1583+ sha256 = "7394ba7f272ae722a74f3d969dcf599bc4ef093bc392038748a490f1724a515d";
1584+ extension = "tar.bz2";
15251585 };
15261586 });
15271587 };
@@ -1529,12 +1589,12 @@ self: super: {
15291589}
15301590```
15311591
1532−### How to use Intel's MKL with numpy and scipy?
1592+### How to use Intel’s MKL with numpy and scipy? {#how-to-use-intels-mkl-with-numpy-and-scipy}
15331593
15341594MKL can be configured using an overlay. See the section "[Using overlays to
15351595configure alternatives](#sec-overlays-alternatives-blas-lapack)".
15361596
1537−### What inputs do `setup_requires`, `install_requires` and `tests_require` map to?
1597+### What inputs do `setup_requires`, `install_requires` and `tests_require` map to? {#what-inputs-do-setup_requires-install_requires-and-tests_require-map-to}
15381598
15391599In a `setup.py` or `setup.cfg` it is common to declare dependencies:
15401600
@@ -1542,17 +1602,15 @@ In a `setup.py` or `setup.cfg` it is common to declare dependencies:
15421602* `install_requires` corresponds to `propagatedBuildInputs`
15431603* `tests_require` corresponds to `checkInputs`
15441604
1545−## Contributing
1605+## Contributing {#contributing}
15461606
1547−### Contributing guidelines
1607+### Contributing guidelines {#contributing-guidelines}
15481608
1549−Following rules are desired to be respected:
1609+The following rules are desired to be respected:
15501610
15511611* Python libraries are called from `python-packages.nix` and packaged with
15521612 `buildPythonPackage`. The expression of a library should be in
1553− `pkgs/development/python-modules/<name>/default.nix`. Libraries in
1554− `pkgs/top-level/python-packages.nix` are sorted quasi-alphabetically to avoid
1555− merge conflicts.
1613+ `pkgs/development/python-modules/<name>/default.nix`.
15561614* Python applications live outside of `python-packages.nix` and are packaged
15571615 with `buildPythonApplication`.
15581616* Make sure libraries build for all Python interpreters.
@@ -1562,7 +1620,63 @@ Following rules are desired to be respected:
15621620 case, when you disable tests, leave a comment explaining why.
15631621* Commit names of Python libraries should reflect that they are Python
15641622 libraries, so write for example `pythonPackages.numpy: 1.11 -> 1.12`.
1565−* Attribute names in `python-packages.nix` should be normalized according to
1566− [PEP 0503](https://www.python.org/dev/peps/pep-0503/#normalized-names). This
1567− means that characters should be converted to lowercase and `.` and `_` should
1568− be replaced by a single `-` (foo-bar-baz instead of Foo__Bar.baz )
1623+* Attribute names in `python-packages.nix` as well as `pname`s should match the
1624+ library's name on PyPI, but be normalized according to [PEP
1625+ 0503](https://www.python.org/dev/peps/pep-0503/#normalized-names). This means
1626+ that characters should be converted to lowercase and `.` and `_` should be
1627+ replaced by a single `-` (foo-bar-baz instead of Foo__Bar.baz).
1628+ If necessary, `pname` has to be given a different value within `fetchPypi`.
1629+* Attribute names in `python-packages.nix` should be sorted alphanumerically to
1630+ avoid merge conflicts and ease locating attributes.
1631+
1632+## Package set maintenance
1633+
1634+The whole Python package set has a lot of packages that do not see regular
1635+updates, because they either are a very fragile component in the Python
1636+ecosystem, like for example the `hypothesis` package, or packages that have
1637+no maintainer, so maintenance falls back to the package set maintainers.
1638+
1639+### Updating packages in bulk
1640+
1641+There is a tool to update alot of python libraries in bulk, it exists at
1642+`maintainers/scripts/update-python-libraries` with this repository.
1643+
1644+It can quickly update minor or major versions for all packages selected
1645+and create update commits, and supports the `fetchPypi`, `fetchurl` and
1646+`fetchFromGitHub` fetchers. When updating lots of packages that are
1647+hosted on GitHub, exporting a `GITHUB_API_TOKEN` is highly recommended.
1648+
1649+Updating packages in bulk leads to lots of breakages, which is why a
1650+stabilization period on the `python-unstable` branch is required.
1651+
1652+Once the branch is sufficiently stable it should normally be merged
1653+into the `staging` branch.
1654+
1655+An exemplary call to update all python libraries between minor versions
1656+would be:
1657+
1658+```ShellSession
1659+$ maintainers/scripts/update-python-libraries --target minor --commit --use-pkgs-prefix pkgs/development/python-modules/**/default.nix
1660+```
1661+
1662+## CPython Update Schedule
1663+
1664+With [PEP 602](https://www.python.org/dev/peps/pep-0602/), CPython now
1665+follows a yearly release cadence. In nixpkgs, all supported interpreters
1666+are made available, but only the most recent two
1667+interpreters package sets are built; this is a compromise between being
1668+the latest interpreter, and what the majority of the Python packages support.
1669+
1670+New CPython interpreters are released in October. Generally, it takes some
1671+time for the majority of active Python projects to support the latest stable
1672+interpreter. To help ease the migration for Nixpkgs users
1673+between Python interpreters the schedule below will be used:
1674+
1675+| When | Event |
1676+| --- | --- |
1677+| After YY.11 Release | Bump CPython package set window. The latest and previous latest stable should now be built. |
1678+| After YY.05 Release | Bump default CPython interpreter to latest stable. |
1679+
1680+In practice, this means that the Python community will have had a stable interpreter
1681+for ~2 months before attempting to update the package set. And this will
1682+allow for ~7 months for Python applications to support the latest interpreter.
doc/languages-frameworks/qt.section.mdnew file+160
@@ -0,0 +1,160 @@
1+# Qt {#sec-language-qt}
2+
3+Writing Nix expressions for Qt libraries and applications is largely similar as for other C++ software.
4+This section assumes some knowledge of the latter.
5+There are two problems that the Nixpkgs Qt infrastructure addresses,
6+which are not shared by other C++ software:
7+
8+1. There are usually multiple supported versions of Qt in Nixpkgs.
9+ All of a package's dependencies must be built with the same version of Qt.
10+ This is similar to the version constraints imposed on interpreted languages like Python.
11+2. Qt makes extensive use of runtime dependency detection.
12+ Runtime dependencies are made into build dependencies through wrappers.
13+
14+## Nix expression for a Qt package (default.nix) {#qt-default-nix}
15+
16+```{=docbook}
17+<programlisting>
18+{ stdenv, lib, qtbase, wrapQtAppsHook }: <co xml:id='qt-default-nix-co-1' />
19+
20+stdenv.mkDerivation {
21+ pname = "myapp";
22+ version = "1.0";
23+
24+ buildInputs = [ qtbase ];
25+ nativeBuildInputs = [ wrapQtAppsHook ]; <co xml:id='qt-default-nix-co-2' />
26+}
27+</programlisting>
28+
29+ <calloutlist>
30+ <callout arearefs='qt-default-nix-co-1'>
31+ <para>
32+ Import Qt modules directly, that is: <literal>qtbase</literal>, <literal>qtdeclarative</literal>, etc.
33+ <emphasis>Do not</emphasis> import Qt package sets such as <literal>qt5</literal>
34+ because the Qt versions of dependencies may not be coherent, causing build and runtime failures.
35+ </para>
36+ </callout>
37+ <callout arearefs='qt-default-nix-co-2'>
38+ <para>
39+ All Qt packages must include <literal>wrapQtAppsHook</literal> in
40+ <literal>nativeBuildInputs</literal>, or you must explicitly set
41+ <literal>dontWrapQtApps</literal>.
42+ </para>
43+ </callout>
44+ </calloutlist>
45+```
46+
47+## Locating runtime dependencies {#qt-runtime-dependencies}
48+
49+Qt applications must be wrapped to find runtime dependencies.
50+Include `wrapQtAppsHook` in `nativeBuildInputs`:
51+
52+```nix
53+{ stdenv, wrapQtAppsHook }:
54+
55+stdenv.mkDerivation {
56+ # ...
57+ nativeBuildInputs = [ wrapQtAppsHook ];
58+}
59+```
60+
61+Add entries to `qtWrapperArgs` are to modify the wrappers created by
62+`wrapQtAppsHook`:
63+
64+```nix
65+{ stdenv, wrapQtAppsHook }:
66+
67+stdenv.mkDerivation {
68+ # ...
69+ nativeBuildInputs = [ wrapQtAppsHook ];
70+ qtWrapperArgs = [ ''--prefix PATH : /path/to/bin'' ];
71+}
72+```
73+
74+The entries are passed as arguments to [wrapProgram](#fun-wrapProgram).
75+
76+Set `dontWrapQtApps` to stop applications from being wrapped automatically.
77+Wrap programs manually with `wrapQtApp`, using the syntax of
78+[wrapProgram](#fun-wrapProgram):
79+
80+```nix
81+{ stdenv, lib, wrapQtAppsHook }:
82+
83+stdenv.mkDerivation {
84+ # ...
85+ nativeBuildInputs = [ wrapQtAppsHook ];
86+ dontWrapQtApps = true;
87+ preFixup = ''
88+ wrapQtApp "$out/bin/myapp" --prefix PATH : /path/to/bin
89+ '';
90+}
91+```
92+
93+::: {.note}
94+`wrapQtAppsHook` ignores files that are non-ELF executables.
95+This means that scripts won't be automatically wrapped so you'll need to manually wrap them as previously mentioned.
96+An example of when you'd always need to do this is with Python applications that use PyQt.
97+:::
98+
99+## Adding a library to Nixpkgs {#adding-a-library-to-nixpkgs}
100+
101+Add Qt libraries to `qt5-packages.nix` to make them available for every
102+supported Qt version.
103+
104+### Example adding a Qt library {#qt-library-all-packages-nix}
105+
106+The following represents the contents of `qt5-packages.nix`.
107+
108+```nix
109+{
110+ # ...
111+
112+ mylib = callPackage ../path/to/mylib {};
113+
114+ # ...
115+}
116+```
117+
118+Libraries are built with every available version of Qt.
119+Use the `meta.broken` attribute to disable the package for unsupported Qt versions:
120+
121+```nix
122+{ stdenv, lib, qtbase }:
123+
124+stdenv.mkDerivation {
125+ # ...
126+ # Disable this library with Qt < 5.9.0
127+ meta.broken = lib.versionOlder qtbase.version "5.9.0";
128+}
129+```
130+
131+## Adding an application to Nixpkgs {#adding-an-application-to-nixpkgs}
132+
133+Add Qt applications to `qt5-packages.nix`. Add an alias to `all-packages.nix`
134+to select the Qt 5 version used for the application.
135+
136+### Example adding a Qt application {#qt-application-all-packages-nix}
137+
138+The following represents the contents of `qt5-packages.nix`.
139+
140+```nix
141+{
142+ # ...
143+
144+ myapp = callPackage ../path/to/myapp {};
145+
146+ # ...
147+}
148+```
149+
150+The following represents the contents of `all-packages.nix`.
151+
152+```nix
153+{
154+ # ...
155+
156+ myapp = libsForQt5.myapp;
157+
158+ # ...
159+}
160+```
doc/languages-frameworks/qt.xmldeleted−149
@@ -1,149 +0,0 @@
1−<section xmlns="http://docbook.org/ns/docbook"
2− xmlns:xlink="http://www.w3.org/1999/xlink"
3− xml:id="sec-language-qt">
4− <title>Qt</title>
5−
6− <para>
7− This section describes the differences between Nix expressions for Qt libraries and applications and Nix expressions for other C++ software. Some knowledge of the latter is assumed. There are primarily two problems which the Qt infrastructure is designed to address: ensuring consistent versioning of all dependencies and finding dependencies at runtime.
8− </para>
9−
10− <example xml:id='qt-default-nix'>
11− <title>Nix expression for a Qt package (<filename>default.nix</filename>)</title>
12−<programlisting>
13−{ mkDerivation, lib, qtbase }: <co xml:id='qt-default-nix-co-1' />
14−
15−mkDerivation { <co xml:id='qt-default-nix-co-2' />
16− pname = "myapp";
17− version = "1.0";
18−
19− buildInputs = [ qtbase ]; <co xml:id='qt-default-nix-co-3' />
20−}
21−</programlisting>
22− </example>
23−
24− <calloutlist>
25− <callout arearefs='qt-default-nix-co-1'>
26− <para>
27− Import <literal>mkDerivation</literal> and Qt (such as <literal>qtbase</literal> modules directly. <emphasis>Do not</emphasis> import Qt package sets; the Qt versions of dependencies may not be coherent, causing build and runtime failures.
28− </para>
29− </callout>
30− <callout arearefs='qt-default-nix-co-2'>
31− <para>
32− Use <literal>mkDerivation</literal> instead of <literal>stdenv.mkDerivation</literal>. <literal>mkDerivation</literal> is a wrapper around <literal>stdenv.mkDerivation</literal> which applies some Qt-specific settings. This deriver accepts the same arguments as <literal>stdenv.mkDerivation</literal>; refer to <xref linkend='chap-stdenv' /> for details.
33− </para>
34− <para>
35− To use another deriver instead of <literal>stdenv.mkDerivation</literal>, use <literal>mkDerivationWith</literal>:
36−<programlisting>
37−mkDerivationWith myDeriver {
38− # ...
39−}
40−</programlisting>
41− If you cannot use <literal>mkDerivationWith</literal>, please refer to <xref linkend='qt-runtime-dependencies' />.
42− </para>
43− </callout>
44− <callout arearefs='qt-default-nix-co-3'>
45− <para>
46− <literal>mkDerivation</literal> accepts the same arguments as <literal>stdenv.mkDerivation</literal>, such as <literal>buildInputs</literal>.
47− </para>
48− </callout>
49− </calloutlist>
50−
51− <formalpara xml:id='qt-runtime-dependencies'>
52− <title>Locating runtime dependencies</title>
53− <para>
54− Qt applications need to be wrapped to find runtime dependencies. If you cannot use <literal>mkDerivation</literal> or <literal>mkDerivationWith</literal> above, include <literal>wrapQtAppsHook</literal> in <literal>nativeBuildInputs</literal>:
55−<programlisting>
56−stdenv.mkDerivation {
57− # ...
58−
59− nativeBuildInputs = [ wrapQtAppsHook ];
60−}
61−</programlisting>
62− </para>
63− </formalpara>
64−
65− <para>
66− Entries added to <literal>qtWrapperArgs</literal> are used to modify the wrappers created by <literal>wrapQtAppsHook</literal>. The entries are passed as arguments to <xref linkend='fun-wrapProgram' />.
67−<programlisting>
68−mkDerivation {
69− # ...
70−
71− qtWrapperArgs = [ ''--prefix PATH : /path/to/bin'' ];
72−}
73−</programlisting>
74− </para>
75−
76− <para>
77− Set <literal>dontWrapQtApps</literal> to stop applications from being wrapped automatically. It is required to wrap applications manually with <literal>wrapQtApp</literal>, using the syntax of <xref linkend='fun-wrapProgram' />:
78−<programlisting>
79−mkDerivation {
80− # ...
81−
82− dontWrapQtApps = true;
83− preFixup = ''
84− wrapQtApp "$out/bin/myapp" --prefix PATH : /path/to/bin
85− '';
86−}
87−</programlisting>
88− </para>
89−
90− <note>
91− <para>
92− <literal>wrapQtAppsHook</literal> ignores files that are non-ELF executables. This means that scripts won't be automatically wrapped so you'll need to manually wrap them as previously mentioned. An example of when you'd always need to do this is with Python applications that use PyQT.
93− </para>
94− </note>
95−
96− <para>
97− Libraries are built with every available version of Qt. Use the <literal>meta.broken</literal> attribute to disable the package for unsupported Qt versions:
98−<programlisting>
99−mkDerivation {
100− # ...
101−
102− # Disable this library with Qt &lt; 5.9.0
103− meta.broken = builtins.compareVersions qtbase.version "5.9.0" &lt; 0;
104−}
105−</programlisting>
106− </para>
107−
108− <formalpara>
109− <title>Adding a library to Nixpkgs</title>
110− <para>
111− Add a Qt library to <filename>all-packages.nix</filename> by adding it to the collection inside <literal>mkLibsForQt5</literal>. This ensures that the library is built with every available version of Qt as needed.
112− <example xml:id='qt-library-all-packages-nix'>
113− <title>Adding a Qt library to <filename>all-packages.nix</filename></title>
114−<programlisting>
115−{
116− # ...
117−
118− mkLibsForQt5 = self: with self; {
119− # ...
120−
121− mylib = callPackage ../path/to/mylib {};
122− };
123−
124− # ...
125−}
126−</programlisting>
127− </example>
128− </para>
129− </formalpara>
130−
131− <formalpara>
132− <title>Adding an application to Nixpkgs</title>
133− <para>
134− Add a Qt application to <filename>all-packages.nix</filename> using <literal>libsForQt5.callPackage</literal> instead of the usual <literal>callPackage</literal>. The former ensures that all dependencies are built with the same version of Qt.
135− <example xml:id='qt-application-all-packages-nix'>
136− <title>Adding a Qt application to <filename>all-packages.nix</filename></title>
137−<programlisting>
138−{
139− # ...
140−
141− myapp = libsForQt5.callPackage ../path/to/myapp/ {};
142−
143− # ...
144−}
145−</programlisting>
146− </example>
147− </para>
148− </formalpara>
149−</section>
doc/languages-frameworks/r.section.md+25−18
@@ -1,7 +1,6 @@
1−R
2−=
1+# R {#r}
32
4−## Installation
3+## Installation {#installation}
54
65Define an environment for R that contains all the libraries that you'd like to
76use by adding the following snippet to your $HOME/.config/nixpkgs/config.nix file:
@@ -32,15 +31,14 @@ output is the name that has to be passed to rWrapper in the code snipped above.
3231However, if you'd like to add a file to your project source to make the
3332environment available for other contributors, you can create a `default.nix`
3433file like so:
34+
3535```nix
36−let
37− pkgs = import <nixpkgs> {};
38− stdenv = pkgs.stdenv;
39−in with pkgs; {
36+with import <nixpkgs> {};
37+{
4038 myProject = stdenv.mkDerivation {
4139 name = "myProject";
4240 version = "1";
43− src = if pkgs.lib.inNixShell then null else nix;
41+ src = if lib.inNixShell then null else nix;
4442
4543 buildInputs = with rPackages; [
4644 R
@@ -53,7 +51,7 @@ in with pkgs; {
5351and then run `nix-shell .` to be dropped into a shell with those packages
5452available.
5553
56−## RStudio
54+## RStudio {#rstudio}
5755
5856RStudio uses a standard set of packages and ignores any custom R
5957environments or installed packages you may have. To create a custom
@@ -96,7 +94,12 @@ Executing `nix-shell` will then drop you into an environment equivalent to the
9694one above. If you need additional packages just add them to the list and
9795re-enter the shell.
9896
99−## Updating the package set
97+## Updating the package set {#updating-the-package-set}
98+
99+There is a script and associated environment for regenerating the package
100+sets and synchronising the rPackages tree to the current CRAN and matching
101+BIOC release. These scripts are found in the `pkgs/development/r-modules`
102+directory and executed as follows:
100103
101104```bash
102105nix-shell generate-shell.nix
@@ -106,15 +109,19 @@ mv cran-packages.nix.new cran-packages.nix
106109
107110Rscript generate-r-packages.R bioc > bioc-packages.nix.new
108111mv bioc-packages.nix.new bioc-packages.nix
109−```
110112
111−`generate-r-packages.R <repo>` reads `<repo>-packages.nix`, therefor the renaming.
113+Rscript generate-r-packages.R bioc-annotation > bioc-annotation-packages.nix.new
114+mv bioc-annotation-packages.nix.new bioc-annotation-packages.nix
112115
113−
114−## Testing if the Nix-expression could be evaluated
115−
116−```bash
117−nix-build test-evaluation.nix --dry-run
116+Rscript generate-r-packages.R bioc-experiment > bioc-experiment-packages.nix.new
117+mv bioc-experiment-packages.nix.new bioc-experiment-packages.nix
118118```
119119
120−If this exits fine, the expression is ok. If not, you have to edit `default.nix`
120+`generate-r-packages.R <repo>` reads `<repo>-packages.nix`, therefore
121+the renaming.
122+
123+Some packages require overrides to specify external dependencies or other
124+patches and special requirements. These overrides are specified in the
125+`pkgs/development/r-modules/default.nix` file. As the `*-packages.nix`
126+contents are automatically generated it should not be edited and broken
127+builds should be addressed using overrides.
doc/languages-frameworks/ruby.section.md+79−161
@@ -1,74 +1,38 @@
1−---
2−title: Ruby
3−author: Michael Fellinger
4−date: 2019-05-23
5−---
1+# Ruby {#sec-language-ruby}
62
7−# Ruby
3+## Using Ruby {#using-ruby}
84
9−## User Guide
5+Several versions of Ruby interpreters are available on Nix, as well as over 250 gems and many applications written in Ruby. The attribute `ruby` refers to the default Ruby interpreter, which is currently MRI 2.6. It's also possible to refer to specific versions, e.g. `ruby_2_y`, `jruby`, or `mruby`.
106
11−### Using Ruby
7+In the Nixpkgs tree, Ruby packages can be found throughout, depending on what they do, and are called from the main package set. Ruby gems, however are separate sets, and there's one default set for each interpreter (currently MRI only).
128
13−#### Overview
9+There are two main approaches for using Ruby with gems. One is to use a specifically locked `Gemfile` for an application that has very strict dependencies. The other is to depend on the common gems, which we'll explain further down, and rely on them being updated regularly.
1410
15−Several versions of Ruby interpreters are available on Nix, as well as over 250 gems and many applications written in Ruby.
16−The attribute `ruby` refers to the default Ruby interpreter, which is currently
17−MRI 2.5. It's also possible to refer to specific versions, e.g. `ruby_2_6`, `jruby`, or `mruby`.
11+The interpreters have common attributes, namely `gems`, and `withPackages`. So you can refer to `ruby.gems.nokogiri`, or `ruby_2_7.gems.nokogiri` to get the Nokogiri gem already compiled and ready to use.
1812
19−In the nixpkgs tree, Ruby packages can be found throughout, depending on what
20−they do, and are called from the main package set. Ruby gems, however are
21−separate sets, and there's one default set for each interpreter (currently MRI
22−only).
13+Since not all gems have executables like `nokogiri`, it's usually more convenient to use the `withPackages` function like this: `ruby.withPackages (p: with p; [ nokogiri ])`. This will also make sure that the Ruby in your environment will be able to find the gem and it can be used in your Ruby code (for example via `ruby` or `irb` executables) via `require "nokogiri"` as usual.
2314
24−There are two main approaches for using Ruby with gems.
25−One is to use a specifically locked `Gemfile` for an application that has very strict dependencies.
26−The other is to depend on the common gems, which we'll explain further down, and
27−rely on them being updated regularly.
15+### Temporary Ruby environment with `nix-shell` {#temporary-ruby-environment-with-nix-shell}
2816
29−The interpreters have common attributes, namely `gems`, and `withPackages`. So
30−you can refer to `ruby.gems.nokogiri`, or `ruby_2_5.gems.nokogiri` to get the
31−Nokogiri gem already compiled and ready to use.
17+Rather than having a single Ruby environment shared by all Ruby development projects on a system, Nix allows you to create separate environments per project. `nix-shell` gives you the possibility to temporarily load another environment akin to a combined `chruby` or `rvm` and `bundle exec`.
3218
33−Since not all gems have executables like `nokogiri`, it's usually more
34−convenient to use the `withPackages` function like this:
35−`ruby.withPackages (p: with p; [ nokogiri ])`. This will also make sure that the
36−Ruby in your environment will be able to find the gem and it can be used in your
37−Ruby code (for example via `ruby` or `irb` executables) via `require "nokogiri"`
38−as usual.
19+There are two methods for loading a shell with Ruby packages. The first and recommended method is to create an environment with `ruby.withPackages` and load that.
3920
40−#### Temporary Ruby environment with `nix-shell`
41−
42−Rather than having a single Ruby environment shared by all Ruby
43−development projects on a system, Nix allows you to create separate
44−environments per project. `nix-shell` gives you the possibility to
45−temporarily load another environment akin to a combined `chruby` or
46−`rvm` and `bundle exec`.
47−
48−There are two methods for loading a shell with Ruby packages. The first and
49−recommended method is to create an environment with `ruby.withPackages` and load
50−that.
51−
52−```shell
53−nix-shell -p "ruby.withPackages (ps: with ps; [ nokogiri pry ])"
21+```ShellSession
22+$ nix-shell -p "ruby.withPackages (ps: with ps; [ nokogiri pry ])"
5423```
5524
56−The other method, which is not recommended, is to create an environment and list
57−all the packages directly.
25+The other method, which is not recommended, is to create an environment and list all the packages directly.
5826
59−```shell
60−nix-shell -p ruby.gems.nokogiri ruby.gems.pry
27+```ShellSession
28+$ nix-shell -p ruby.gems.nokogiri ruby.gems.pry
6129```
6230
63−Again, it's possible to launch the interpreter from the shell. The Ruby
64−interpreter has the attribute `gems` which contains all Ruby gems for that
65−specific interpreter.
31+Again, it's possible to launch the interpreter from the shell. The Ruby interpreter has the attribute `gems` which contains all Ruby gems for that specific interpreter.
6632
67−##### Load environment from `.nix` expression
33+#### Load Ruby environment from `.nix` expression {#load-ruby-environment-from-.nix-expression}
6834
69−As explained in the Nix manual, `nix-shell` can also load an expression from a
70−`.nix` file. Say we want to have Ruby 2.5, `nokogori`, and `pry`. Consider a
71−`shell.nix` file with:
35+As explained in the Nix manual, `nix-shell` can also load an expression from a `.nix` file. Say we want to have Ruby 2.6, `nokogori`, and `pry`. Consider a `shell.nix` file with:
7236
7337```nix
7438with import <nixpkgs> {};
@@ -77,43 +41,33 @@ ruby.withPackages (ps: with ps; [ nokogiri pry ])
7741
7842What's happening here?
7943
80−1. We begin with importing the Nix Packages collections. `import <nixpkgs>`
81− imports the `<nixpkgs>` function, `{}` calls it and the `with` statement
82− brings all attributes of `nixpkgs` in the local scope. These attributes form
83− the main package set.
44+1. We begin with importing the Nix Packages collections. `import <nixpkgs>` imports the `<nixpkgs>` function, `{}` calls it and the `with` statement brings all attributes of `nixpkgs` in the local scope. These attributes form the main package set.
84452. Then we create a Ruby environment with the `withPackages` function.
85−3. The `withPackages` function expects us to provide a function as an argument
86− that takes the set of all ruby gems and returns a list of packages to include
87− in the environment. Here, we select the packages `nokogiri` and `pry` from
88− the package set.
46+3. The `withPackages` function expects us to provide a function as an argument that takes the set of all ruby gems and returns a list of packages to include in the environment. Here, we select the packages `nokogiri` and `pry` from the package set.
8947
90−##### Execute command with `--run`
48+#### Execute command with `--run` {#execute-command-with---run}
9149
92−A convenient flag for `nix-shell` is `--run`. It executes a command in the
93−`nix-shell`. We can e.g. directly open a `pry` REPL:
50+A convenient flag for `nix-shell` is `--run`. It executes a command in the `nix-shell`. We can e.g. directly open a `pry` REPL:
9451
95−```shell
96−nix-shell -p "ruby.withPackages (ps: with ps; [ nokogiri pry ])" --run "pry"
52+```ShellSession
53+$ nix-shell -p "ruby.withPackages (ps: with ps; [ nokogiri pry ])" --run "pry"
9754```
9855
9956Or immediately require `nokogiri` in pry:
10057
101−```shell
102−nix-shell -p "ruby.withPackages (ps: with ps; [ nokogiri pry ])" --run "pry -rnokogiri"
58+```ShellSession
59+$ nix-shell -p "ruby.withPackages (ps: with ps; [ nokogiri pry ])" --run "pry -rnokogiri"
10360```
10461
10562Or run a script using this environment:
10663
107−```shell
108−nix-shell -p "ruby.withPackages (ps: with ps; [ nokogiri pry ])" --run "ruby example.rb"
64+```ShellSession
65+$ nix-shell -p "ruby.withPackages (ps: with ps; [ nokogiri pry ])" --run "ruby example.rb"
10966```
11067
111−##### Using `nix-shell` as shebang
68+#### Using `nix-shell` as shebang {#using-nix-shell-as-shebang}
11269
113−In fact, for the last case, there is a more convenient method. You can add a
114−[shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)) to your script
115−specifying which dependencies `nix-shell` needs. With the following shebang, you
116−can just execute `./example.rb`, and it will run with all dependencies.
70+In fact, for the last case, there is a more convenient method. You can add a [shebang](<https://en.wikipedia.org/wiki/Shebang_(Unix)>) to your script specifying which dependencies `nix-shell` needs. With the following shebang, you can just execute `./example.rb`, and it will run with all dependencies.
11771
11872```ruby
11973#! /usr/bin/env nix-shell
@@ -126,35 +80,24 @@ body = RestClient.get('http://example.com').body
12680puts Nokogiri::HTML(body).at('h1').text
12781```
12882
129−### Developing with Ruby
83+## Developing with Ruby {#developing-with-ruby}
13084
131−#### Using an existing Gemfile
85+### Using an existing Gemfile {#using-an-existing-gemfile}
13286
133−In most cases, you'll already have a `Gemfile.lock` listing all your dependencies.
134−This can be used to generate a `gemset.nix` which is used to fetch the gems and
135−combine them into a single environment.
136−The reason why you need to have a separate file for this, is that Nix requires
137−you to have a checksum for each input to your build.
138−Since the `Gemfile.lock` that `bundler` generates doesn't provide us with
139−checksums, we have to first download each gem, calculate its SHA256, and store
140−it in this separate file.
87+In most cases, you'll already have a `Gemfile.lock` listing all your dependencies. This can be used to generate a `gemset.nix` which is used to fetch the gems and combine them into a single environment. The reason why you need to have a separate file for this, is that Nix requires you to have a checksum for each input to your build. Since the `Gemfile.lock` that `bundler` generates doesn't provide us with checksums, we have to first download each gem, calculate its SHA256, and store it in this separate file.
14188
14289So the steps from having just a `Gemfile` to a `gemset.nix` are:
14390
144−```shell
145−bundle lock
146−bundix
91+```ShellSession
92+$ bundle lock
93+$ bundix
14794```
14895
149−If you already have a `Gemfile.lock`, you can simply run `bundix` and it will
150−work the same.
96+If you already have a `Gemfile.lock`, you can simply run `bundix` and it will work the same.
15197
152−To update the gems in your `Gemfile.lock`, you may use the `bundix -l` flag,
153−which will create a new `Gemfile.lock` in case the `Gemfile` has a more recent
154−time of modification.
98+To update the gems in your `Gemfile.lock`, you may use the `bundix -l` flag, which will create a new `Gemfile.lock` in case the `Gemfile` has a more recent time of modification.
15599
156−Once the `gemset.nix` is generated, it can be used in a
157−`bundlerEnv` derivation. Here is an example you could use for your `shell.nix`:
100+Once the `gemset.nix` is generated, it can be used in a `bundlerEnv` derivation. Here is an example you could use for your `shell.nix`:
158101
159102```nix
160103# ...
@@ -163,44 +106,29 @@ let
163106 name = "gems-for-some-project";
164107 gemdir = ./.;
165108 };
166−in mkShell { buildInputs = [ gems gems.wrappedRuby ]; }
109+in mkShell { packages = [ gems gems.wrappedRuby ]; }
167110```
168111
169−With this file in your directory, you can run `nix-shell` to build and use the gems.
170−The important parts here are `bundlerEnv` and `wrappedRuby`.
112+With this file in your directory, you can run `nix-shell` to build and use the gems. The important parts here are `bundlerEnv` and `wrappedRuby`.
171113
172−The `bundlerEnv` is a wrapper over all the gems in your gemset. This means that
173−all the `/lib` and `/bin` directories will be available, and the executables of
174−all gems (even of indirect dependencies) will end up in your `$PATH`.
175−The `wrappedRuby` provides you with all executables that come with Ruby itself,
176−but wrapped so they can easily find the gems in your gemset.
114+The `bundlerEnv` is a wrapper over all the gems in your gemset. This means that all the `/lib` and `/bin` directories will be available, and the executables of all gems (even of indirect dependencies) will end up in your `$PATH`. The `wrappedRuby` provides you with all executables that come with Ruby itself, but wrapped so they can easily find the gems in your gemset.
177115
178−One common issue that you might have is that you have Ruby 2.6, but also
179−`bundler` in your gemset. That leads to a conflict for `/bin/bundle` and
180−`/bin/bundler`. You can resolve this by wrapping either your Ruby or your gems
181−in a `lowPrio` call. So in order to give the `bundler` from your gemset
182−priority, it would be used like this:
116+One common issue that you might have is that you have Ruby 2.6, but also `bundler` in your gemset. That leads to a conflict for `/bin/bundle` and `/bin/bundler`. You can resolve this by wrapping either your Ruby or your gems in a `lowPrio` call. So in order to give the `bundler` from your gemset priority, it would be used like this:
183117
184118```nix
185119# ...
186120mkShell { buildInputs = [ gems (lowPrio gems.wrappedRuby) ]; }
187121```
188122
123+### Gem-specific configurations and workarounds {#gem-specific-configurations-and-workarounds}
189124
190−#### Gem-specific configurations and workarounds
191−
192−In some cases, especially if the gem has native extensions, you might need to
193−modify the way the gem is built.
125+In some cases, especially if the gem has native extensions, you might need to modify the way the gem is built.
194126
195−This is done via a common configuration file that includes all of the
196−workarounds for each gem.
127+This is done via a common configuration file that includes all of the workarounds for each gem.
197128
198−This file lives at `/pkgs/development/ruby-modules/gem-config/default.nix`,
199−since it already contains a lot of entries, it should be pretty easy to add the
200−modifications you need for your needs.
129+This file lives at `/pkgs/development/ruby-modules/gem-config/default.nix`, since it already contains a lot of entries, it should be pretty easy to add the modifications you need for your needs.
201130
202−In the meanwhile, or if the modification is for a private gem, you can also add
203−the configuration to only your own environment.
131+In the meanwhile, or if the modification is for a private gem, you can also add the configuration to only your own environment.
204132
205133Two places that allow this modification are the `ruby` derivation, or `bundlerEnv`.
206134
@@ -261,10 +189,9 @@ let
261189in pkgs.ruby.withPackages (ps: with ps; [ pg ])
262190```
263191
264−Then we can get whichever postgresql version we desire and the `pg` gem will
265−always reference it correctly:
192+Then we can get whichever postgresql version we desire and the `pg` gem will always reference it correctly:
266193
267−```shell
194+```ShellSession
268195$ nix-shell --argstr pg_version 9_4 --run 'ruby -rpg -e "puts PG.library_version"'
26919690421
270197
@@ -272,24 +199,28 @@ $ nix-shell --run 'ruby -rpg -e "puts PG.library_version"'
272199100007
273200```
274201
275−Of course for this use-case one could also use overlays since the configuration
276−for `pg` depends on the `postgresql` alias, but for demonstration purposes this
277−has to suffice.
202+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.
203+
204+### Platform-specific gems
205+
206+Right now, bundix has some issues with pre-built, platform-specific gems: [bundix PR #68](https://github.com/nix-community/bundix/pull/68).
207+Until this is solved, you can tell bundler to not use platform-specific gems and instead build them from source each time:
208+- globally (will be set in `~/.config/.bundle/config`):
209+```shell
210+$ bundle config set force_ruby_platform true
211+```
212+- locally (will be set in `<project-root>/.bundle/config`):
213+```shell
214+$ bundle config set --local force_ruby_platform true
215+```
278216
279−#### Adding a gem to the default gemset
217+### Adding a gem to the default gemset {#adding-a-gem-to-the-default-gemset}
280218
281−Now that you know how to get a working Ruby environment with Nix, it's time to
282−go forward and start actually developing with Ruby.
283−We will first have a look at how Ruby gems are packaged on Nix. Then, we will
284−look at how you can use development mode with your code.
219+Now that you know how to get a working Ruby environment with Nix, it's time to go forward and start actually developing with Ruby. We will first have a look at how Ruby gems are packaged on Nix. Then, we will look at how you can use development mode with your code.
285220
286−All gems in the standard set are automatically generated from a single
287−`Gemfile`. The dependency resolution is done with `bundler` and makes it more
288−likely that all gems are compatible to each other.
221+All gems in the standard set are automatically generated from a single `Gemfile`. The dependency resolution is done with `bundler` and makes it more likely that all gems are compatible to each other.
289222
290−In order to add a new gem to nixpkgs, you can put it into the
291−`/pkgs/development/ruby-modules/with-packages/Gemfile` and run
292−`./maintainers/scripts/update-ruby-packages`.
223+In order to add a new gem to nixpkgs, you can put it into the `/pkgs/development/ruby-modules/with-packages/Gemfile` and run `./maintainers/scripts/update-ruby-packages`.
293224
294225To test that it works, you can then try using the gem with:
295226
@@ -297,16 +228,11 @@ To test that it works, you can then try using the gem with:
297228NIX_PATH=nixpkgs=$PWD nix-shell -p "ruby.withPackages (ps: with ps; [ name-of-your-gem ])"
298229```
299230
300−#### Packaging applications
231+### Packaging applications {#packaging-applications}
301232
302−A common task is to add a ruby executable to nixpkgs, popular examples would be
303−`chef`, `jekyll`, or `sass`. A good way to do that is to use the `bundlerApp`
304−function, that allows you to make a package that only exposes the listed
305−executables, otherwise the package may cause conflicts through common paths like
306−`bin/rake` or `bin/bundler` that aren't meant to be used.
233+A common task is to add a ruby executable to nixpkgs, popular examples would be `chef`, `jekyll`, or `sass`. A good way to do that is to use the `bundlerApp` function, that allows you to make a package that only exposes the listed executables, otherwise the package may cause conflicts through common paths like `bin/rake` or `bin/bundler` that aren't meant to be used.
307234
308−The absolute easiest way to do that is to write a
309−`Gemfile` along these lines:
235+The absolute easiest way to do that is to write a `Gemfile` along these lines:
310236
311237```ruby
312238source 'https://rubygems.org' do
@@ -314,15 +240,12 @@ source 'https://rubygems.org' do
314240end
315241```
316242
317−If you want to package a specific version, you can use the standard Gemfile
318−syntax for that, e.g. `gem 'mdl', '0.5.0'`, but if you want the latest stable
319−version anyway, it's easier to update by simply running the `bundle lock` and
320−`bundix` steps again.
243+If you want to package a specific version, you can use the standard Gemfile syntax for that, e.g. `gem 'mdl', '0.5.0'`, but if you want the latest stable version anyway, it's easier to update by simply running the `bundle lock` and `bundix` steps again.
321244
322−Now you can also also make a `default.nix` that looks like this:
245+Now you can also make a `default.nix` that looks like this:
323246
324247```nix
325−{ lib, bundlerApp }:
248+{ bundlerApp }:
326249
327250bundlerApp {
328251 pname = "mdl";
@@ -331,20 +254,15 @@ bundlerApp {
331254}
332255```
333256
334−All that's left to do is to generate the corresponding `Gemfile.lock` and
335−`gemset.nix` as described above in the `Using an existing Gemfile` section.
257+All that's left to do is to generate the corresponding `Gemfile.lock` and `gemset.nix` as described above in the `Using an existing Gemfile` section.
336258
337−##### Packaging executables that require wrapping
259+#### Packaging executables that require wrapping {#packaging-executables-that-require-wrapping}
338260
339−Sometimes your app will depend on other executables at runtime, and tries to
340−find it through the `PATH` environment variable.
261+Sometimes your app will depend on other executables at runtime, and tries to find it through the `PATH` environment variable.
341262
342−In this case, you can provide a `postBuild` hook to `bundlerApp` that wraps the
343−gem in another script that prefixes the `PATH`.
263+In this case, you can provide a `postBuild` hook to `bundlerApp` that wraps the gem in another script that prefixes the `PATH`.
344264
345−Of course you could also make a custom `gemConfig` if you know exactly how to
346−patch it, but it's usually much easier to maintain with a simple wrapper so the
347−patch doesn't have to be adjusted for each version.
265+Of course you could also make a custom `gemConfig` if you know exactly how to patch it, but it's usually much easier to maintain with a simple wrapper so the patch doesn't have to be adjusted for each version.
348266
349267Here's another example:
350268
doc/languages-frameworks/ruby.xmldeleted−107
@@ -1,107 +0,0 @@
1−<section xmlns="http://docbook.org/ns/docbook"
2− xmlns:xlink="http://www.w3.org/1999/xlink"
3− xml:id="sec-language-ruby">
4− <title>Ruby</title>
5−
6− <para>
7− There currently is support to bundle applications that are packaged as Ruby gems. The utility "bundix" allows you to write a <filename>Gemfile</filename>, let bundler create a <filename>Gemfile.lock</filename>, and then convert this into a nix expression that contains all Gem dependencies automatically.
8− </para>
9−
10− <para>
11− For example, to package sensu, we did:
12− </para>
13−
14−<screen>
15−<prompt>$ </prompt>cd pkgs/servers/monitoring
16−<prompt>$ </prompt>mkdir sensu
17−<prompt>$ </prompt>cd sensu
18−<prompt>$ </prompt>cat > Gemfile
19−source 'https://rubygems.org'
20−gem 'sensu'
21−<prompt>$ </prompt>$(nix-build '&lt;nixpkgs>' -A bundix --no-out-link)/bin/bundix --magic
22−<prompt>$ </prompt>cat > default.nix
23−{ lib, bundlerEnv, ruby }:
24−
25−bundlerEnv rec {
26− name = "sensu-${version}";
27−
28− version = (import gemset).sensu.version;
29− inherit ruby;
30− # expects Gemfile, Gemfile.lock and gemset.nix in the same directory
31− gemdir = ./.;
32−
33− meta = with lib; {
34− description = "A monitoring framework that aims to be simple, malleable, and scalable";
35− homepage = "http://sensuapp.org/";
36− license = with licenses; mit;
37− maintainers = with maintainers; [ theuni ];
38− platforms = platforms.unix;
39− };
40−}
41−</screen>
42−
43− <para>
44− Please check in the <filename>Gemfile</filename>, <filename>Gemfile.lock</filename> and the <filename>gemset.nix</filename> so future updates can be run easily.
45− </para>
46−
47− <para>
48− Updating Ruby packages can then be done like this:
49− </para>
50−
51−<screen>
52−<prompt>$ </prompt>cd pkgs/servers/monitoring/sensu
53−<prompt>$ </prompt>nix-shell -p bundler --run 'bundle lock --update'
54−<prompt>$ </prompt>nix-shell -p bundix --run 'bundix'
55−</screen>
56−
57− <para>
58− For tools written in Ruby - i.e. where the desire is to install a package and then execute e.g. <command>rake</command> at the command line, there is an alternative builder called <literal>bundlerApp</literal>. Set up the <filename>gemset.nix</filename> the same way, and then, for example:
59− </para>
60−
61−<programlisting>
62−<![CDATA[{ lib, bundlerApp }:
63−
64−bundlerApp {
65− pname = "corundum";
66− gemdir = ./.;
67− exes = [ "corundum-skel" ];
68−
69− meta = with lib; {
70− description = "Tool and libraries for maintaining Ruby gems.";
71− homepage = "https://github.com/nyarly/corundum";
72− license = licenses.mit;
73− maintainers = [ maintainers.nyarly ];
74− platforms = platforms.unix;
75− };
76−}]]>
77−</programlisting>
78−
79− <para>
80− The chief advantage of <literal>bundlerApp</literal> over <literal>bundlerEnv</literal> is the executables introduced in the environment are precisely those selected in the <literal>exes</literal> list, as opposed to <literal>bundlerEnv</literal> which adds all the executables made available by gems in the gemset, which can mean e.g. <command>rspec</command> or <command>rake</command> in unpredictable versions available from various packages.
81− </para>
82−
83− <para>
84− Resulting derivations for both builders also have two helpful attributes, <literal>env</literal> and <literal>wrappedRuby</literal>. The first one allows one to quickly drop into <command>nix-shell</command> with the specified environment present. E.g. <command>nix-shell -A sensu.env</command> would give you an environment with Ruby preset so it has all the libraries necessary for <literal>sensu</literal> in its paths. The second one can be used to make derivations from custom Ruby scripts which have <filename>Gemfile</filename>s with their dependencies specified. It is a derivation with <command>ruby</command> wrapped so it can find all the needed dependencies. For example, to make a derivation <literal>my-script</literal> for a <filename>my-script.rb</filename> (which should be placed in <filename>bin</filename>) you should run <command>bundix</command> as specified above and then use <literal>bundlerEnv</literal> like this:
85− </para>
86−
87−<programlisting>
88−<![CDATA[let env = bundlerEnv {
89− name = "my-script-env";
90−
91− inherit ruby;
92− gemfile = ./Gemfile;
93− lockfile = ./Gemfile.lock;
94− gemset = ./gemset.nix;
95−};
96−
97−in stdenv.mkDerivation {
98− name = "my-script";
99− buildInputs = [ env.wrappedRuby ];
100− script = ./my-script.rb;
101− buildCommand = ''
102− install -D -m755 $script $out/bin/my-script
103− patchShebangs $out/bin/my-script
104− '';
105−}]]>
106−</programlisting>
107−</section>
doc/languages-frameworks/rust.section.md+592−123
@@ -1,44 +1,41 @@
1−---
2−title: Rust
3−author: Matthias Beyer
4−date: 2017-03-05
5−---
6−
7−# Rust
1+# Rust {#rust}
82
93To install the rust compiler and cargo put
104
11−```
12−rustc
13−cargo
5+```nix
6+environment.systemPackages = [
7+ rustc
8+ cargo
9+];
1410```
1511
16−into the `environment.systemPackages` or bring them into
17−scope with `nix-shell -p rustc cargo`.
12+into your `configuration.nix` or bring them into scope with `nix-shell -p rustc cargo`.
1813
1914For other versions such as daily builds (beta and nightly),
2015use either `rustup` from nixpkgs (which will manage the rust installation in your home directory),
21−or use Mozilla's [Rust nightlies overlay](#using-the-rust-nightlies-overlay).
16+or use a community maintained [Rust overlay](#using-community-rust-overlays).
2217
23−## Compiling Rust applications with Cargo
18+## Compiling Rust applications with Cargo {#compiling-rust-applications-with-cargo}
2419
2520Rust applications are packaged by using the `buildRustPackage` helper from `rustPlatform`:
2621
27−```
22+```nix
23+{ lib, fetchFromGitHub, rustPlatform }:
24+
2825rustPlatform.buildRustPackage rec {
2926 pname = "ripgrep";
30− version = "11.0.2";
27+ version = "12.1.1";
3128
3229 src = fetchFromGitHub {
3330 owner = "BurntSushi";
3431 repo = pname;
3532 rev = version;
36− sha256 = "1iga3320mgi7m853la55xip514a3chqsdi1a1rwv25lr9b1p7vd3";
33+ sha256 = "1hqps7l5qrjh9f914r5i6kmcz6f1yb951nv4lby0cjnp5l253kps";
3734 };
3835
39− cargoSha256 = "17ldqr3asrdcsh4l29m3b5r37r5d0b3npq1lrgjmxb6vlx6a36qh";
36+ cargoSha256 = "03wf9r2csi6jpa7v5sw5lpxkrk4wfzwmzx7k3991q3bdjzcwnnwp";
4037
41− meta = with stdenv.lib; {
38+ meta = with lib; {
4239 description = "A fast line-oriented regex search tool, similar to ag and ack";
4340 homepage = "https://github.com/BurntSushi/ripgrep";
4441 license = licenses.unlicense;
@@ -47,34 +44,230 @@ rustPlatform.buildRustPackage rec {
4744}
4845```
4946
50−`buildRustPackage` requires a `cargoSha256` attribute which is computed over
51−all crate sources of this package. Currently it is obtained by inserting a
52−fake checksum into the expression and building the package once. The correct
53−checksum can then be taken from the failed build.
47+`buildRustPackage` requires either the `cargoSha256` or the
48+`cargoHash` attribute which is computed over all crate sources of this
49+package. `cargoHash256` is used for traditional Nix SHA-256 hashes,
50+such as the one in the example above. `cargoHash` should instead be
51+used for [SRI](https://www.w3.org/TR/SRI/) hashes. For example:
52+
53+```nix
54+ cargoHash = "sha256-l1vL2ZdtDRxSGvP0X/l3nMw8+6WF67KPutJEzUROjg8=";
55+```
56+
57+Both types of hashes are permitted when contributing to nixpkgs. The
58+Cargo hash is obtained by inserting a fake checksum into the
59+expression and building the package once. The correct checksum can
60+then be taken from the failed build. A fake hash can be used for
61+`cargoSha256` as follows:
62+
63+```nix
64+ cargoSha256 = lib.fakeSha256;
65+```
66+
67+For `cargoHash` you can use:
68+
69+```nix
70+ cargoHash = lib.fakeHash;
71+```
5472
5573Per the instructions in the [Cargo Book](https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html)
5674best practices guide, Rust applications should always commit the `Cargo.lock`
5775file in git to ensure a reproducible build. However, a few packages do not, and
58−Nix depends on this file, so if it missing you can use `cargoPatches` to apply
59−it in the `patchPhase`. Consider sending a PR upstream with a note to the
76+Nix depends on this file, so if it is missing you can use `cargoPatches` to
77+apply it in the `patchPhase`. Consider sending a PR upstream with a note to the
6078maintainer describing why it's important to include in the application.
6179
6280The fetcher will verify that the `Cargo.lock` file is in sync with the `src`
6381attribute, and fail the build if not. It will also will compress the vendor
6482directory into a tar.gz archive.
6583
66−### Building a crate for a different target
84+The tarball with vendored dependencies contains a directory with the
85+package's `name`, which is normally composed of `pname` and
86+`version`. This means that the vendored dependencies hash
87+(`cargoSha256`/`cargoHash`) is dependent on the package name and
88+version. The `cargoDepsName` attribute can be used to use another name
89+for the directory of vendored dependencies. For example, the hash can
90+be made invariant to the version by setting `cargoDepsName` to
91+`pname`:
92+
93+```nix
94+rustPlatform.buildRustPackage rec {
95+ pname = "broot";
96+ version = "1.2.0";
97+
98+ src = fetchCrate {
99+ inherit pname version;
100+ sha256 = "1mqaynrqaas82f5957lx31x80v74zwmwmjxxlbywajb61vh00d38";
101+ };
102+
103+ cargoHash = "sha256-JmBZcDVYJaK1cK05cxx5BrnGWp4t8ca6FLUbvIot67s=";
104+ cargoDepsName = pname;
67105
68−To build your crate with a different cargo `--target` simply specify the `target` attribute:
106+ # ...
107+}
108+```
109+
110+### Importing a `Cargo.lock` file {#importing-a-cargo.lock-file}
111+
112+Using `cargoSha256` or `cargoHash` is tedious when using
113+`buildRustPackage` within a project, since it requires that the hash
114+is updated after every change to `Cargo.lock`. Therefore,
115+`buildRustPackage` also supports vendoring dependencies directly from
116+a `Cargo.lock` file using the `cargoLock` argument. For example:
69117
70118```nix
71−pkgs.rustPlatform.buildRustPackage {
72− (...)
73− target = "x86_64-fortanix-unknown-sgx";
119+rustPlatform.buildRustPackage {
120+ pname = "myproject";
121+ version = "1.0.0";
122+
123+ cargoLock = {
124+ lockFile = ./Cargo.lock;
125+ };
126+
127+ # ...
128+}
129+```
130+
131+This will retrieve the dependencies using fixed-output derivations from
132+the specified lockfile.
133+
134+One caveat is that `Cargo.lock` cannot be patched in the `patchPhase`
135+because it runs after the dependencies have already been fetched. If
136+you need to patch or generate the lockfile you can alternatively set
137+`cargoLock.lockFileContents` to a string of its contents:
138+
139+```nix
140+rustPlatform.buildRustPackage {
141+ pname = "myproject";
142+ version = "1.0.0";
143+
144+ cargoLock = let
145+ fixupLockFile = path: f (builtins.readFile path);
146+ in {
147+ lockFileContents = fixupLockFile ./Cargo.lock;
148+ };
149+
150+ # ...
151+}
152+```
153+
154+Note that setting `cargoLock.lockFile` or `cargoLock.lockFileContents`
155+doesn't add a `Cargo.lock` to your `src`, and a `Cargo.lock` is still
156+required to build a rust package. A simple fix is to use:
157+
158+```nix
159+postPatch = ''
160+ cp ${./Cargo.lock} Cargo.lock
161+'';
162+```
163+
164+The output hash of each dependency that uses a git source must be
165+specified in the `outputHashes` attribute. For example:
166+
167+```nix
168+rustPlatform.buildRustPackage rec {
169+ pname = "myproject";
170+ version = "1.0.0";
171+
172+ cargoLock = {
173+ lockFile = ./Cargo.lock;
174+ outputHashes = {
175+ "finalfusion-0.14.0" = "17f4bsdzpcshwh74w5z119xjy2if6l2wgyjy56v621skr2r8y904";
176+ };
177+ };
178+
179+ # ...
180+}
181+```
182+
183+If you do not specify an output hash for a git dependency, building
184+the package will fail and inform you of which crate needs to be
185+added. To find the correct hash, you can first use `lib.fakeSha256` or
186+`lib.fakeHash` as a stub hash. Building the package (and thus the
187+vendored dependencies) will then inform you of the correct hash.
188+
189+### Cargo features {#cargo-features}
190+
191+You can disable default features using `buildNoDefaultFeatures`, and
192+extra features can be added with `buildFeatures`.
193+
194+If you want to use different features for check phase, you can use
195+`checkNoDefaultFeatures` and `checkFeatures`. They are only passed to
196+`cargo test` and not `cargo build`. If left unset, they default to
197+`buildNoDefaultFeatures` and `buildFeatures`.
198+
199+For example:
200+
201+```nix
202+rustPlatform.buildRustPackage rec {
203+ pname = "myproject";
204+ version = "1.0.0";
205+
206+ buildNoDefaultFeatures = true;
207+ buildFeatures = [ "color" "net" ];
208+
209+ # disable network features in tests
210+ checkFeatures = [ "color" ];
211+
212+ # ...
74213}
75214```
76215
77−### Running package tests
216+### Cross compilation {#cross-compilation}
217+
218+By default, Rust packages are compiled for the host platform, just like any
219+other package is. The `--target` passed to rust tools is computed from this.
220+By default, it takes the `stdenv.hostPlatform.config` and replaces components
221+where they are known to differ. But there are ways to customize the argument:
222+
223+ - To choose a different target by name, define
224+ `stdenv.hostPlatform.rustc.config` as that name (a string), and that
225+ name will be used instead.
226+
227+ For example:
228+
229+ ```nix
230+ import <nixpkgs> {
231+ crossSystem = (import <nixpkgs/lib>).systems.examples.armhf-embedded // {
232+ rustc.config = "thumbv7em-none-eabi";
233+ };
234+ }
235+ ```
236+
237+ will result in:
238+
239+ ```shell
240+ --target thumbv7em-none-eabi
241+ ```
242+
243+ - To pass a completely custom target, define
244+ `stdenv.hostPlatform.rustc.config` with its name, and
245+ `stdenv.hostPlatform.rustc.platform` with the value. The value will be
246+ serialized to JSON in a file called
247+ `${stdenv.hostPlatform.rustc.config}.json`, and the path of that file
248+ will be used instead.
249+
250+ For example:
251+
252+ ```nix
253+ import <nixpkgs> {
254+ crossSystem = (import <nixpkgs/lib>).systems.examples.armhf-embedded // {
255+ rustc.config = "thumb-crazy";
256+ rustc.platform = { foo = ""; bar = ""; };
257+ };
258+ }
259+ ```
260+
261+ will result in:
262+
263+ ```shell
264+ --target /nix/store/asdfasdfsadf-thumb-crazy.json # contains {"foo":"","bar":""}
265+ ```
266+
267+Note that currently custom targets aren't compiled with `std`, so `cargo test`
268+will fail. This can be ignored by adding `doCheck = false;` to your derivation.
269+
270+### Running package tests {#running-package-tests}
78271
79272When using `buildRustPackage`, the `checkPhase` is enabled by default and runs
80273`cargo test` on the package to build. To make sure that we don't compile the
@@ -95,7 +288,14 @@ rustPlatform.buildRustPackage {
95288Please note that the code will be compiled twice here: once in `release` mode
96289for the `buildPhase`, and again in `debug` mode for the `checkPhase`.
97290
98−#### Tests relying on the structure of the `target/` directory
291+Test flags, e.g., `--package foo`, can be passed to `cargo test` via the
292+`cargoTestFlags` attribute.
293+
294+Another attribute, called `checkFlags`, is used to pass arguments to the test
295+binary itself, as stated
296+[here](https://doc.rust-lang.org/cargo/commands/cargo-test.html).
297+
298+#### Tests relying on the structure of the `target/` directory {#tests-relying-on-the-structure-of-the-target-directory}
99299
100300Some tests may rely on the structure of the `target/` directory. Those tests
101301are likely to fail because we use `cargo --target` during the build. This means that
@@ -105,7 +305,7 @@ rather than in `target/release/`.
105305
106306This can only be worked around by patching the affected tests accordingly.
107307
108−#### Disabling package-tests
308+#### Disabling package-tests {#disabling-package-tests}
109309
110310In some instances, it may be necessary to disable testing altogether (with `doCheck = false;`):
111311
@@ -119,7 +319,7 @@ The above are just guidelines, and exceptions may be granted on a case-by-case b
119319However, please check if it's possible to disable a problematic subset of the
120320test suite and leave a comment explaining your reasoning.
121321
122−#### Setting `test-threads`
322+#### Setting `test-threads` {#setting-test-threads}
123323
124324`buildRustPackage` will use parallel test threads by default,
125325sometimes it may be necessary to disable this so the tests run consecutively.
@@ -127,11 +327,11 @@ sometimes it may be necessary to disable this so the tests run consecutively.
127327```nix
128328rustPlatform.buildRustPackage {
129329 /* ... */
130− cargoParallelTestThreads = false;
330+ dontUseCargoParallelTests = true;
131331}
132332```
133333
134−### Building a package in `debug` mode
334+### Building a package in `debug` mode {#building-a-package-in-debug-mode}
135335
136336By default, `buildRustPackage` will use `release` mode for builds. If a package
137337should be built in `debug` mode, it can be configured like so:
@@ -145,22 +345,20 @@ rustPlatform.buildRustPackage {
145345
146346In this scenario, the `checkPhase` will be ran in `debug` mode as well.
147347
148−### Custom `build`/`install`-procedures
348+### Custom `build`/`install`-procedures {#custom-buildinstall-procedures}
149349
150350Some packages may use custom scripts for building/installing, e.g. with a `Makefile`.
151351In these cases, it's recommended to override the `buildPhase`/`installPhase`/`checkPhase`.
152352
153353Otherwise, some steps may fail because of the modified directory structure of `target/`.
154354
155−### Building a crate with an absent or out-of-date Cargo.lock file
355+### Building a crate with an absent or out-of-date Cargo.lock file {#building-a-crate-with-an-absent-or-out-of-date-cargo.lock-file}
156356
157357`buildRustPackage` needs a `Cargo.lock` file to get all dependencies in the
158358source code in a reproducible way. If it is missing or out-of-date one can use
159359the `cargoPatches` attribute to update or add it.
160360
161−```
162−{ lib, rustPlatform, fetchFromGitHub }:
163−
361+```nix
164362rustPlatform.buildRustPackage rec {
165363 (...)
166364 cargoPatches = [
@@ -170,9 +368,237 @@ rustPlatform.buildRustPackage rec {
170368}
171369```
172370
173−## Compiling Rust crates using Nix instead of Cargo
371+## Compiling non-Rust packages that include Rust code {#compiling-non-rust-packages-that-include-rust-code}
372+
373+Several non-Rust packages incorporate Rust code for performance- or
374+security-sensitive parts. `rustPlatform` exposes several functions and
375+hooks that can be used to integrate Cargo in non-Rust packages.
376+
377+### Vendoring of dependencies {#vendoring-of-dependencies}
378+
379+Since network access is not allowed in sandboxed builds, Rust crate
380+dependencies need to be retrieved using a fetcher. `rustPlatform`
381+provides the `fetchCargoTarball` fetcher, which vendors all
382+dependencies of a crate. For example, given a source path `src`
383+containing `Cargo.toml` and `Cargo.lock`, `fetchCargoTarball`
384+can be used as follows:
385+
386+```nix
387+cargoDeps = rustPlatform.fetchCargoTarball {
388+ inherit src;
389+ hash = "sha256-BoHIN/519Top1NUBjpB/oEMqi86Omt3zTQcXFWqrek0=";
390+};
391+```
392+
393+The `src` attribute is required, as well as a hash specified through
394+one of the `sha256` or `hash` attributes. The following optional
395+attributes can also be used:
396+
397+* `name`: the name that is used for the dependencies tarball. If
398+ `name` is not specified, then the name `cargo-deps` will be used.
399+* `sourceRoot`: when the `Cargo.lock`/`Cargo.toml` are in a
400+ subdirectory, `sourceRoot` specifies the relative path to these
401+ files.
402+* `patches`: patches to apply before vendoring. This is useful when
403+ the `Cargo.lock`/`Cargo.toml` files need to be patched before
404+ vendoring.
405+
406+If a `Cargo.lock` file is available, you can alternatively use the
407+`importCargoLock` function. In contrast to `fetchCargoTarball`, this
408+function does not require a hash (unless git dependencies are used)
409+and fetches every dependency as a separate fixed-output derivation.
410+`importCargoLock` can be used as follows:
411+
412+```
413+cargoDeps = rustPlatform.importCargoLock {
414+ lockFile = ./Cargo.lock;
415+};
416+```
417+
418+If the `Cargo.lock` file includes git dependencies, then their output
419+hashes need to be specified since they are not available through the
420+lock file. For example:
421+
422+```
423+cargoDeps = rustPlatform.importCargoLock {
424+ lockFile = ./Cargo.lock;
425+ outputHashes = {
426+ "rand-0.8.3" = "0ya2hia3cn31qa8894s3av2s8j5bjwb6yq92k0jsnlx7jid0jwqa";
427+ };
428+};
429+```
430+
431+If you do not specify an output hash for a git dependency, building
432+`cargoDeps` will fail and inform you of which crate needs to be
433+added. To find the correct hash, you can first use `lib.fakeSha256` or
434+`lib.fakeHash` as a stub hash. Building `cargoDeps` will then inform
435+you of the correct hash.
436+
437+### Hooks {#hooks}
438+
439+`rustPlatform` provides the following hooks to automate Cargo builds:
440+
441+* `cargoSetupHook`: configure Cargo to use dependencies vendored
442+ through `fetchCargoTarball`. This hook uses the `cargoDeps`
443+ environment variable to find the vendored dependencies. If a project
444+ already vendors its dependencies, the variable `cargoVendorDir` can
445+ be used instead. When the `Cargo.toml`/`Cargo.lock` files are not in
446+ `sourceRoot`, then the optional `cargoRoot` is used to specify the
447+ Cargo root directory relative to `sourceRoot`.
448+* `cargoBuildHook`: use Cargo to build a crate. If the crate to be
449+ built is a crate in e.g. a Cargo workspace, the relative path to the
450+ crate to build can be set through the optional `buildAndTestSubdir`
451+ environment variable. Features can be specified with
452+ `cargoBuildNoDefaultFeatures` and `cargoBuildFeatures`. Additional
453+ Cargo build flags can be passed through `cargoBuildFlags`.
454+* `maturinBuildHook`: use [Maturin](https://github.com/PyO3/maturin)
455+ to build a Python wheel. Similar to `cargoBuildHook`, the optional
456+ variable `buildAndTestSubdir` can be used to build a crate in a
457+ Cargo workspace. Additional Maturin flags can be passed through
458+ `maturinBuildFlags`.
459+* `cargoCheckHook`: run tests using Cargo. The build type for checks
460+ can be set using `cargoCheckType`. Features can be specified with
461+ `cargoCheckNoDefaultFeaatures` and `cargoCheckFeatures`. Additional
462+ flags can be passed to the tests using `checkFlags` and
463+ `checkFlagsArray`. By default, tests are run in parallel. This can
464+ be disabled by setting `dontUseCargoParallelTests`.
465+* `cargoInstallHook`: install binaries and static/shared libraries
466+ that were built using `cargoBuildHook`.
467+* `bindgenHook`: for crates which use `bindgen` as a build dependency, lets
468+ `bindgen` find `libclang` and `libclang` find the libraries in `buildInputs`.
469+
470+### Examples {#examples}
471+
472+#### Python package using `setuptools-rust` {#python-package-using-setuptools-rust}
473+
474+For Python packages using `setuptools-rust`, you can use
475+`fetchCargoTarball` and `cargoSetupHook` to retrieve and set up Cargo
476+dependencies. The build itself is then performed by
477+`buildPythonPackage`.
478+
479+The following example outlines how the `tokenizers` Python package is
480+built. Since the Python package is in the `source/bindings/python`
481+directory of the `tokenizers` project's source archive, we use
482+`sourceRoot` to point the tooling to this directory:
483+
484+```nix
485+{ fetchFromGitHub
486+, buildPythonPackage
487+, rustPlatform
488+, setuptools-rust
489+}:
490+
491+buildPythonPackage rec {
492+ pname = "tokenizers";
493+ version = "0.10.0";
494+
495+ src = fetchFromGitHub {
496+ owner = "huggingface";
497+ repo = pname;
498+ rev = "python-v${version}";
499+ hash = "sha256-rQ2hRV52naEf6PvRsWVCTN7B1oXAQGmnpJw4iIdhamw=";
500+ };
501+
502+ cargoDeps = rustPlatform.fetchCargoTarball {
503+ inherit src sourceRoot;
504+ name = "${pname}-${version}";
505+ hash = "sha256-BoHIN/519Top1NUBjpB/oEMqi86Omt3zTQcXFWqrek0=";
506+ };
507+
508+ sourceRoot = "source/bindings/python";
509+
510+ nativeBuildInputs = [ setuptools-rust ] ++ (with rustPlatform; [
511+ cargoSetupHook
512+ rust.cargo
513+ rust.rustc
514+ ]);
515+
516+ # ...
517+}
518+```
519+
520+In some projects, the Rust crate is not in the main Python source
521+directory. In such cases, the `cargoRoot` attribute can be used to
522+specify the crate's directory relative to `sourceRoot`. In the
523+following example, the crate is in `src/rust`, as specified in the
524+`cargoRoot` attribute. Note that we also need to specify the correct
525+path for `fetchCargoTarball`.
526+
527+```nix
528+
529+{ buildPythonPackage
530+, fetchPypi
531+, rustPlatform
532+, setuptools-rust
533+, openssl
534+}:
535+
536+buildPythonPackage rec {
537+ pname = "cryptography";
538+ version = "3.4.2"; # Also update the hash in vectors.nix
539+
540+ src = fetchPypi {
541+ inherit pname version;
542+ sha256 = "1i1mx5y9hkyfi9jrrkcw804hmkcglxi6rmf7vin7jfnbr2bf4q64";
543+ };
544+
545+ cargoDeps = rustPlatform.fetchCargoTarball {
546+ inherit src;
547+ sourceRoot = "${pname}-${version}/${cargoRoot}";
548+ name = "${pname}-${version}";
549+ hash = "sha256-PS562W4L1NimqDV2H0jl5vYhL08H9est/pbIxSdYVfo=";
550+ };
551+
552+ cargoRoot = "src/rust";
553+
554+ # ...
555+}
556+```
557+
558+#### Python package using `maturin` {#python-package-using-maturin}
174559
175−### Simple operation
560+Python packages that use [Maturin](https://github.com/PyO3/maturin)
561+can be built with `fetchCargoTarball`, `cargoSetupHook`, and
562+`maturinBuildHook`. For example, the following (partial) derivation
563+builds the `retworkx` Python package. `fetchCargoTarball` and
564+`cargoSetupHook` are used to fetch and set up the crate dependencies.
565+`maturinBuildHook` is used to perform the build.
566+
567+```nix
568+{ lib
569+, buildPythonPackage
570+, rustPlatform
571+, fetchFromGitHub
572+}:
573+
574+buildPythonPackage rec {
575+ pname = "retworkx";
576+ version = "0.6.0";
577+
578+ src = fetchFromGitHub {
579+ owner = "Qiskit";
580+ repo = "retworkx";
581+ rev = version;
582+ sha256 = "11n30ldg3y3y6qxg3hbj837pnbwjkqw3nxq6frds647mmmprrd20";
583+ };
584+
585+ cargoDeps = rustPlatform.fetchCargoTarball {
586+ inherit src;
587+ name = "${pname}-${version}";
588+ hash = "sha256-heOBK8qi2nuc/Ib+I/vLzZ1fUUD/G/KTw9d7M4Hz5O0=";
589+ };
590+
591+ format = "pyproject";
592+
593+ nativeBuildInputs = with rustPlatform; [ cargoSetupHook maturinBuildHook ];
594+
595+ # ...
596+}
597+```
598+
599+## Compiling Rust crates using Nix instead of Cargo {#compiling-rust-crates-using-nix-instead-of-cargo}
600+
601+### Simple operation {#simple-operation}
176602
177603When run, `cargo build` produces a file called `Cargo.lock`,
178604containing pinned versions of all dependencies. Nixpkgs contains a
@@ -183,20 +609,21 @@ That Nix expression calls `rustc` directly (hence bypassing Cargo),
183609and can be used to compile a crate and all its dependencies. Here is
184610an example for a minimal `hello` crate:
185611
186−
187− $ cargo new hello
188− $ cd hello
189− $ cargo build
612+```ShellSession
613+$ cargo new hello
614+$ cd hello
615+$ cargo build
190616 Compiling hello v0.1.0 (file:///tmp/hello)
191− Finished dev [unoptimized + debuginfo] target(s) in 0.20 secs
192− $ carnix -o hello.nix --src ./. Cargo.lock --standalone
193− $ nix-build hello.nix -A hello_0_1_0
617+ Finished dev [unoptimized + debuginfo] target(s) in 0.20 secs
618+$ carnix -o hello.nix --src ./. Cargo.lock --standalone
619+$ nix-build hello.nix -A hello_0_1_0
620+```
194621
195622Now, the file produced by the call to `carnix`, called `hello.nix`, looks like:
196623
197−```
624+```nix
198625# Generated by carnix 0.6.5: carnix -o hello.nix --src ./. Cargo.lock --standalone
199−{ lib, stdenv, buildRustCrate, fetchgit }:
626+{ stdenv, buildRustCrate, fetchgit }:
200627let kernel = stdenv.buildPlatform.parsed.kernel.name;
201628 # ... (content skipped)
202629in
@@ -223,9 +650,9 @@ dependencies, for instance by adding a single line `libc="*"` to our
223650`Cargo.lock`. Then, `carnix` needs to be run again, and produces the
224651following nix file:
225652
226−```
653+```nix
227654# Generated by carnix 0.6.5: carnix -o hello.nix --src ./. Cargo.lock --standalone
228−{ lib, stdenv, buildRustCrate, fetchgit }:
655+{ stdenv, buildRustCrate, fetchgit }:
229656let kernel = stdenv.buildPlatform.parsed.kernel.name;
230657 # ... (content skipped)
231658in
@@ -269,16 +696,16 @@ Here, the `libc` crate has no `src` attribute, so `buildRustCrate`
269696will fetch it from [crates.io](https://crates.io). A `sha256`
270697attribute is still needed for Nix purity.
271698
272−### Handling external dependencies
699+### Handling external dependencies {#handling-external-dependencies}
273700
274701Some crates require external libraries. For crates from
275702[crates.io](https://crates.io), such libraries can be specified in
276703`defaultCrateOverrides` package in nixpkgs itself.
277704
278705Starting from that file, one can add more overrides, to add features
279−or build inputs by overriding the hello crate in a seperate file.
706+or build inputs by overriding the hello crate in a separate file.
280707
281−```
708+```nix
282709with import <nixpkgs> {};
283710((import ./hello.nix).hello {}).override {
284711 crateOverrides = defaultCrateOverrides // {
@@ -298,7 +725,7 @@ derivation depend on the crate's version, the `attrs` argument of
298725the override above can be read, as in the following example, which
299726patches the derivation:
300727
301−```
728+```nix
302729with import <nixpkgs> {};
303730((import ./hello.nix).hello {}).override {
304731 crateOverrides = defaultCrateOverrides // {
@@ -319,7 +746,7 @@ dependencies. For instance, to override the build inputs for crate
319746`libc` in the example above, where `libc` is a dependency of the main
320747crate, we could do:
321748
322−```
749+```nix
323750with import <nixpkgs> {};
324751((import hello.nix).hello {}).override {
325752 crateOverrides = defaultCrateOverrides // {
@@ -328,34 +755,34 @@ with import <nixpkgs> {};
328755}
329756```
330757
331−### Options and phases configuration
758+### Options and phases configuration {#options-and-phases-configuration}
332759
333760Actually, the overrides introduced in the previous section are more
334761general. A number of other parameters can be overridden:
335762
336−- The version of rustc used to compile the crate:
763+- The version of `rustc` used to compile the crate:
337764
338− ```
765+ ```nix
339766 (hello {}).override { rust = pkgs.rust; };
340767 ```
341768
342769- Whether to build in release mode or debug mode (release mode by
343770 default):
344771
345− ```
772+ ```nix
346773 (hello {}).override { release = false; };
347774 ```
348775
349−- Whether to print the commands sent to rustc when building
776+- Whether to print the commands sent to `rustc` when building
350777 (equivalent to `--verbose` in cargo:
351778
352− ```
779+ ```nix
353780 (hello {}).override { verbose = false; };
354781 ```
355782
356783- Extra arguments to be passed to `rustc`:
357784
358− ```
785+ ```nix
359786 (hello {}).override { extraRustcOpts = "-Z debuginfo=2"; };
360787 ```
361788
@@ -367,7 +794,7 @@ general. A number of other parameters can be overridden:
367794 `postInstall`. As an example, here is how to create a new module
368795 before running the build script:
369796
370− ```
797+ ```nix
371798 (hello {}).override {
372799 preConfigure = ''
373800 echo "pub const PATH=\"${hi.out}\";" >> src/path.rs"
@@ -375,13 +802,13 @@ general. A number of other parameters can be overridden:
375802 };
376803 ```
377804
378−### Features
805+### Features {#features}
379806
380807One can also supply features switches. For example, if we want to
381808compile `diesel_cli` only with the `postgres` feature, and no default
382809features, we would write:
383810
384−```
811+```nix
385812(callPackage ./diesel.nix {}).diesel {
386813 default = false;
387814 postgres = true;
@@ -390,21 +817,22 @@ features, we would write:
390817
391818Where `diesel.nix` is the file generated by Carnix, as explained above.
392819
820+## Setting Up `nix-shell` {#setting-up-nix-shell}
393821
394−## Setting Up `nix-shell`
395822Oftentimes you want to develop code from within `nix-shell`. Unfortunately
396823`buildRustCrate` does not support common `nix-shell` operations directly
397824(see [this issue](https://github.com/NixOS/nixpkgs/issues/37945))
398825so we will use `stdenv.mkDerivation` instead.
399826
400827Using the example `hello` project above, we want to do the following:
828+
401829- Have access to `cargo` and `rustc`
402830- Have the `openssl` library available to a crate through it's _normal_
403831 compilation mechanism (`pkg-config`).
404832
405833A typical `shell.nix` might look like:
406834
407−```
835+```nix
408836with import <nixpkgs> {};
409837
410838stdenv.mkDerivation {
@@ -413,7 +841,7 @@ stdenv.mkDerivation {
413841 rustc cargo
414842
415843 # Example Build-time Additional Dependencies
416− pkgconfig
844+ pkg-config
417845 ];
418846 buildInputs = [
419847 # Example Run-time Additional Dependencies
@@ -426,17 +854,19 @@ stdenv.mkDerivation {
426854```
427855
428856You should now be able to run the following:
429−```
857+
858+```ShellSession
430859$ nix-shell --pure
431860$ cargo build
432861$ cargo test
433862```
434863
435−### Controlling Rust Version Inside `nix-shell`
864+### Controlling Rust Version Inside `nix-shell` {#controlling-rust-version-inside-nix-shell}
865+
436866To control your rust version (i.e. use nightly) from within `shell.nix` (or
437867other nix expressions) you can use the following `shell.nix`
438868
439−```
869+```nix
440870# Latest Nightly
441871with import <nixpkgs> {};
442872let src = fetchFromGitHub {
@@ -451,11 +881,11 @@ with import "${src.out}/rust-overlay.nix" pkgs pkgs;
451881stdenv.mkDerivation {
452882 name = "rust-env";
453883 buildInputs = [
454− # Note: to use use stable, just replace `nightly` with `stable`
884+ # Note: to use stable, just replace `nightly` with `stable`
455885 latest.rustChannels.nightly.rust
456886
457887 # Add some extra dependencies from `pkgs`
458− pkgconfig openssl
888+ pkg-config openssl
459889 ];
460890
461891 # Set Environment Variables
@@ -464,76 +894,115 @@ stdenv.mkDerivation {
464894```
465895
466896Now run:
467−```
897+
898+```ShellSession
468899$ rustc --version
469900rustc 1.26.0-nightly (188e693b3 2018-03-26)
470901```
471902
472903To see that you are using nightly.
473904
905+## Using community Rust overlays {#using-community-rust-overlays}
474906
475−## Using the Rust nightlies overlay
907+There are two community maintained approaches to Rust toolchain management:
908+- [oxalica's Rust overlay](https://github.com/oxalica/rust-overlay)
909+- [fenix](https://github.com/nix-community/fenix)
476910
477−Mozilla provides an overlay for nixpkgs to bring a nightly version of Rust into scope.
478−This overlay can _also_ be used to install recent unstable or stable versions
479−of Rust, if desired.
911+Oxalica's overlay allows you to select a particular Rust version and components.
912+See [their documentation](https://github.com/oxalica/rust-overlay#rust-overlay) for more
913+detailed usage.
480914
481−### Rust overlay installation
915+Fenix is an alternative to `rustup` and can also be used as an overlay.
482916
483−You can use this overlay by either changing your local nixpkgs configuration,
484−or by adding the overlay declaratively in a nix expression, e.g. in `configuration.nix`.
485−For more information see [#sec-overlays-install](the manual on installing overlays).
917+Both oxalica's overlay and fenix better integrate with nix and cache optimizations.
918+Because of this and ergonomics, either of those community projects
919+should be preferred to the Mozilla's Rust overlay (`nixpkgs-mozilla`).
486920
487−#### Imperative rust overlay installation
921+### How to select a specific `rustc` and toolchain version {#how-to-select-a-specific-rustc-and-toolchain-version}
488922
489−Clone [nixpkgs-mozilla](https://github.com/mozilla/nixpkgs-mozilla),
490−and create a symbolic link to the file
491−[rust-overlay.nix](https://github.com/mozilla/nixpkgs-mozilla/blob/master/rust-overlay.nix)
492−in the `~/.config/nixpkgs/overlays` directory.
923+You can consume the oxalica overlay and use it to grab a specific Rust toolchain version.
924+Here is an example `shell.nix` showing how to grab the current stable toolchain:
925+```nix
926+{ pkgs ? import <nixpkgs> {
927+ overlays = [
928+ (import (fetchTarball "https://github.com/oxalica/rust-overlay/archive/master.tar.gz"))
929+ ];
930+ }
931+}:
932+pkgs.mkShell {
933+ nativeBuildInputs = with pkgs; [
934+ pkg-config
935+ rust-bin.stable.latest.minimal
936+ ];
937+}
938+```
493939
494− $ git clone https://github.com/mozilla/nixpkgs-mozilla.git
495− $ mkdir -p ~/.config/nixpkgs/overlays
496− $ ln -s $(pwd)/nixpkgs-mozilla/rust-overlay.nix ~/.config/nixpkgs/overlays/rust-overlay.nix
940+You can try this out by:
941+1. Saving that to `shell.nix`
942+2. Executing `nix-shell --pure --command 'rustc --version'`
497943
498−### Declarative rust overlay installation
944+As of writing, this prints out `rustc 1.56.0 (09c42c458 2021-10-18)`.
499945
500−Add the following to your `configuration.nix`, `home-configuration.nix`, `shell.nix`, or similar:
946+### How to use an overlay toolchain in a derivation {#how-to-use-an-overlay-toolchain-in-a-derivation}
501947
502−```
503− nixpkgs = {
504− overlays = [
505− (import (builtins.fetchTarball https://github.com/mozilla/nixpkgs-mozilla/archive/master.tar.gz))
506− # Further overlays go here
507− ];
508− };
509−```
948+You can also use an overlay's Rust toolchain with `buildRustPackage`.
949+The below snippet demonstrates invoking `buildRustPackage` with an oxalica overlay selected Rust toolchain:
950+```nix
951+with import <nixpkgs> {
952+ overlays = [
953+ (import (fetchTarball "https://github.com/oxalica/rust-overlay/archive/master.tar.gz"))
954+ ];
955+};
510956
511−Note that this will fetch the latest overlay version when rebuilding your system.
957+rustPlatform.buildRustPackage rec {
958+ pname = "ripgrep";
959+ version = "12.1.1";
960+ nativeBuildInputs = [
961+ rust-bin.stable.latest.minimal
962+ ];
512963
513−### Rust overlay usage
964+ src = fetchFromGitHub {
965+ owner = "BurntSushi";
966+ repo = "ripgrep";
967+ rev = version;
968+ sha256 = "1hqps7l5qrjh9f914r5i6kmcz6f1yb951nv4lby0cjnp5l253kps";
969+ };
514970
515−The overlay contains attribute sets corresponding to different versions of the rust toolchain, such as:
971+ cargoSha256 = "03wf9r2csi6jpa7v5sw5lpxkrk4wfzwmzx7k3991q3bdjzcwnnwp";
516972
517−* `latest.rustChannels.stable`
518−* `latest.rustChannels.nightly`
519−* a function `rustChannelOf`, called as `(rustChannelOf { date = "2018-04-11"; channel = "nightly"; })`, or...
520−* `(nixpkgs.rustChannelOf { rustToolchain = ./rust-toolchain; })` if you have a local `rust-toolchain` file (see https://github.com/mozilla/nixpkgs-mozilla#using-in-nix-expressions for an example)
973+ meta = with lib; {
974+ description = "A fast line-oriented regex search tool, similar to ag and ack";
975+ homepage = "https://github.com/BurntSushi/ripgrep";
976+ license = licenses.unlicense;
977+ maintainers = [ maintainers.tailhook ];
978+ };
979+}
980+```
521981
522−Each of these contain packages such as `rust`, which contains your usual rust development tools with the respective toolchain chosen.
523−For example, you might want to add `latest.rustChannels.stable.rust` to the list of packages in your configuration.
982+Follow the below steps to try that snippet.
983+1. create a new directory
984+1. save the above snippet as `default.nix` in that directory
985+1. cd into that directory and run `nix-build`
524986
525−Imperatively, the latest stable version can be installed with the following command:
987+### Rust overlay installation {#rust-overlay-installation}
526988
527− $ nix-env -Ai nixos.latest.rustChannels.stable.rust
989+You can use this overlay by either changing your local nixpkgs configuration,
990+or by adding the overlay declaratively in a nix expression, e.g. in `configuration.nix`.
991+For more information see [the manual on installing overlays](#sec-overlays-install).
528992
529−Or using the attribute with nix-shell:
993+### Declarative Rust overlay installation {#declarative-rust-overlay-installation}
530994
531− $ nix-shell -p nixos.latest.rustChannels.stable.rust
995+This snippet shows how to use oxalica's Rust overlay.
996+Add the following to your `configuration.nix`, `home-configuration.nix`, `shell.nix`, or similar:
532997
533−To install the beta or nightly channel, "stable" should be substituted by
534−"nightly" or "beta", or
535−use the function provided by this overlay to pull a version based on a
536−build date.
998+```nix
999+{ pkgs ? import <nixpkgs> {
1000+ overlays = [
1001+ (import (builtins.fetchTarball "https://github.com/oxalica/rust-overlay/archive/master.tar.gz"))
1002+ # Further overlays go here
1003+ ];
1004+ };
1005+};
1006+```
5371007
538−The overlay automatically updates itself as it uses the same source as
539−[rustup](https://www.rustup.rs/).
1008+Note that this will fetch the latest overlay version when rebuilding your system.
doc/languages-frameworks/texlive.section.mdnew file+129
@@ -0,0 +1,129 @@
1+# TeX Live {#sec-language-texlive}
2+
3+Since release 15.09 there is a new TeX Live packaging that lives entirely under attribute `texlive`.
4+
5+## User's guide {#sec-language-texlive-user-guide}
6+
7+- For basic usage just pull `texlive.combined.scheme-basic` for an environment with basic LaTeX support.
8+
9+- 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:
10+
11+ ```nix
12+ texlive.combine {
13+ inherit (texlive) scheme-small collection-langkorean algorithms cm-super;
14+ }
15+ ```
16+
17+- There are all the schemes, collections and a few thousand packages, as defined upstream (perhaps with tiny differences).
18+
19+- By default you only get executables and files needed during runtime, and a little documentation for the core packages. To change that, you need to add `pkgFilter` function to `combine`.
20+
21+ ```nix
22+ texlive.combine {
23+ # inherit (texlive) whatever-you-want;
24+ pkgFilter = pkg:
25+ pkg.tlType == "run" || pkg.tlType == "bin" || pkg.pname == "cm-super";
26+ # elem tlType [ "run" "bin" "doc" "source" ]
27+ # there are also other attributes: version, name
28+ }
29+ ```
30+
31+- You can list packages e.g. by `nix repl`.
32+
33+ ```ShellSession
34+ $ nix repl
35+ nix-repl> :l <nixpkgs>
36+ nix-repl> texlive.collection-[TAB]
37+ ```
38+
39+- Note that the wrapper assumes that the result has a chance to be useful. For example, the core executables should be present, as well as some core data files. The supported way of ensuring this is by including some scheme, for example `scheme-basic`, into the combination.
40+
41+## Custom packages {#sec-language-texlive-custom-packages}
42+
43+
44+You may find that you need to use an external TeX package. A derivation for such package has to provide contents of the "texmf" directory in its output and provide the `tlType` attribute. Here is a (very verbose) example:
45+
46+```nix
47+with import <nixpkgs> {};
48+
49+let
50+ foiltex_run = stdenvNoCC.mkDerivation {
51+ pname = "latex-foiltex";
52+ version = "2.1.4b";
53+ passthru.tlType = "run";
54+
55+ srcs = [
56+ (fetchurl {
57+ url = "http://mirrors.ctan.org/macros/latex/contrib/foiltex/foiltex.dtx";
58+ sha256 = "07frz0krpz7kkcwlayrwrj2a2pixmv0icbngyw92srp9fp23cqpz";
59+ })
60+ (fetchurl {
61+ url = "http://mirrors.ctan.org/macros/latex/contrib/foiltex/foiltex.ins";
62+ sha256 = "09wkyidxk3n3zvqxfs61wlypmbhi1pxmjdi1kns9n2ky8ykbff99";
63+ })
64+ ];
65+
66+ unpackPhase = ''
67+ runHook preUnpack
68+
69+ for _src in $srcs; do
70+ cp "$_src" $(stripHash "$_src")
71+ done
72+
73+ runHook postUnpack
74+ '';
75+
76+ nativeBuildInputs = [ texlive.combined.scheme-small ];
77+
78+ dontConfigure = true;
79+
80+ buildPhase = ''
81+ runHook preBuild
82+
83+ # Generate the style files
84+ latex foiltex.ins
85+
86+ runHook postBuild
87+ '';
88+
89+ installPhase = ''
90+ runHook preInstall
91+
92+ path="$out/tex/latex/foiltex"
93+ mkdir -p "$path"
94+ cp *.{cls,def,clo} "$path/"
95+
96+ runHook postInstall
97+ '';
98+
99+ meta = with lib; {
100+ description = "A LaTeX2e class for overhead transparencies";
101+ license = licenses.unfreeRedistributable;
102+ maintainers = with maintainers; [ veprbl ];
103+ platforms = platforms.all;
104+ };
105+ };
106+ foiltex = { pkgs = [ foiltex_run ]; };
107+
108+ latex_with_foiltex = texlive.combine {
109+ inherit (texlive) scheme-small;
110+ inherit foiltex;
111+ };
112+in
113+ runCommand "test.pdf" {
114+ nativeBuildInputs = [ latex_with_foiltex ];
115+ } ''
116+cat >test.tex <<EOF
117+\documentclass{foils}
118+
119+\title{Presentation title}
120+\date{}
121+
122+\begin{document}
123+\maketitle
124+\end{document}
125+EOF
126+ pdflatex test.tex
127+ cp test.pdf $out
128+''
129+```
doc/languages-frameworks/texlive.xmldeleted−152
@@ -1,152 +0,0 @@
1−<section xmlns="http://docbook.org/ns/docbook"
2− xmlns:xlink="http://www.w3.org/1999/xlink"
3− xml:id="sec-language-texlive">
4− <title>TeX Live</title>
5−
6− <para>
7− Since release 15.09 there is a new TeX Live packaging that lives entirely under attribute <varname>texlive</varname>.
8− </para>
9−
10− <section xml:id="sec-language-texlive-users-guide">
11− <title>User's guide</title>
12−
13− <itemizedlist>
14− <listitem>
15− <para>
16− For basic usage just pull <varname>texlive.combined.scheme-basic</varname> for an environment with basic LaTeX support.
17− </para>
18− </listitem>
19− <listitem>
20− <para>
21− It typically won't work to use separately installed packages together. Instead, you can build a custom set of packages like this:
22−<programlisting>
23−texlive.combine {
24− inherit (texlive) scheme-small collection-langkorean algorithms cm-super;
25−}
26−</programlisting>
27− There are all the schemes, collections and a few thousand packages, as defined upstream (perhaps with tiny differences).
28− </para>
29− </listitem>
30− <listitem>
31− <para>
32− By default you only get executables and files needed during runtime, and a little documentation for the core packages. To change that, you need to add <varname>pkgFilter</varname> function to <varname>combine</varname>.
33−<programlisting>
34−texlive.combine {
35− # inherit (texlive) whatever-you-want;
36− pkgFilter = pkg:
37− pkg.tlType == "run" || pkg.tlType == "bin" || pkg.pname == "cm-super";
38− # elem tlType [ "run" "bin" "doc" "source" ]
39− # there are also other attributes: version, name
40−}
41−</programlisting>
42− </para>
43− </listitem>
44− <listitem>
45− <para>
46− You can list packages e.g. by <command>nix repl</command>.
47−<programlisting>
48−<prompt>$ </prompt>nix repl
49−<prompt>nix-repl> </prompt>:l &lt;nixpkgs>
50−<prompt>nix-repl> </prompt>texlive.collection-<keycap function="tab" />
51−</programlisting>
52− </para>
53− </listitem>
54− <listitem>
55− <para>
56− Note that the wrapper assumes that the result has a chance to be useful. For example, the core executables should be present, as well as some core data files. The supported way of ensuring this is by including some scheme, for example <varname>scheme-basic</varname>, into the combination.
57− </para>
58− </listitem>
59− </itemizedlist>
60− </section>
61−
62− <section xml:id="sec-language-texlive-custom-packages">
63− <title>Custom packages</title>
64− <para>
65− You may find that you need to use an external TeX package. A derivation for such package has to provide contents of the "texmf" directory in its output and provide the <varname>tlType</varname> attribute. Here is a (very verbose) example:
66−<programlisting><![CDATA[
67−with import <nixpkgs> {};
68−
69−let
70− foiltex_run = stdenvNoCC.mkDerivation {
71− pname = "latex-foiltex";
72− version = "2.1.4b";
73− passthru.tlType = "run";
74−
75− srcs = [
76− (fetchurl {
77− url = "http://mirrors.ctan.org/macros/latex/contrib/foiltex/foiltex.dtx";
78− sha256 = "07frz0krpz7kkcwlayrwrj2a2pixmv0icbngyw92srp9fp23cqpz";
79− })
80− (fetchurl {
81− url = "http://mirrors.ctan.org/macros/latex/contrib/foiltex/foiltex.ins";
82− sha256 = "09wkyidxk3n3zvqxfs61wlypmbhi1pxmjdi1kns9n2ky8ykbff99";
83− })
84− ];
85−
86− unpackPhase = ''
87− runHook preUnpack
88−
89− for _src in $srcs; do
90− cp "$_src" $(stripHash "$_src")
91− done
92−
93− runHook postUnpack
94− '';
95−
96− nativeBuildInputs = [ texlive.combined.scheme-small ];
97−
98− dontConfigure = true;
99−
100− buildPhase = ''
101− runHook preBuild
102−
103− # Generate the style files
104− latex foiltex.ins
105−
106− runHook postBuild
107− '';
108−
109− installPhase = ''
110− runHook preInstall
111−
112− path="$out/tex/latex/foiltex"
113− mkdir -p "$path"
114− cp *.{cls,def,clo} "$path/"
115−
116− runHook postInstall
117− '';
118−
119− meta = with lib; {
120− description = "A LaTeX2e class for overhead transparencies";
121− license = licenses.unfreeRedistributable;
122− maintainers = with maintainers; [ veprbl ];
123− platforms = platforms.all;
124− };
125− };
126− foiltex = { pkgs = [ foiltex_run ]; };
127−
128− latex_with_foiltex = texlive.combine {
129− inherit (texlive) scheme-small;
130− inherit foiltex;
131− };
132−in
133− runCommand "test.pdf" {
134− nativeBuildInputs = [ latex_with_foiltex ];
135− } ''
136−cat >test.tex <<EOF
137−\documentclass{foils}
138−
139−\title{Presentation title}
140−\date{}
141−
142−\begin{document}
143−\maketitle
144−\end{document}
145−EOF
146− pdflatex test.tex
147− cp test.pdf $out
148−''
149−]]></programlisting>
150− </para>
151− </section>
152−</section>
doc/languages-frameworks/titanium.section.md+5−10
@@ -1,9 +1,4 @@
1−---
2−title: Titanium
3−author: Sander van der Burg
4−date: 2018-11-18
5−---
6−# Titanium
1+# Titanium {#titanium}
72
83The Nixpkgs repository contains facilities to deploy a variety of versions of
94the [Titanium SDK](https://www.appcelerator.com) versions, a cross-platform
@@ -14,8 +9,8 @@ applications for Android and iOS devices from source code.
149Not all Titanium features supported -- currently, it can only be used to build
1510Android and iOS apps.
1611
17−Building a Titanium app
18−-----------------------
12+## Building a Titanium app {#building-a-titanium-app}
13+
1914We can build a Titanium app from source for Android or iOS and for debugging or
2015release purposes by invoking the `titaniumenv.buildApp {}` function:
2116
@@ -108,8 +103,8 @@ When `enableWirelessDistribution` has been enabled, you must also provide the
108103path of the PHP script (`installURL`) (that is included with the iOS build
109104environment) to enable wireless ad-hoc installations.
110105
111−Emulating or simulating the app
112−-------------------------------
106+## Emulating or simulating the app {#emulating-or-simulating-the-app}
107+
113108It is also possible to simulate the correspond iOS simulator build by using
114109`xcodeenv.simulateApp {}` and emulate an Android APK by using
115110`androidenv.emulateApp {}`.
doc/languages-frameworks/vim.section.md+88−25
@@ -1,9 +1,4 @@
1−---
2−title: User's Guide for Vim in Nixpkgs
3−author: Marc Weber
4−date: 2016-06-25
5−---
6−# Vim
1+# Vim {#vim}
72
83Both Neovim and Vim can be configured to include your favorite plugins
94and additional libraries.
@@ -17,13 +12,13 @@ At the moment we support three different methods for managing plugins:
1712- Pathogen
1813- vim-plug
1914
20−## Custom configuration
15+## Custom configuration {#custom-configuration}
2116
2217Adding custom .vimrc lines can be done using the following code:
2318
2419```nix
2520vim_configurable.customize {
26− # `name` specifies the name of the executable and package
21+ # `name` optionally specifies the name of the executable and package
2722 name = "vim-with-plugins";
2823
2924 vimrcConfig.customRC = ''
@@ -33,6 +28,9 @@ vim_configurable.customize {
3328```
3429
3530This configuration is used when Vim is invoked with the command specified as name, in this case `vim-with-plugins`.
31+You can also omit `name` to customize Vim itself. See the
32+[definition of `vimUtils.makeCustomizable`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/vim/plugins/vim-utils.nix#L408)
33+for all supported options.
3634
3735For Neovim the `configure` argument can be overridden to achieve the same:
3836
@@ -61,7 +59,7 @@ neovim-qt.override {
6159}
6260```
6361
64−## Managing plugins with Vim packages
62+## Managing plugins with Vim packages {#managing-plugins-with-vim-packages}
6563
6664To store you plugins in Vim packages (the native Vim plugin manager, see `:help packages`) the following example can be used:
6765
@@ -121,7 +119,72 @@ The resulting package can be added to `packageOverrides` in `~/.nixpkgs/config.n
121119
122120After that you can install your special grafted `myVim` or `myNeovim` packages.
123121
124−## Managing plugins with vim-plug
122+### What if your favourite Vim plugin isn’t already packaged? {#what-if-your-favourite-vim-plugin-isnt-already-packaged}
123+
124+If one of your favourite plugins isn't packaged, you can package it yourself:
125+
126+```nix
127+{ config, pkgs, ... }:
128+
129+let
130+ easygrep = pkgs.vimUtils.buildVimPlugin {
131+ name = "vim-easygrep";
132+ src = pkgs.fetchFromGitHub {
133+ owner = "dkprice";
134+ repo = "vim-easygrep";
135+ rev = "d0c36a77cc63c22648e792796b1815b44164653a";
136+ sha256 = "0y2p5mz0d5fhg6n68lhfhl8p4mlwkb82q337c22djs4w5zyzggbc";
137+ };
138+ };
139+in
140+{
141+ environment.systemPackages = [
142+ (
143+ pkgs.neovim.override {
144+ configure = {
145+ packages.myPlugins = with pkgs.vimPlugins; {
146+ start = [
147+ vim-go # already packaged plugin
148+ easygrep # custom package
149+ ];
150+ opt = [];
151+ };
152+ # ...
153+ };
154+ }
155+ )
156+ ];
157+}
158+```
159+
160+### Specificities for some plugins
161+#### Tree sitter
162+
163+By default `nvim-treesitter` encourages you to download, compile and install
164+the required tree-sitter grammars at run time with `:TSInstall`. This works
165+poorly on NixOS. Instead, to install the `nvim-treesitter` plugins with a set
166+of precompiled grammars, you can use `nvim-treesitter.withPlugins` function:
167+
168+```nix
169+(pkgs.neovim.override {
170+ configure = {
171+ packages.myPlugins = with pkgs.vimPlugins; {
172+ start = [
173+ (nvim-treesitter.withPlugins (
174+ plugins: with plugins; [
175+ tree-sitter-nix
176+ tree-sitter-python
177+ ]
178+ ))
179+ ];
180+ };
181+ };
182+})
183+```
184+
185+To enable all grammars packaged in nixpkgs, use `(pkgs.vimPlugins.nvim-treesitter.withPlugins (plugins: pkgs.tree-sitter.allGrammars))`.
186+
187+## Managing plugins with vim-plug {#managing-plugins-with-vim-plug}
125188
126189To use [vim-plug](https://github.com/junegunn/vim-plug) to manage your Vim
127190plugins the following example can be used:
@@ -150,18 +213,18 @@ neovim.override {
150213}
151214```
152215
153−## Managing plugins with VAM
216+## Managing plugins with VAM {#managing-plugins-with-vam}
154217
155−### Handling dependencies of Vim plugins
218+### Handling dependencies of Vim plugins {#handling-dependencies-of-vim-plugins}
156219
157220VAM introduced .json files supporting dependencies without versioning
158221assuming that "using latest version" is ok most of the time.
159222
160−### Example
223+### Example {#example}
161224
162225First create a vim-scripts file having one plugin name per line. Example:
163226
164−```
227+```vim
165228"tlib"
166229{'name': 'vim-addon-sql'}
167230{'filetype_regex': '\%(vim)$', 'names': ['reload', 'vim-dev-plugin']}
@@ -202,7 +265,7 @@ nix-shell -p vimUtils.vim_with_vim2nix --command "vim -c 'source generate.vim'"
202265You should get a Vim buffer with the nix derivations (output1) and vam.pluginDictionaries (output2).
203266You can add your Vim to your system's configuration file like this and start it by "vim-my":
204267
205−```
268+```nix
206269my-vim =
207270 let plugins = let inherit (vimUtils) buildVimPluginFrom2Nix; in {
208271 copy paste output1 here
@@ -222,11 +285,11 @@ my-vim =
222285
223286Sample output1:
224287
225−```
288+```nix
226289"reload" = buildVimPluginFrom2Nix { # created by nix#NixDerivation
227290 name = "reload";
228291 src = fetchgit {
229− url = "git://github.com/xolox/vim-reload";
292+ url = "https://github.com/xolox/vim-reload";
230293 rev = "0a601a668727f5b675cb1ddc19f6861f3f7ab9e1";
231294 sha256 = "0vb832l9yxj919f5hfg6qj6bn9ni57gnjd3bj7zpq7d4iv2s4wdh";
232295 };
@@ -247,13 +310,13 @@ Sample output2:
247310]
248311```
249312
250−## Adding new plugins to nixpkgs
313+## Adding new plugins to nixpkgs {#adding-new-plugins-to-nixpkgs}
251314
252−Nix expressions for Vim plugins are stored in [pkgs/misc/vim-plugins](/pkgs/misc/vim-plugins). For the vast majority of plugins, Nix expressions are automatically generated by running [`./update.py`](/pkgs/misc/vim-plugins/update.py). This creates a [generated.nix](/pkgs/misc/vim-plugins/generated.nix) file based on the plugins listed in [vim-plugin-names](/pkgs/misc/vim-plugins/vim-plugin-names). Plugins are listed in alphabetical order in `vim-plugin-names` using the format `[github username]/[repository]`. For example https://github.com/scrooloose/nerdtree becomes `scrooloose/nerdtree`.
315+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`.
253316
254−Some plugins require overrides in order to function properly. Overrides are placed in [overrides.nix](/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:
317+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:
255318
256−```
319+```nix
257320deoplete-fish = super.deoplete-fish.overrideAttrs(old: {
258321 dependencies = with super; [ deoplete-nvim vim-fish ];
259322});
@@ -265,21 +328,21 @@ To add a new plugin, run `./update.py --add "[owner]/[name]"`. **NOTE**: This sc
265328
266329Finally, there are some plugins that are also packaged in nodePackages because they have Javascript-related build steps, such as running webpack. Those plugins are not listed in `vim-plugin-names` or managed by `update.py` at all, and are included separately in `overrides.nix`. Currently, all these plugins are related to the `coc.nvim` ecosystem of Language Server Protocol integration with vim/neovim.
267330
268−## Updating plugins in nixpkgs
331+## Updating plugins in nixpkgs {#updating-plugins-in-nixpkgs}
269332
270333Run 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).
271334
272335```sh
273−GITHUB_API_TOKEN=my_token ./pkgs/misc/vim-plugins/update.py
336+GITHUB_API_TOKEN=my_token ./pkgs/applications/editors/vim/plugins/update.py
274337```
275338
276339Alternatively, set the number of processes to a lower count to avoid rate-limiting.
277340
278341```sh
279−./pkgs/misc/vim-plugins/update.py --proc 1
342+./pkgs/applications/editors/vim/plugins/update.py --proc 1
280343```
281344
282−## Important repositories
345+## Important repositories {#important-repositories}
283346
284347- [vim-pi](https://bitbucket.org/vimcommunity/vim-pi) is a plugin repository
285348 from VAM plugin manager meant to be used by others as well used by
doc/manual.xml+18−15
@@ -8,34 +8,37 @@
88 <xi:include href="preface.chapter.xml" />
99 <part>
1010 <title>Using Nixpkgs</title>
11− <xi:include href="using/configuration.xml" />
12− <xi:include href="using/overlays.xml" />
13− <xi:include href="using/overrides.xml" />
11+ <xi:include href="using/configuration.chapter.xml" />
12+ <xi:include href="using/overlays.chapter.xml" />
13+ <xi:include href="using/overrides.chapter.xml" />
1414 <xi:include href="functions.xml" />
1515 </part>
1616 <part>
1717 <title>Standard environment</title>
18− <xi:include href="stdenv/stdenv.xml" />
19− <xi:include href="stdenv/meta.xml" />
20− <xi:include href="stdenv/multiple-output.xml" />
21− <xi:include href="stdenv/cross-compilation.xml" />
22− <xi:include href="stdenv/platform-notes.xml" />
18+ <xi:include href="stdenv/stdenv.chapter.xml" />
19+ <xi:include href="stdenv/meta.chapter.xml" />
20+ <xi:include href="stdenv/multiple-output.chapter.xml" />
21+ <xi:include href="stdenv/cross-compilation.chapter.xml" />
22+ <xi:include href="stdenv/platform-notes.chapter.xml" />
2323 </part>
2424 <part>
2525 <title>Builders</title>
26− <xi:include href="builders/fetchers.xml" />
27− <xi:include href="builders/trivial-builders.xml" />
26+ <xi:include href="builders/fetchers.chapter.xml" />
27+ <xi:include href="builders/trivial-builders.chapter.xml" />
28+ <xi:include href="builders/testers.chapter.xml" />
2829 <xi:include href="builders/special.xml" />
2930 <xi:include href="builders/images.xml" />
31+ <xi:include href="hooks/index.xml" />
3032 <xi:include href="languages-frameworks/index.xml" />
3133 <xi:include href="builders/packages/index.xml" />
3234 </part>
3335 <part>
3436 <title>Contributing to Nixpkgs</title>
35− <xi:include href="contributing/quick-start.xml" />
36− <xi:include href="contributing/coding-conventions.xml" />
37− <xi:include href="contributing/submitting-changes.xml" />
38− <xi:include href="contributing/reviewing-contributions.xml" />
39− <xi:include href="contributing/contributing-to-documentation.xml" />
37+ <xi:include href="contributing/quick-start.chapter.xml" />
38+ <xi:include href="contributing/coding-conventions.chapter.xml" />
39+ <xi:include href="contributing/submitting-changes.chapter.xml" />
40+ <xi:include href="contributing/vulnerability-roundup.chapter.xml" />
41+ <xi:include href="contributing/reviewing-contributions.chapter.xml" />
42+ <xi:include href="contributing/contributing-to-documentation.chapter.xml" />
4043 </part>
4144</book>
doc/preface.chapter.md+2−8
@@ -1,10 +1,4 @@
1−---
2−title: Preface
3−author: Frederik Rietdijk
4−date: 2015-11-25
5−---
6−
7−# Preface
1+# Preface {#preface}
82
93The Nix Packages collection (Nixpkgs) is a set of thousands of packages for the
104[Nix package manager](https://nixos.org/nix/), released under a
@@ -18,7 +12,7 @@ Nixpkgs. If you like to learn more about the Nix package manager and the Nix
1812expression language, then you are kindly referred to the [Nix manual](https://nixos.org/nix/manual/).
1913The NixOS distribution is documented in the [NixOS manual](https://nixos.org/nixos/manual/).
2014
21−## Overview of Nixpkgs
15+## Overview of Nixpkgs {#overview-of-nixpkgs}
2216
2317Nix expressions describe how to build packages from source and are collected in
2418the [nixpkgs repository](https://github.com/NixOS/nixpkgs). Also included in the
doc/shell.nix+3−5
@@ -1,5 +1,3 @@
1−{ pkgs ? import ../. {} }:
2−(import ./default.nix {}).overrideAttrs (x: {
3− buildInputs = x.buildInputs ++ [ pkgs.xmloscopy pkgs.ruby ];
4−
5−})
1+{ pkgs ? import ../. { } }:
2+(import ./default.nix { }).overrideAttrs
3+(x: { buildInputs = (x.buildInputs or [ ]) ++ [ pkgs.xmloscopy pkgs.ruby ]; })
doc/stdenv/cross-compilation.chapter.mdnew file+236
@@ -0,0 +1,236 @@
1+# Cross-compilation {#chap-cross}
2+
3+## Introduction {#sec-cross-intro}
4+
5+"Cross-compilation" means compiling a program on one machine for another type of machine. For example, a typical use of cross-compilation is to compile programs for embedded devices. These devices often don't have the computing power and memory to compile their own programs. One might think that cross-compilation is a fairly niche concern. However, there are significant advantages to rigorously distinguishing between build-time and run-time environments! Significant, because the benefits apply even when one is developing and deploying on the same machine. Nixpkgs is increasingly adopting the opinion that packages should be written with cross-compilation in mind, and Nixpkgs should evaluate in a similar way (by minimizing cross-compilation-specific special cases) whether or not one is cross-compiling.
6+
7+This chapter will be organized in three parts. First, it will describe the basics of how to package software in a way that supports cross-compilation. Second, it will describe how to use Nixpkgs when cross-compiling. Third, it will describe the internal infrastructure supporting cross-compilation.
8+
9+## Packaging in a cross-friendly manner {#sec-cross-packaging}
10+
11+### Platform parameters {#ssec-cross-platform-parameters}
12+
13+Nixpkgs follows the [conventions of GNU autoconf](https://gcc.gnu.org/onlinedocs/gccint/Configure-Terms.html). We distinguish between 3 types of platforms when building a derivation: _build_, _host_, and _target_. In summary, _build_ is the platform on which a package is being built, _host_ is the platform on which it will run. The third attribute, _target_, is relevant only for certain specific compilers and build tools.
14+
15+In Nixpkgs, these three platforms are defined as attribute sets under the names `buildPlatform`, `hostPlatform`, and `targetPlatform`. They are always defined as attributes in the standard environment. That means one can access them like:
16+
17+```nix
18+{ stdenv, fooDep, barDep, ... }: ...stdenv.buildPlatform...
19+```
20+
21+`buildPlatform`
22+
23+: The "build platform" is the platform on which a package is built. Once someone has a built package, or pre-built binary package, the build platform should not matter and can be ignored.
24+
25+`hostPlatform`
26+
27+: The "host platform" is the platform on which a package will be run. This is the simplest platform to understand, but also the one with the worst name.
28+
29+`targetPlatform`
30+
31+: The "target platform" attribute is, unlike the other two attributes, not actually fundamental to the process of building software. Instead, it is only relevant for compatibility with building certain specific compilers and build tools. It can be safely ignored for all other packages.
32+
33+: The build process of certain compilers is written in such a way that the compiler resulting from a single build can itself only produce binaries for a single platform. The task of specifying this single "target platform" is thus pushed to build time of the compiler. The root cause of this is that the compiler (which will be run on the host) and the standard library/runtime (which will be run on the target) are built by a single build process.
34+
35+: There is no fundamental need to think about a single target ahead of time like this. If the tool supports modular or pluggable backends, both the need to specify the target at build time and the constraint of having only a single target disappear. An example of such a tool is LLVM.
36+
37+: Although the existence of a "target platform" is arguably a historical mistake, it is a common one: examples of tools that suffer from it are GCC, Binutils, GHC and Autoconf. Nixpkgs tries to avoid sharing in the mistake where possible. Still, because the concept of a target platform is so ingrained, it is best to support it as is.
38+
39+The exact schema these fields follow is a bit ill-defined due to a long and convoluted evolution, but this is slowly being cleaned up. You can see examples of ones used in practice in `lib.systems.examples`; note how they are not all very consistent. For now, here are few fields can count on them containing:
40+
41+`system`
42+
43+: This is a two-component shorthand for the platform. Examples of this would be "x86_64-darwin" and "i686-linux"; see `lib.systems.doubles` for more. The first component corresponds to the CPU architecture of the platform and the second to the operating system of the platform (`[cpu]-[os]`). This format has built-in support in Nix, such as the `builtins.currentSystem` impure string.
44+
45+`config`
46+
47+: This is a 3- or 4- component shorthand for the platform. Examples of this would be `x86_64-unknown-linux-gnu` and `aarch64-apple-darwin14`. This is a standard format called the "LLVM target triple", as they are pioneered by LLVM. In the 4-part form, this corresponds to `[cpu]-[vendor]-[os]-[abi]`. This format is strictly more informative than the "Nix host double", as the previous format could analogously be termed. This needs a better name than `config`!
48+
49+`parsed`
50+
51+: This is a Nix representation of a parsed LLVM target triple with white-listed components. This can be specified directly, or actually parsed from the `config`. See `lib.systems.parse` for the exact representation.
52+
53+`libc`
54+
55+: This is a string identifying the standard C library used. Valid identifiers include "glibc" for GNU libc, "libSystem" for Darwin's Libsystem, and "uclibc" for µClibc. It should probably be refactored to use the module system, like `parse`.
56+
57+`is*`
58+
59+: These predicates are defined in `lib.systems.inspect`, and slapped onto every platform. They are superior to the ones in `stdenv` as they force the user to be explicit about which platform they are inspecting. Please use these instead of those.
60+
61+`platform`
62+
63+: This is, quite frankly, a dumping ground of ad-hoc settings (it's an attribute set). See `lib.systems.platforms` for examples—there's hopefully one in there that will work verbatim for each platform that is working. Please help us triage these flags and give them better homes!
64+
65+### Theory of dependency categorization {#ssec-cross-dependency-categorization}
66+
67+::: {.note}
68+This is a rather philosophical description that isn't very Nixpkgs-specific. For an overview of all the relevant attributes given to `mkDerivation`, see [](#ssec-stdenv-dependencies). For a description of how everything is implemented, see [](#ssec-cross-dependency-implementation).
69+:::
70+
71+In this section we explore the relationship between both runtime and build-time dependencies and the 3 Autoconf platforms.
72+
73+A run time dependency between two packages requires that their host platforms match. This is directly implied by the meaning of "host platform" and "runtime dependency": The package dependency exists while both packages are running on a single host platform.
74+
75+A build time dependency, however, has a shift in platforms between the depending package and the depended-on package. "build time dependency" means that to build the depending package we need to be able to run the depended-on's package. The depending package's build platform is therefore equal to the depended-on package's host platform.
76+
77+If both the dependency and depending packages aren't compilers or other machine-code-producing tools, we're done. And indeed `buildInputs` and `nativeBuildInputs` have covered these simpler cases for many years. But if the dependency does produce machine code, we might need to worry about its target platform too. In principle, that target platform might be any of the depending package's build, host, or target platforms, but we prohibit dependencies from a "later" platform to an earlier platform to limit confusion because we've never seen a legitimate use for them.
78+
79+Finally, if the depending package is a compiler or other machine-code-producing tool, it might need dependencies that run at "emit time". This is for compilers that (regrettably) insist on being built together with their source languages' standard libraries. Assuming build != host != target, a run-time dependency of the standard library cannot be run at the compiler's build time or run time, but only at the run time of code emitted by the compiler.
80+
81+Putting this all together, that means that we have dependency types of the form "X→ E", which means that the dependency executes on X and emits code for E; each of X and E can be `build`, `host`, or `target`, and E can be `*` to indicate that the dependency is not a compiler-like package.
82+
83+Dependency types describe the relationships that a package has with each of its transitive dependencies. You could think of attaching one or more dependency types to each of the formal parameters at the top of a package's `.nix` file, as well as to all of *their* formal parameters, and so on. Triples like `(foo, bar, baz)`, on the other hand, are a property of an instantiated derivation -- you could would attach a triple `(mips-linux, mips-linux, sparc-solaris)` to a `.drv` file in `/nix/store`.
84+
85+Only nine dependency types matter in practice:
86+
87+#### Possible dependency types {#possible-dependency-types}
88+
89+| Dependency type | Dependency’s host platform | Dependency’s target platform |
90+|-----------------|----------------------------|------------------------------|
91+| build → * | build | (none) |
92+| build → build | build | build |
93+| build → host | build | host |
94+| build → target | build | target |
95+| host → * | host | (none) |
96+| host → host | host | host |
97+| host → target | host | target |
98+| target → * | target | (none) |
99+| target → target | target | target |
100+
101+Let's use `g++` as an example to make this table clearer. `g++` is a C++ compiler written in C. Suppose we are building `g++` with a `(build, host, target)` platform triple of `(foo, bar, baz)`. This means we are using a `foo`-machine to build a copy of `g++` which will run on a `bar`-machine and emit binaries for the `baz`-machine.
102+
103+* `g++` links against the host platform's `glibc` C library, which is a "host→ *" dependency with a triple of `(bar, bar, *)`. Since it is a library, not a compiler, it has no "target".
104+
105+* Since `g++` is written in C, the `gcc` compiler used to compile it is a "build→ host" dependency of `g++` with a triple of `(foo, foo, bar)`. This compiler runs on the build platform and emits code for the host platform.
106+
107+* `gcc` links against the build platform's `glibc` C library, which is a "build→ *" dependency with a triple of `(foo, foo, *)`. Since it is a library, not a compiler, it has no "target".
108+
109+* This `gcc` is itself compiled by an *earlier* copy of `gcc`. This earlier copy of `gcc` is a "build→ build" dependency of `g++` with a triple of `(foo, foo, foo)`. This "early `gcc`" runs on the build platform and emits code for the build platform.
110+
111+* `g++` is bundled with `libgcc`, which includes a collection of target-machine routines for exception handling and
112+software floating point emulation. `libgcc` would be a "target→ *" dependency with triple `(foo, baz, *)`, because it consists of machine code which gets linked against the output of the compiler that we are building. It is a library, not a compiler, so it has no target of its own.
113+
114+* `libgcc` is written in C and compiled with `gcc`. The `gcc` that compiles it will be a "build→ target" dependency with triple `(foo, foo, baz)`. It gets compiled *and run* at `g++`-build-time (on platform `foo`), but must emit code for the `baz`-platform.
115+
116+* `g++` allows inline assembler code, so it depends on access to a copy of the `gas` assembler. This would be a "host→ target" dependency with triple `(foo, bar, baz)`.
117+
118+* `g++` (and `gcc`) include a library `libgccjit.so`, which wrap the compiler in a library to create a just-in-time compiler. In nixpkgs, this library is in the `libgccjit` package; if C++ required that programs have access to a JIT, `g++` would need to add a "target→ target" dependency for `libgccjit` with triple `(foo, baz, baz)`. This would ensure that the compiler ships with a copy of `libgccjit` which both executes on and generates code for the `baz`-platform.
119+
120+* If `g++` itself linked against `libgccjit.so` (for example, to allow compile-time-evaluated C++ expressions), then the `libgccjit` package used to provide this functionality would be a "host→ host" dependency of `g++`: it is code which runs on the `host` and emits code for execution on the `host`.
121+
122+### Cross packaging cookbook {#ssec-cross-cookbook}
123+
124+Some frequently encountered problems when packaging for cross-compilation should be answered here. Ideally, the information above is exhaustive, so this section cannot provide any new information, but it is ludicrous and cruel to expect everyone to spend effort working through the interaction of many features just to figure out the same answer to the same common problem. Feel free to add to this list!
125+
126+#### My package fails to find a binutils command (`cc`/`ar`/`ld` etc.) {#cross-qa-fails-to-find-binutils}
127+Many packages assume that an unprefixed binutils (`cc`/`ar`/`ld` etc.) is available, but Nix doesn't provide one. It only provides a prefixed one, just as it only does for all the other binutils programs. It may be necessary to patch the package to fix the build system to use a prefix. For instance, instead of `cc`, use `${stdenv.cc.targetPrefix}cc`.
128+
129+```nix
130+makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
131+```
132+
133+#### How do I avoid compiling a GCC cross-compiler from source? {#cross-qa-avoid-compiling-gcc-cross-compiler}
134+On less powerful machines, it can be inconvenient to cross-compile a package only to find out that GCC has to be compiled from source, which could take up to several hours. Nixpkgs maintains a limited [cross-related jobset on Hydra](https://hydra.nixos.org/jobset/nixpkgs/cross-trunk), which tests cross-compilation to various platforms from build platforms "x86\_64-darwin", "x86\_64-linux", and "aarch64-linux". See `pkgs/top-level/release-cross.nix` for the full list of target platforms and packages. For instance, the following invocation fetches the pre-built cross-compiled GCC for `armv6l-unknown-linux-gnueabihf` and builds GNU Hello from source.
135+
136+```ShellSession
137+$ nix-build '<nixpkgs>' -A pkgsCross.raspberryPi.hello
138+```
139+
140+#### What if my package’s build system needs to build a C program to be run under the build environment? {#cross-qa-build-c-program-in-build-environment}
141+
142+Add the following to your `mkDerivation` invocation.
143+
144+```nix
145+depsBuildBuild = [ buildPackages.stdenv.cc ];
146+```
147+
148+#### My package’s testsuite needs to run host platform code. {#cross-testsuite-runs-host-code}
149+
150+Add the following to your `mkDerivation` invocation.
151+
152+```nix
153+doCheck = stdenv.hostPlatform == stdenv.buildPlatform;
154+```
155+
156+## Cross-building packages {#sec-cross-usage}
157+
158+Nixpkgs can be instantiated with `localSystem` alone, in which case there is no cross-compiling and everything is built by and for that system, or also with `crossSystem`, in which case packages run on the latter, but all building happens on the former. Both parameters take the same schema as the 3 (build, host, and target) platforms defined in the previous section. As mentioned above, `lib.systems.examples` has some platforms which are used as arguments for these parameters in practice. You can use them programmatically, or on the command line:
159+
160+```ShellSession
161+$ nix-build '<nixpkgs>' --arg crossSystem '(import <nixpkgs/lib>).systems.examples.fooBarBaz' -A whatever
162+```
163+
164+::: {.note}
165+Eventually we would like to make these platform examples an unnecessary convenience so that
166+
167+```ShellSession
168+$ nix-build '<nixpkgs>' --arg crossSystem '{ config = "<arch>-<os>-<vendor>-<abi>"; }' -A whatever
169+```
170+
171+works in the vast majority of cases. The problem today is dependencies on other sorts of configuration which aren't given proper defaults. We rely on the examples to crudely to set those configuration parameters in some vaguely sane manner on the users behalf. Issue [\#34274](https://github.com/NixOS/nixpkgs/issues/34274) tracks this inconvenience along with its root cause in crufty configuration options.
172+:::
173+
174+While one is free to pass both parameters in full, there's a lot of logic to fill in missing fields. As discussed in the previous section, only one of `system`, `config`, and `parsed` is needed to infer the other two. Additionally, `libc` will be inferred from `parse`. Finally, `localSystem.system` is also _impurely_ inferred based on the platform evaluation occurs. This means it is often not necessary to pass `localSystem` at all, as in the command-line example in the previous paragraph.
175+
176+::: {.note}
177+Many sources (manual, wiki, etc) probably mention passing `system`, `platform`, along with the optional `crossSystem` to Nixpkgs: `import <nixpkgs> { system = ..; platform = ..; crossSystem = ..; }`. Passing those two instead of `localSystem` is still supported for compatibility, but is discouraged. Indeed, much of the inference we do for these parameters is motivated by compatibility as much as convenience.
178+:::
179+
180+One would think that `localSystem` and `crossSystem` overlap horribly with the three `*Platforms` (`buildPlatform`, `hostPlatform,` and `targetPlatform`; see `stage.nix` or the manual). Actually, those identifiers are purposefully not used here to draw a subtle but important distinction: While the granularity of having 3 platforms is necessary to properly *build* packages, it is overkill for specifying the user's *intent* when making a build plan or package set. A simple "build vs deploy" dichotomy is adequate: the sliding window principle described in the previous section shows how to interpolate between the these two "end points" to get the 3 platform triple for each bootstrapping stage. That means for any package a given package set, even those not bound on the top level but only reachable via dependencies or `buildPackages`, the three platforms will be defined as one of `localSystem` or `crossSystem`, with the former replacing the latter as one traverses build-time dependencies. A last simple difference is that `crossSystem` should be null when one doesn't want to cross-compile, while the `*Platform`s are always non-null. `localSystem` is always non-null.
181+
182+## Cross-compilation infrastructure {#sec-cross-infra}
183+
184+### Implementation of dependencies {#ssec-cross-dependency-implementation}
185+
186+The categories of dependencies developed in [](#ssec-cross-dependency-categorization) are specified as lists of derivations given to `mkDerivation`, as documented in [](#ssec-stdenv-dependencies). In short, each list of dependencies for "host → target" is called `deps<host><target>` (where `host`, and `target` values are either `build`, `host`, or `target`), with exceptions for backwards compatibility that `depsBuildHost` is instead called `nativeBuildInputs` and `depsHostTarget` is instead called `buildInputs`. Nixpkgs is now structured so that each `deps<host><target>` is automatically taken from `pkgs<host><target>`. (These `pkgs<host><target>`s are quite new, so there is no special case for `nativeBuildInputs` and `buildInputs`.) For example, `pkgsBuildHost.gcc` should be used at build-time, while `pkgsHostTarget.gcc` should be used at run-time.
187+
188+Now, for most of Nixpkgs's history, there were no `pkgs<host><target>` attributes, and most packages have not been refactored to use it explicitly. Prior to those, there were just `buildPackages`, `pkgs`, and `targetPackages`. Those are now redefined as aliases to `pkgsBuildHost`, `pkgsHostTarget`, and `pkgsTargetTarget`. It is acceptable, even recommended, to use them for libraries to show that the host platform is irrelevant.
189+
190+But before that, there was just `pkgs`, even though both `buildInputs` and `nativeBuildInputs` existed. \[Cross barely worked, and those were implemented with some hacks on `mkDerivation` to override dependencies.\] What this means is the vast majority of packages do not use any explicit package set to populate their dependencies, just using whatever `callPackage` gives them even if they do correctly sort their dependencies into the multiple lists described above. And indeed, asking that users both sort their dependencies, _and_ take them from the right attribute set, is both too onerous and redundant, so the recommended approach (for now) is to continue just categorizing by list and not using an explicit package set.
191+
192+To make this work, we "splice" together the six `pkgsFooBar` package sets and have `callPackage` actually take its arguments from that. This is currently implemented in `pkgs/top-level/splice.nix`. `mkDerivation` then, for each dependency attribute, pulls the right derivation out from the splice. This splicing can be skipped when not cross-compiling as the package sets are the same, but still is a bit slow for cross-compiling. We'd like to do something better, but haven't come up with anything yet.
193+
194+### Bootstrapping {#ssec-bootstrapping}
195+
196+Each of the package sets described above come from a single bootstrapping stage. While `pkgs/top-level/default.nix`, coordinates the composition of stages at a high level, `pkgs/top-level/stage.nix` "ties the knot" (creates the fixed point) of each stage. The package sets are defined per-stage however, so they can be thought of as edges between stages (the nodes) in a graph. Compositions like `pkgsBuildTarget.targetPackages` can be thought of as paths to this graph.
197+
198+While there are many package sets, and thus many edges, the stages can also be arranged in a linear chain. In other words, many of the edges are redundant as far as connectivity is concerned. This hinges on the type of bootstrapping we do. Currently for cross it is:
199+
200+1. `(native, native, native)`
201+
202+2. `(native, native, foreign)`
203+
204+3. `(native, foreign, foreign)`
205+
206+In each stage, `pkgsBuildHost` refers to the previous stage, `pkgsBuildBuild` refers to the one before that, and `pkgsHostTarget` refers to the current one, and `pkgsTargetTarget` refers to the next one. When there is no previous or next stage, they instead refer to the current stage. Note how all the invariants regarding the mapping between dependency and depending packages' build host and target platforms are preserved. `pkgsBuildTarget` and `pkgsHostHost` are more complex in that the stage fitting the requirements isn't always a fixed chain of "prevs" and "nexts" away (modulo the "saturating" self-references at the ends). We just special case each instead. All the primary edges are implemented is in `pkgs/stdenv/booter.nix`, and secondarily aliases in `pkgs/top-level/stage.nix`.
207+
208+::: {.note}
209+The native stages are bootstrapped in legacy ways that predate the current cross implementation. This is why the bootstrapping stages leading up to the final stages are ignored in the previous paragraph.
210+:::
211+
212+If one looks at the 3 platform triples, one can see that they overlap such that one could put them together into a chain like:
213+```
214+(native, native, native, foreign, foreign)
215+```
216+
217+If one imagines the saturating self references at the end being replaced with infinite stages, and then overlays those platform triples, one ends up with the infinite tuple:
218+```
219+(native..., native, native, native, foreign, foreign, foreign...)
220+```
221+One can then imagine any sequence of platforms such that there are bootstrap stages with their 3 platforms determined by "sliding a window" that is the 3 tuple through the sequence. This was the original model for bootstrapping. Without a target platform (assume a better world where all compilers are multi-target and all standard libraries are built in their own derivation), this is sufficient. Conversely if one wishes to cross compile "faster", with a "Canadian Cross" bootstrapping stage where `build != host != target`, more bootstrapping stages are needed since no sliding window provides the pesky `pkgsBuildTarget` package set since it skips the Canadian cross stage's "host".
222+
223+
224+::: {.note}
225+It is much better to refer to `buildPackages` than `targetPackages`, or more broadly package sets that do not mention “target”. There are three reasons for this.
226+
227+First, it is because bootstrapping stages do not have a unique `targetPackages`. For example a `(x86-linux, x86-linux, arm-linux)` and `(x86-linux, x86-linux, x86-windows)` package set both have a `(x86-linux, x86-linux, x86-linux)` package set. Because there is no canonical `targetPackages` for such a native (`build == host == target`) package set, we set their `targetPackages`
228+
229+Second, it is because this is a frequent source of hard-to-follow "infinite recursions" / cycles. When only package sets that don't mention target are used, the package set forms a directed acyclic graph. This means that all cycles that exist are confined to one stage. This means they are a lot smaller, and easier to follow in the code or a backtrace. It also means they are present in native and cross builds alike, and so more likely to be caught by CI and other users.
230+
231+Thirdly, it is because everything target-mentioning only exists to accommodate compilers with lousy build systems that insist on the compiler itself and standard library being built together. Of course that is bad because bigger derivations means longer rebuilds. It is also problematic because it tends to make the standard libraries less like other libraries than they could be, complicating code and build systems alike. Because of the other problems, and because of these innate disadvantages, compilers ought to be packaged another way where possible.
232+:::
233+
234+::: {.note}
235+If one explores Nixpkgs, they will see derivations with names like `gccCross`. Such `*Cross` derivations is a holdover from before we properly distinguished between the host and target platforms—the derivation with “Cross” in the name covered the `build = host != target` case, while the other covered the `host = target`, with build platform the same or not based on whether one was using its `.nativeDrv` or `.crossDrv`. This ugliness will disappear soon.
236+:::
doc/stdenv/cross-compilation.xmldeleted−394
@@ -1,394 +0,0 @@
1−<chapter xmlns="http://docbook.org/ns/docbook"
2− xmlns:xlink="http://www.w3.org/1999/xlink"
3− xml:id="chap-cross">
4− <title>Cross-compilation</title>
5− <section xml:id="sec-cross-intro">
6− <title>Introduction</title>
7−
8− <para>
9− "Cross-compilation" means compiling a program on one machine for another type of machine. For example, a typical use of cross-compilation is to compile programs for embedded devices. These devices often don't have the computing power and memory to compile their own programs. One might think that cross-compilation is a fairly niche concern. However, there are significant advantages to rigorously distinguishing between build-time and run-time environments! Significant, because the benefits apply even when one is developing and deploying on the same machine. Nixpkgs is increasingly adopting the opinion that packages should be written with cross-compilation in mind, and nixpkgs should evaluate in a similar way (by minimizing cross-compilation-specific special cases) whether or not one is cross-compiling.
10− </para>
11−
12− <para>
13− This chapter will be organized in three parts. First, it will describe the basics of how to package software in a way that supports cross-compilation. Second, it will describe how to use Nixpkgs when cross-compiling. Third, it will describe the internal infrastructure supporting cross-compilation.
14− </para>
15− </section>
16−<!--============================================================-->
17− <section xml:id="sec-cross-packaging">
18− <title>Packaging in a cross-friendly manner</title>
19−
20− <section xml:id="ssec-cross-platform-parameters">
21− <title>Platform parameters</title>
22−
23− <para>
24− Nixpkgs follows the <link
25− xlink:href="https://gcc.gnu.org/onlinedocs/gccint/Configure-Terms.html">conventions of GNU autoconf</link>. We distinguish between 3 types of platforms when building a derivation: <wordasword>build</wordasword>, <wordasword>host</wordasword>, and <wordasword>target</wordasword>. In summary, <wordasword>build</wordasword> is the platform on which a package is being built, <wordasword>host</wordasword> is the platform on which it will run. The third attribute, <wordasword>target</wordasword>, is relevant only for certain specific compilers and build tools.
26− </para>
27−
28− <para>
29− In Nixpkgs, these three platforms are defined as attribute sets under the names <literal>buildPlatform</literal>, <literal>hostPlatform</literal>, and <literal>targetPlatform</literal>. They are always defined as attributes in the standard environment. That means one can access them like:
30−<programlisting>{ stdenv, fooDep, barDep, .. }: ...stdenv.buildPlatform...</programlisting>
31− .
32− </para>
33−
34− <variablelist>
35− <varlistentry>
36− <term>
37− <varname>buildPlatform</varname>
38− </term>
39− <listitem>
40− <para>
41− The "build platform" is the platform on which a package is built. Once someone has a built package, or pre-built binary package, the build platform should not matter and can be ignored.
42− </para>
43− </listitem>
44− </varlistentry>
45− <varlistentry>
46− <term>
47− <varname>hostPlatform</varname>
48− </term>
49− <listitem>
50− <para>
51− The "host platform" is the platform on which a package will be run. This is the simplest platform to understand, but also the one with the worst name.
52− </para>
53− </listitem>
54− </varlistentry>
55− <varlistentry>
56− <term>
57− <varname>targetPlatform</varname>
58− </term>
59− <listitem>
60− <para>
61− The "target platform" attribute is, unlike the other two attributes, not actually fundamental to the process of building software. Instead, it is only relevant for compatibility with building certain specific compilers and build tools. It can be safely ignored for all other packages.
62− </para>
63− <para>
64− The build process of certain compilers is written in such a way that the compiler resulting from a single build can itself only produce binaries for a single platform. The task of specifying this single "target platform" is thus pushed to build time of the compiler. The root cause of this is that the compiler (which will be run on the host) and the standard library/runtime (which will be run on the target) are built by a single build process.
65− </para>
66− <para>
67− There is no fundamental need to think about a single target ahead of time like this. If the tool supports modular or pluggable backends, both the need to specify the target at build time and the constraint of having only a single target disappear. An example of such a tool is LLVM.
68− </para>
69− <para>
70− Although the existence of a "target platfom" is arguably a historical mistake, it is a common one: examples of tools that suffer from it are GCC, Binutils, GHC and Autoconf. Nixpkgs tries to avoid sharing in the mistake where possible. Still, because the concept of a target platform is so ingrained, it is best to support it as is.
71− </para>
72− </listitem>
73− </varlistentry>
74− </variablelist>
75−
76− <para>
77− The exact schema these fields follow is a bit ill-defined due to a long and convoluted evolution, but this is slowly being cleaned up. You can see examples of ones used in practice in <literal>lib.systems.examples</literal>; note how they are not all very consistent. For now, here are few fields can count on them containing:
78− </para>
79−
80− <variablelist>
81− <varlistentry>
82− <term>
83− <varname>system</varname>
84− </term>
85− <listitem>
86− <para>
87− This is a two-component shorthand for the platform. Examples of this would be "x86_64-darwin" and "i686-linux"; see <literal>lib.systems.doubles</literal> for more. The first component corresponds to the CPU architecture of the platform and the second to the operating system of the platform (<literal>[cpu]-[os]</literal>). This format has built-in support in Nix, such as the <varname>builtins.currentSystem</varname> impure string.
88− </para>
89− </listitem>
90− </varlistentry>
91− <varlistentry>
92− <term>
93− <varname>config</varname>
94− </term>
95− <listitem>
96− <para>
97− This is a 3- or 4- component shorthand for the platform. Examples of this would be <literal>x86_64-unknown-linux-gnu</literal> and <literal>aarch64-apple-darwin14</literal>. This is a standard format called the "LLVM target triple", as they are pioneered by LLVM. In the 4-part form, this corresponds to <literal>[cpu]-[vendor]-[os]-[abi]</literal>. This format is strictly more informative than the "Nix host double", as the previous format could analogously be termed. This needs a better name than <varname>config</varname>!
98− </para>
99− </listitem>
100− </varlistentry>
101− <varlistentry>
102− <term>
103− <varname>parsed</varname>
104− </term>
105− <listitem>
106− <para>
107− This is a Nix representation of a parsed LLVM target triple with white-listed components. This can be specified directly, or actually parsed from the <varname>config</varname>. See <literal>lib.systems.parse</literal> for the exact representation.
108− </para>
109− </listitem>
110− </varlistentry>
111− <varlistentry>
112− <term>
113− <varname>libc</varname>
114− </term>
115− <listitem>
116− <para>
117− This is a string identifying the standard C library used. Valid identifiers include "glibc" for GNU libc, "libSystem" for Darwin's Libsystem, and "uclibc" for µClibc. It should probably be refactored to use the module system, like <varname>parse</varname>.
118− </para>
119− </listitem>
120− </varlistentry>
121− <varlistentry>
122− <term>
123− <varname>is*</varname>
124− </term>
125− <listitem>
126− <para>
127− These predicates are defined in <literal>lib.systems.inspect</literal>, and slapped onto every platform. They are superior to the ones in <varname>stdenv</varname> as they force the user to be explicit about which platform they are inspecting. Please use these instead of those.
128− </para>
129− </listitem>
130− </varlistentry>
131− <varlistentry>
132− <term>
133− <varname>platform</varname>
134− </term>
135− <listitem>
136− <para>
137− This is, quite frankly, a dumping ground of ad-hoc settings (it's an attribute set). See <literal>lib.systems.platforms</literal> for examples—there's hopefully one in there that will work verbatim for each platform that is working. Please help us triage these flags and give them better homes!
138− </para>
139− </listitem>
140− </varlistentry>
141− </variablelist>
142− </section>
143−
144− <section xml:id="ssec-cross-dependency-categorization">
145− <title>Theory of dependency categorization</title>
146−
147− <note>
148− <para>
149− This is a rather philosophical description that isn't very Nixpkgs-specific. For an overview of all the relevant attributes given to <varname>mkDerivation</varname>, see <xref
150− linkend="ssec-stdenv-dependencies"/>. For a description of how everything is implemented, see <xref linkend="ssec-cross-dependency-implementation" />.
151− </para>
152− </note>
153−
154− <para>
155− In this section we explore the relationship between both runtime and build-time dependencies and the 3 Autoconf platforms.
156− </para>
157−
158− <para>
159− A run time dependency between two packages requires that their host platforms match. This is directly implied by the meaning of "host platform" and "runtime dependency": The package dependency exists while both packages are running on a single host platform.
160− </para>
161−
162− <para>
163− A build time dependency, however, has a shift in platforms between the depending package and the depended-on package. "build time dependency" means that to build the depending package we need to be able to run the depended-on's package. The depending package's build platform is therefore equal to the depended-on package's host platform.
164− </para>
165−
166− <para>
167− If both the dependency and depending packages aren't compilers or other machine-code-producing tools, we're done. And indeed <varname>buildInputs</varname> and <varname>nativeBuildInputs</varname> have covered these simpler build-time and run-time (respectively) changes for many years. But if the dependency does produce machine code, we might need to worry about its target platform too. In principle, that target platform might be any of the depending package's build, host, or target platforms, but we prohibit dependencies from a "later" platform to an earlier platform to limit confusion because we've never seen a legitimate use for them.
168− </para>
169−
170− <para>
171− Finally, if the depending package is a compiler or other machine-code-producing tool, it might need dependencies that run at "emit time". This is for compilers that (regrettably) insist on being built together with their source langauges' standard libraries. Assuming build != host != target, a run-time dependency of the standard library cannot be run at the compiler's build time or run time, but only at the run time of code emitted by the compiler.
172− </para>
173−
174− <para>
175− Putting this all together, that means we have dependencies in the form "host → target", in at most the following six combinations:
176− <table>
177− <caption>Possible dependency types</caption>
178− <thead>
179− <tr>
180− <th>Dependency's host platform</th>
181− <th>Dependency's target platform</th>
182− </tr>
183− </thead>
184− <tbody>
185− <tr>
186− <td>build</td>
187− <td>build</td>
188− </tr>
189− <tr>
190− <td>build</td>
191− <td>host</td>
192− </tr>
193− <tr>
194− <td>build</td>
195− <td>target</td>
196− </tr>
197− <tr>
198− <td>host</td>
199− <td>host</td>
200− </tr>
201− <tr>
202− <td>host</td>
203− <td>target</td>
204− </tr>
205− <tr>
206− <td>target</td>
207− <td>target</td>
208− </tr>
209− </tbody>
210− </table>
211− </para>
212−
213− <para>
214− Some examples will make this table clearer. Suppose there's some package that is being built with a <literal>(build, host, target)</literal> platform triple of <literal>(foo, bar, baz)</literal>. If it has a build-time library dependency, that would be a "host → build" dependency with a triple of <literal>(foo, foo, *)</literal> (the target platform is irrelevant). If it needs a compiler to be built, that would be a "build → host" dependency with a triple of <literal>(foo, foo, *)</literal> (the target platform is irrelevant). That compiler, would be built with another compiler, also "build → host" dependency, with a triple of <literal>(foo, foo, foo)</literal>.
215− </para>
216− </section>
217−
218− <section xml:id="ssec-cross-cookbook">
219− <title>Cross packaging cookbook</title>
220−
221− <para>
222− Some frequently encountered problems when packaging for cross-compilation should be answered here. Ideally, the information above is exhaustive, so this section cannot provide any new information, but it is ludicrous and cruel to expect everyone to spend effort working through the interaction of many features just to figure out the same answer to the same common problem. Feel free to add to this list!
223− </para>
224−
225− <qandaset>
226− <qandaentry xml:id="cross-qa-build-c-program-in-build-environment">
227− <question>
228− <para>
229− What if my package's build system needs to build a C program to be run under the build environment?
230− </para>
231− </question>
232− <answer>
233− <para>
234−<programlisting>depsBuildBuild = [ buildPackages.stdenv.cc ];</programlisting>
235− Add it to your <function>mkDerivation</function> invocation.
236− </para>
237− </answer>
238− </qandaentry>
239− <qandaentry xml:id="cross-qa-fails-to-find-ar">
240− <question>
241− <para>
242− My package fails to find <command>ar</command>.
243− </para>
244− </question>
245− <answer>
246− <para>
247− Many packages assume that an unprefixed <command>ar</command> is available, but Nix doesn't provide one. It only provides a prefixed one, just as it only does for all the other binutils programs. It may be necessary to patch the package to fix the build system to use a prefixed <command>ar</command>.
248− </para>
249− </answer>
250− </qandaentry>
251− <qandaentry xml:id="cross-testsuite-runs-host-code">
252− <question>
253− <para>
254− My package's testsuite needs to run host platform code.
255− </para>
256− </question>
257− <answer>
258− <para>
259−<programlisting>doCheck = stdenv.hostPlatform == stdenv.buildPlatfrom;</programlisting>
260− Add it to your <function>mkDerivation</function> invocation.
261− </para>
262− </answer>
263− </qandaentry>
264− </qandaset>
265− </section>
266− </section>
267−<!--============================================================-->
268− <section xml:id="sec-cross-usage">
269− <title>Cross-building packages</title>
270−
271− <para>
272− Nixpkgs can be instantiated with <varname>localSystem</varname> alone, in which case there is no cross-compiling and everything is built by and for that system, or also with <varname>crossSystem</varname>, in which case packages run on the latter, but all building happens on the former. Both parameters take the same schema as the 3 (build, host, and target) platforms defined in the previous section. As mentioned above, <literal>lib.systems.examples</literal> has some platforms which are used as arguments for these parameters in practice. You can use them programmatically, or on the command line:
273−<programlisting>
274−nix-build '&lt;nixpkgs&gt;' --arg crossSystem '(import &lt;nixpkgs/lib&gt;).systems.examples.fooBarBaz' -A whatever</programlisting>
275− </para>
276−
277− <note>
278− <para>
279− Eventually we would like to make these platform examples an unnecessary convenience so that
280−<programlisting>
281−nix-build '&lt;nixpkgs&gt;' --arg crossSystem '{ config = "&lt;arch&gt;-&lt;os&gt;-&lt;vendor&gt;-&lt;abi&gt;"; }' -A whatever</programlisting>
282− works in the vast majority of cases. The problem today is dependencies on other sorts of configuration which aren't given proper defaults. We rely on the examples to crudely to set those configuration parameters in some vaguely sane manner on the users behalf. Issue <link xlink:href="https://github.com/NixOS/nixpkgs/issues/34274">#34274</link> tracks this inconvenience along with its root cause in crufty configuration options.
283− </para>
284− </note>
285−
286− <para>
287− While one is free to pass both parameters in full, there's a lot of logic to fill in missing fields. As discussed in the previous section, only one of <varname>system</varname>, <varname>config</varname>, and <varname>parsed</varname> is needed to infer the other two. Additionally, <varname>libc</varname> will be inferred from <varname>parse</varname>. Finally, <literal>localSystem.system</literal> is also <emphasis>impurely</emphasis> inferred based on the platform evaluation occurs. This means it is often not necessary to pass <varname>localSystem</varname> at all, as in the command-line example in the previous paragraph.
288− </para>
289−
290− <note>
291− <para>
292− Many sources (manual, wiki, etc) probably mention passing <varname>system</varname>, <varname>platform</varname>, along with the optional <varname>crossSystem</varname> to nixpkgs: <literal>import &lt;nixpkgs&gt; { system = ..; platform = ..; crossSystem = ..; }</literal>. Passing those two instead of <varname>localSystem</varname> is still supported for compatibility, but is discouraged. Indeed, much of the inference we do for these parameters is motivated by compatibility as much as convenience.
293− </para>
294− </note>
295−
296− <para>
297− One would think that <varname>localSystem</varname> and <varname>crossSystem</varname> overlap horribly with the three <varname>*Platforms</varname> (<varname>buildPlatform</varname>, <varname>hostPlatform,</varname> and <varname>targetPlatform</varname>; see <varname>stage.nix</varname> or the manual). Actually, those identifiers are purposefully not used here to draw a subtle but important distinction: While the granularity of having 3 platforms is necessary to properly *build* packages, it is overkill for specifying the user's *intent* when making a build plan or package set. A simple "build vs deploy" dichotomy is adequate: the sliding window principle described in the previous section shows how to interpolate between the these two "end points" to get the 3 platform triple for each bootstrapping stage. That means for any package a given package set, even those not bound on the top level but only reachable via dependencies or <varname>buildPackages</varname>, the three platforms will be defined as one of <varname>localSystem</varname> or <varname>crossSystem</varname>, with the former replacing the latter as one traverses build-time dependencies. A last simple difference is that <varname>crossSystem</varname> should be null when one doesn't want to cross-compile, while the <varname>*Platform</varname>s are always non-null. <varname>localSystem</varname> is always non-null.
298− </para>
299− </section>
300−<!--============================================================-->
301− <section xml:id="sec-cross-infra">
302− <title>Cross-compilation infrastructure</title>
303−
304− <section xml:id="ssec-cross-dependency-implementation">
305− <title>Implementation of dependencies</title>
306−
307− <para>
308− The categorizes of dependencies developed in <xref
309− linkend="ssec-cross-dependency-categorization"/> are specified as lists of derivations given to <varname>mkDerivation</varname>, as documented in <xref linkend="ssec-stdenv-dependencies"/>. In short, each list of dependencies for "host → target" of "foo → bar" is called <varname>depsFooBar</varname>, with exceptions for backwards compatibility that <varname>depsBuildHost</varname> is instead called <varname>nativeBuildInputs</varname> and <varname>depsHostTarget</varname> is instead called <varname>buildInputs</varname>. Nixpkgs is now structured so that each <varname>depsFooBar</varname> is automatically taken from <varname>pkgsFooBar</varname>. (These <varname>pkgsFooBar</varname>s are quite new, so there is no special case for <varname>nativeBuildInputs</varname> and <varname>buildInputs</varname>.) For example, <varname>pkgsBuildHost.gcc</varname> should be used at build-time, while <varname>pkgsHostTarget.gcc</varname> should be used at run-time.
310− </para>
311−
312− <para>
313− Now, for most of Nixpkgs's history, there were no <varname>pkgsFooBar</varname> attributes, and most packages have not been refactored to use it explicitly. Prior to those, there were just <varname>buildPackages</varname>, <varname>pkgs</varname>, and <varname>targetPackages</varname>. Those are now redefined as aliases to <varname>pkgsBuildHost</varname>, <varname>pkgsHostTarget</varname>, and <varname>pkgsTargetTarget</varname>. It is acceptable, even recommended, to use them for libraries to show that the host platform is irrelevant.
314− </para>
315−
316− <para>
317− But before that, there was just <varname>pkgs</varname>, even though both <varname>buildInputs</varname> and <varname>nativeBuildInputs</varname> existed. [Cross barely worked, and those were implemented with some hacks on <varname>mkDerivation</varname> to override dependencies.] What this means is the vast majority of packages do not use any explicit package set to populate their dependencies, just using whatever <varname>callPackage</varname> gives them even if they do correctly sort their dependencies into the multiple lists described above. And indeed, asking that users both sort their dependencies, <emphasis>and</emphasis> take them from the right attribute set, is both too onerous and redundant, so the recommended approach (for now) is to continue just categorizing by list and not using an explicit package set.
318− </para>
319−
320− <para>
321− To make this work, we "splice" together the six <varname>pkgsFooBar</varname> package sets and have <varname>callPackage</varname> actually take its arguments from that. This is currently implemented in <filename>pkgs/top-level/splice.nix</filename>. <varname>mkDerivation</varname> then, for each dependency attribute, pulls the right derivation out from the splice. This splicing can be skipped when not cross-compiling as the package sets are the same, but still is a bit slow for cross-compiling. We'd like to do something better, but haven't come up with anything yet.
322− </para>
323− </section>
324−
325− <section xml:id="ssec-bootstrapping">
326− <title>Bootstrapping</title>
327−
328− <para>
329− Each of the package sets described above come from a single bootstrapping stage. While <filename>pkgs/top-level/default.nix</filename>, coordinates the composition of stages at a high level, <filename>pkgs/top-level/stage.nix</filename> "ties the knot" (creates the fixed point) of each stage. The package sets are defined per-stage however, so they can be thought of as edges between stages (the nodes) in a graph. Compositions like <literal>pkgsBuildTarget.targetPackages</literal> can be thought of as paths to this graph.
330− </para>
331−
332− <para>
333− While there are many package sets, and thus many edges, the stages can also be arranged in a linear chain. In other words, many of the edges are redundant as far as connectivity is concerned. This hinges on the type of bootstrapping we do. Currently for cross it is:
334− <orderedlist>
335− <listitem>
336− <para>
337− <literal>(native, native, native)</literal>
338− </para>
339− </listitem>
340− <listitem>
341− <para>
342− <literal>(native, native, foreign)</literal>
343− </para>
344− </listitem>
345− <listitem>
346− <para>
347− <literal>(native, foreign, foreign)</literal>
348− </para>
349− </listitem>
350− </orderedlist>
351− In each stage, <varname>pkgsBuildHost</varname> refers to the previous stage, <varname>pkgsBuildBuild</varname> refers to the one before that, and <varname>pkgsHostTarget</varname> refers to the current one, and <varname>pkgsTargetTarget</varname> refers to the next one. When there is no previous or next stage, they instead refer to the current stage. Note how all the invariants regarding the mapping between dependency and depending packages' build host and target platforms are preserved. <varname>pkgsBuildTarget</varname> and <varname>pkgsHostHost</varname> are more complex in that the stage fitting the requirements isn't always a fixed chain of "prevs" and "nexts" away (modulo the "saturating" self-references at the ends). We just special case each instead. All the primary edges are implemented is in <filename>pkgs/stdenv/booter.nix</filename>, and secondarily aliases in <filename>pkgs/top-level/stage.nix</filename>.
352− </para>
353−
354− <note>
355− <para>
356− Note the native stages are bootstrapped in legacy ways that predate the current cross implementation. This is why the bootstrapping stages leading up to the final stages are ignored inthe previous paragraph.
357− </para>
358− </note>
359−
360− <para>
361− If one looks at the 3 platform triples, one can see that they overlap such that one could put them together into a chain like:
362−<programlisting>
363−(native, native, native, foreign, foreign)
364−</programlisting>
365− If one imagines the saturating self references at the end being replaced with infinite stages, and then overlays those platform triples, one ends up with the infinite tuple:
366−<programlisting>
367−(native..., native, native, native, foreign, foreign, foreign...)
368−</programlisting>
369− On can then imagine any sequence of platforms such that there are bootstrap stages with their 3 platforms determined by "sliding a window" that is the 3 tuple through the sequence. This was the original model for bootstrapping. Without a target platform (assume a better world where all compilers are multi-target and all standard libraries are built in their own derivation), this is sufficient. Conversely if one wishes to cross compile "faster", with a "Canadian Cross" bootstraping stage where <literal>build != host != target</literal>, more bootstrapping stages are needed since no sliding window providess the pesky <varname>pkgsBuildTarget</varname> package set since it skips the Canadian cross stage's "host".
370− </para>
371−
372− <note>
373− <para>
374− It is much better to refer to <varname>buildPackages</varname> than <varname>targetPackages</varname>, or more broadly package sets that do not mention "target". There are three reasons for this.
375− </para>
376− <para>
377− First, it is because bootstrapping stages do not have a unique <varname>targetPackages</varname>. For example a <literal>(x86-linux, x86-linux, arm-linux)</literal> and <literal>(x86-linux, x86-linux, x86-windows)</literal> package set both have a <literal>(x86-linux, x86-linux, x86-linux)</literal> package set. Because there is no canonical <varname>targetPackages</varname> for such a native (<literal>build == host == target</literal>) package set, we set their <varname>targetPackages</varname>
378− </para>
379− <para>
380− Second, it is because this is a frequent source of hard-to-follow "infinite recursions" / cycles. When only package sets that don't mention target are used, the package set forms a directed acyclic graph. This means that all cycles that exist are confined to one stage. This means they are a lot smaller, and easier to follow in the code or a backtrace. It also means they are present in native and cross builds alike, and so more likely to be caught by CI and other users.
381− </para>
382− <para>
383− Thirdly, it is because everything target-mentioning only exists to accommodate compilers with lousy build systems that insist on the compiler itself and standard library being built together. Of course that is bad because bigger derivations means longer rebuilds. It is also problematic because it tends to make the standard libraries less like other libraries than they could be, complicating code and build systems alike. Because of the other problems, and because of these innate disadvantages, compilers ought to be packaged another way where possible.
384− </para>
385− </note>
386−
387− <note>
388− <para>
389− If one explores Nixpkgs, they will see derivations with names like <literal>gccCross</literal>. Such <literal>*Cross</literal> derivations is a holdover from before we properly distinguished between the host and target platforms—the derivation with "Cross" in the name covered the <literal>build = host != target</literal> case, while the other covered the <literal>host = target</literal>, with build platform the same or not based on whether one was using its <literal>.nativeDrv</literal> or <literal>.crossDrv</literal>. This ugliness will disappear soon.
390− </para>
391− </note>
392− </section>
393− </section>
394−</chapter>
doc/stdenv/meta.chapter.mdnew file+251
@@ -0,0 +1,251 @@
1+# Meta-attributes {#chap-meta}
2+
3+Nix packages can declare *meta-attributes* that contain information about a package such as a description, its homepage, its license, and so on. For instance, the GNU Hello package has a `meta` declaration like this:
4+
5+```nix
6+meta = with lib; {
7+ description = "A program that produces a familiar, friendly greeting";
8+ longDescription = ''
9+ GNU Hello is a program that prints "Hello, world!" when you run it.
10+ It is fully customizable.
11+ '';
12+ homepage = "https://www.gnu.org/software/hello/manual/";
13+ license = licenses.gpl3Plus;
14+ maintainers = [ maintainers.eelco ];
15+ platforms = platforms.all;
16+};
17+```
18+
19+Meta-attributes are not passed to the builder of the package. Thus, a change to a meta-attribute doesn’t trigger a recompilation of the package. The value of a meta-attribute must be a string.
20+
21+The meta-attributes of a package can be queried from the command-line using `nix-env`:
22+
23+```ShellSession
24+$ nix-env -qa hello --json
25+{
26+ "hello": {
27+ "meta": {
28+ "description": "A program that produces a familiar, friendly greeting",
29+ "homepage": "https://www.gnu.org/software/hello/manual/",
30+ "license": {
31+ "fullName": "GNU General Public License version 3 or later",
32+ "shortName": "GPLv3+",
33+ "url": "http://www.fsf.org/licensing/licenses/gpl.html"
34+ },
35+ "longDescription": "GNU Hello is a program that prints \"Hello, world!\" when you run it.\nIt is fully customizable.\n",
36+ "maintainers": [
37+ "Ludovic Court\u00e8s <ludo@gnu.org>"
38+ ],
39+ "platforms": [
40+ "i686-linux",
41+ "x86_64-linux",
42+ "armv5tel-linux",
43+ "armv7l-linux",
44+ "mips32-linux",
45+ "x86_64-darwin",
46+ "i686-cygwin",
47+ "i686-freebsd",
48+ "x86_64-freebsd",
49+ "i686-openbsd",
50+ "x86_64-openbsd"
51+ ],
52+ "position": "/home/user/dev/nixpkgs/pkgs/applications/misc/hello/default.nix:14"
53+ },
54+ "name": "hello-2.9",
55+ "system": "x86_64-linux"
56+ }
57+}
58+```
59+
60+`nix-env` knows about the `description` field specifically:
61+
62+```ShellSession
63+$ nix-env -qa hello --description
64+hello-2.3 A program that produces a familiar, friendly greeting
65+```
66+
67+## Standard meta-attributes {#sec-standard-meta-attributes}
68+
69+It is expected that each meta-attribute is one of the following:
70+
71+### `description` {#var-meta-description}
72+
73+A short (one-line) description of the package. This is shown by `nix-env -q --description` and also on the Nixpkgs release pages.
74+
75+Don’t include a period at the end. Don’t include newline characters. Capitalise the first character. For brevity, don’t repeat the name of package --- just describe what it does.
76+
77+Wrong: `"libpng is a library that allows you to decode PNG images."`
78+
79+Right: `"A library for decoding PNG images"`
80+
81+### `longDescription` {#var-meta-longDescription}
82+
83+An arbitrarily long description of the package.
84+
85+### `branch` {#var-meta-branch}
86+
87+Release branch. Used to specify that a package is not going to receive updates that are not in this branch; for example, Linux kernel 3.0 is supposed to be updated to 3.0.X, not 3.1.
88+
89+### `homepage` {#var-meta-homepage}
90+
91+The package’s homepage. Example: `https://www.gnu.org/software/hello/manual/`
92+
93+### `downloadPage` {#var-meta-downloadPage}
94+
95+The page where a link to the current version can be found. Example: `https://ftp.gnu.org/gnu/hello/`
96+
97+### `changelog` {#var-meta-changelog}
98+
99+A link or a list of links to the location of Changelog for a package. A link may use expansion to refer to the correct changelog version. Example: `"https://git.savannah.gnu.org/cgit/hello.git/plain/NEWS?h=v${version}"`
100+
101+### `license` {#var-meta-license}
102+
103+The license, or licenses, for the package. One from the attribute set defined in [`nixpkgs/lib/licenses.nix`](https://github.com/NixOS/nixpkgs/blob/master/lib/licenses.nix). At this moment using both a list of licenses and a single license is valid. If the license field is in the form of a list representation, then it means that parts of the package are licensed differently. Each license should preferably be referenced by their attribute. The non-list attribute value can also be a space delimited string representation of the contained attribute `shortNames` or `spdxIds`. The following are all valid examples:
104+
105+- Single license referenced by attribute (preferred) `lib.licenses.gpl3Only`.
106+- Single license referenced by its attribute shortName (frowned upon) `"gpl3Only"`.
107+- Single license referenced by its attribute spdxId (frowned upon) `"GPL-3.0-only"`.
108+- Multiple licenses referenced by attribute (preferred) `with lib.licenses; [ asl20 free ofl ]`.
109+- Multiple licenses referenced as a space delimited string of attribute shortNames (frowned upon) `"asl20 free ofl"`.
110+
111+For details, see [Licenses](#sec-meta-license).
112+
113+### `maintainers` {#var-meta-maintainers}
114+
115+A list of the maintainers of this Nix expression. Maintainers are defined in [`nixpkgs/maintainers/maintainer-list.nix`](https://github.com/NixOS/nixpkgs/blob/master/maintainers/maintainer-list.nix). There is no restriction to becoming a maintainer, just add yourself to that list in a separate commit titled “maintainers: add alice”, and reference maintainers with `maintainers = with lib.maintainers; [ alice bob ]`.
116+
117+### `mainProgram` {#var-meta-mainProgram}
118+
119+The name of the main binary for the package. This effects the binary `nix run` executes and falls back to the name of the package. Example: `"rg"`
120+
121+### `priority` {#var-meta-priority}
122+
123+The *priority* of the package, used by `nix-env` to resolve file name conflicts between packages. See the Nix manual page for `nix-env` for details. Example: `"10"` (a low-priority package).
124+
125+### `platforms` {#var-meta-platforms}
126+
127+The list of Nix platform types on which the package is supported. Hydra builds packages according to the platform specified. If no platform is specified, the package does not have prebuilt binaries. An example is:
128+
129+```nix
130+meta.platforms = lib.platforms.linux;
131+```
132+
133+Attribute Set `lib.platforms` defines [various common lists](https://github.com/NixOS/nixpkgs/blob/master/lib/systems/doubles.nix) of platforms types.
134+
135+### `tests` {#var-meta-tests}
136+
137+::: {.warning}
138+This attribute is special in that it is not actually under the `meta` attribute set but rather under the `passthru` attribute set. This is due to how `meta` attributes work, and the fact that they are supposed to contain only metadata, not derivations.
139+:::
140+
141+An attribute set with tests as values. A test is a derivation that builds when the test passes and fails to build otherwise.
142+
143+You can run these tests with:
144+
145+```ShellSession
146+$ cd path/to/nixpkgs
147+$ nix-build -A your-package.tests
148+```
149+
150+#### Package tests
151+
152+Tests that are part of the source package are often executed in the `installCheckPhase`.
153+
154+Prefer `passthru.tests` for tests that are introduced in nixpkgs because:
155+
156+* `passthru.tests` tests the 'real' package, independently from the environment in which it was built
157+* we can run `passthru.tests` independently
158+* `installCheckPhase` adds overhead to each build
159+
160+For more on how to write and run package tests, see <xref linkend="sec-package-tests"/>.
161+
162+#### NixOS tests
163+
164+The NixOS tests are available as `nixosTests` in parameters of derivations. For instance, the OpenSMTPD derivation includes lines similar to:
165+
166+```nix
167+{ /* ... */, nixosTests }:
168+{
169+ # ...
170+ passthru.tests = {
171+ basic-functionality-and-dovecot-integration = nixosTests.opensmtpd;
172+ };
173+}
174+```
175+
176+NixOS tests run in a VM, so they are slower than regular package tests. For more information see [NixOS module tests](https://nixos.org/manual/nixos/stable/#sec-nixos-tests).
177+
178+Alternatively, you can specify other derivations as tests. You can make use of
179+the optional parameter to inject the correct package without
180+relying on non-local definitions, even in the presence of `overrideAttrs`.
181+Here that's `finalAttrs.finalPackage`, but you could choose a different name if
182+`finalAttrs` already exists in your scope.
183+
184+`(mypkg.overrideAttrs f).passthru.tests` will be as expected, as long as the
185+definition of `tests` does not rely on the original `mypkg` or overrides it in
186+all places.
187+
188+```nix
189+# my-package/default.nix
190+{ stdenv, callPackage }:
191+stdenv.mkDerivation (finalAttrs: {
192+ # ...
193+ passthru.tests.example = callPackage ./example.nix { my-package = finalAttrs.finalPackage; };
194+})
195+```
196+
197+```nix
198+# my-package/example.nix
199+{ runCommand, lib, my-package, ... }:
200+runCommand "my-package-test" {
201+ nativeBuildInputs = [ my-package ];
202+ src = lib.sources.sourcesByRegex ./. [ ".*.in" ".*.expected" ];
203+} ''
204+ my-package --help
205+ my-package <example.in >example.actual
206+ diff -U3 --color=auto example.expected example.actual
207+ mkdir $out
208+''
209+```
210+
211+
212+### `timeout` {#var-meta-timeout}
213+
214+A timeout (in seconds) for building the derivation. If the derivation takes longer than this time to build, it can fail due to breaking the timeout. However, all computers do not have the same computing power, hence some builders may decide to apply a multiplicative factor to this value. When filling this value in, try to keep it approximately consistent with other values already present in `nixpkgs`.
215+
216+### `hydraPlatforms` {#var-meta-hydraPlatforms}
217+
218+The list of Nix platform types for which the Hydra instance at `hydra.nixos.org` will build the package. (Hydra is the Nix-based continuous build system.) It defaults to the value of `meta.platforms`. Thus, the only reason to set `meta.hydraPlatforms` is if you want `hydra.nixos.org` to build the package on a subset of `meta.platforms`, or not at all, e.g.
219+
220+```nix
221+meta.platforms = lib.platforms.linux;
222+meta.hydraPlatforms = [];
223+```
224+
225+### `broken` {#var-meta-broken}
226+
227+If set to `true`, the package is marked as "broken", meaning that it won’t show up in `nix-env -qa`, and cannot be built or installed. Such packages should be removed from Nixpkgs eventually unless they are fixed.
228+
229+## Licenses {#sec-meta-license}
230+
231+The `meta.license` attribute should preferably contain a value from `lib.licenses` defined in [`nixpkgs/lib/licenses.nix`](https://github.com/NixOS/nixpkgs/blob/master/lib/licenses.nix), or in-place license description of the same format if the license is unlikely to be useful in another expression.
232+
233+Although it’s typically better to indicate the specific license, a few generic options are available:
234+
235+### `lib.licenses.free`, `"free"` {#lib.licenses.free-free}
236+
237+Catch-all for free software licenses not listed above.
238+
239+### `lib.licenses.unfreeRedistributable`, `"unfree-redistributable"` {#lib.licenses.unfreeredistributable-unfree-redistributable}
240+
241+Unfree package that can be redistributed in binary form. That is, it’s legal to redistribute the *output* of the derivation. This means that the package can be included in the Nixpkgs channel.
242+
243+Sometimes proprietary software can only be redistributed unmodified. Make sure the builder doesn’t actually modify the original binaries; otherwise we’re breaking the license. For instance, the NVIDIA X11 drivers can be redistributed unmodified, but our builder applies `patchelf` to make them work. Thus, its license is `"unfree"` and it cannot be included in the Nixpkgs channel.
244+
245+### `lib.licenses.unfree`, `"unfree"` {#lib.licenses.unfree-unfree}
246+
247+Unfree package that cannot be redistributed. You can build it yourself, but you cannot redistribute the output of the derivation. Thus it cannot be included in the Nixpkgs channel.
248+
249+### `lib.licenses.unfreeRedistributableFirmware`, `"unfree-redistributable-firmware"` {#lib.licenses.unfreeredistributablefirmware-unfree-redistributable-firmware}
250+
251+This package supplies unfree, redistributable firmware. This is a separate value from `unfree-redistributable` because not everybody cares whether firmware is free.
doc/stdenv/meta.xmldeleted−349
@@ -1,349 +0,0 @@
1−<chapter xmlns="http://docbook.org/ns/docbook"
2− xmlns:xlink="http://www.w3.org/1999/xlink"
3− xml:id="chap-meta">
4− <title>Meta-attributes</title>
5− <para>
6− Nix packages can declare <emphasis>meta-attributes</emphasis> that contain information about a package such as a description, its homepage, its license, and so on. For instance, the GNU Hello package has a <varname>meta</varname> declaration like this:
7−<programlisting>
8−meta = with stdenv.lib; {
9− description = "A program that produces a familiar, friendly greeting";
10− longDescription = ''
11− GNU Hello is a program that prints "Hello, world!" when you run it.
12− It is fully customizable.
13− '';
14− homepage = "https://www.gnu.org/software/hello/manual/";
15− license = licenses.gpl3Plus;
16− maintainers = [ maintainers.eelco ];
17− platforms = platforms.all;
18−};
19−</programlisting>
20− </para>
21− <para>
22− Meta-attributes are not passed to the builder of the package. Thus, a change to a meta-attribute doesn’t trigger a recompilation of the package. The value of a meta-attribute must be a string.
23− </para>
24− <para>
25− The meta-attributes of a package can be queried from the command-line using <command>nix-env</command>:
26−<screen>
27−<prompt>$ </prompt>nix-env -qa hello --json
28−{
29− "hello": {
30− "meta": {
31− "description": "A program that produces a familiar, friendly greeting",
32− "homepage": "https://www.gnu.org/software/hello/manual/",
33− "license": {
34− "fullName": "GNU General Public License version 3 or later",
35− "shortName": "GPLv3+",
36− "url": "http://www.fsf.org/licensing/licenses/gpl.html"
37− },
38− "longDescription": "GNU Hello is a program that prints \"Hello, world!\" when you run it.\nIt is fully customizable.\n",
39− "maintainers": [
40− "Ludovic Court\u00e8s &lt;ludo@gnu.org>"
41− ],
42− "platforms": [
43− "i686-linux",
44− "x86_64-linux",
45− "armv5tel-linux",
46− "armv7l-linux",
47− "mips32-linux",
48− "x86_64-darwin",
49− "i686-cygwin",
50− "i686-freebsd",
51− "x86_64-freebsd",
52− "i686-openbsd",
53− "x86_64-openbsd"
54− ],
55− "position": "/home/user/dev/nixpkgs/pkgs/applications/misc/hello/default.nix:14"
56− },
57− "name": "hello-2.9",
58− "system": "x86_64-linux"
59− }
60−}
61−
62−
63−</screen>
64− <command>nix-env</command> knows about the <varname>description</varname> field specifically:
65−<screen>
66−<prompt>$ </prompt>nix-env -qa hello --description
67−hello-2.3 A program that produces a familiar, friendly greeting
68−</screen>
69− </para>
70− <section xml:id="sec-standard-meta-attributes">
71− <title>Standard meta-attributes</title>
72−
73− <para>
74− It is expected that each meta-attribute is one of the following:
75− </para>
76−
77− <variablelist>
78− <varlistentry>
79− <term>
80− <varname>description</varname>
81− </term>
82− <listitem>
83− <para>
84− A short (one-line) description of the package. This is shown by <command>nix-env -q --description</command> and also on the Nixpkgs release pages.
85− </para>
86− <para>
87− Don’t include a period at the end. Don’t include newline characters. Capitalise the first character. For brevity, don’t repeat the name of package — just describe what it does.
88− </para>
89− <para>
90− Wrong: <literal>"libpng is a library that allows you to decode PNG images."</literal>
91− </para>
92− <para>
93− Right: <literal>"A library for decoding PNG images"</literal>
94− </para>
95− </listitem>
96− </varlistentry>
97− <varlistentry>
98− <term>
99− <varname>longDescription</varname>
100− </term>
101− <listitem>
102− <para>
103− An arbitrarily long description of the package.
104− </para>
105− </listitem>
106− </varlistentry>
107− <varlistentry>
108− <term>
109− <varname>branch</varname>
110− </term>
111− <listitem>
112− <para>
113− Release branch. Used to specify that a package is not going to receive updates that are not in this branch; for example, Linux kernel 3.0 is supposed to be updated to 3.0.X, not 3.1.
114− </para>
115− </listitem>
116− </varlistentry>
117− <varlistentry>
118− <term>
119− <varname>homepage</varname>
120− </term>
121− <listitem>
122− <para>
123− The package’s homepage. Example: <literal>https://www.gnu.org/software/hello/manual/</literal>
124− </para>
125− </listitem>
126− </varlistentry>
127− <varlistentry>
128− <term>
129− <varname>downloadPage</varname>
130− </term>
131− <listitem>
132− <para>
133− The page where a link to the current version can be found. Example: <literal>https://ftp.gnu.org/gnu/hello/</literal>
134− </para>
135− </listitem>
136− </varlistentry>
137− <varlistentry>
138− <term>
139− <varname>changelog</varname>
140− </term>
141− <listitem>
142− <para>
143− A link or a list of links to the location of Changelog for a package. A link may use expansion to refer to the correct changelog version. Example: <literal>"https://git.savannah.gnu.org/cgit/hello.git/plain/NEWS?h=v${version}"</literal>
144− </para>
145− </listitem>
146− </varlistentry>
147− <varlistentry>
148− <term>
149− <varname>license</varname>
150− </term>
151− <listitem>
152− <para>
153− The license, or licenses, for the package. One from the attribute set defined in <link
154− xlink:href="https://github.com/NixOS/nixpkgs/blob/master/lib/licenses.nix"> <filename>nixpkgs/lib/licenses.nix</filename></link>. At this moment using both a list of licenses and a single license is valid. If the license field is in the form of a list representation, then it means that parts of the package are licensed differently. Each license should preferably be referenced by their attribute. The non-list attribute value can also be a space delimited string representation of the contained attribute shortNames or spdxIds. The following are all valid examples:
155− <itemizedlist>
156− <listitem>
157− <para>
158− Single license referenced by attribute (preferred) <literal>stdenv.lib.licenses.gpl3Only</literal>.
159− </para>
160− </listitem>
161− <listitem>
162− <para>
163− Single license referenced by its attribute shortName (frowned upon) <literal>"gpl3Only"</literal>.
164− </para>
165− </listitem>
166− <listitem>
167− <para>
168− Single license referenced by its attribute spdxId (frowned upon) <literal>"GPL-3.0-only"</literal>.
169− </para>
170− </listitem>
171− <listitem>
172− <para>
173− Multiple licenses referenced by attribute (preferred) <literal>with stdenv.lib.licenses; [ asl20 free ofl ]</literal>.
174− </para>
175− </listitem>
176− <listitem>
177− <para>
178− Multiple licenses referenced as a space delimited string of attribute shortNames (frowned upon) <literal>"asl20 free ofl"</literal>.
179− </para>
180− </listitem>
181− </itemizedlist>
182− For details, see <xref linkend='sec-meta-license'/>.
183− </para>
184− </listitem>
185− </varlistentry>
186− <varlistentry>
187− <term>
188− <varname>maintainers</varname>
189− </term>
190− <listitem>
191− <para>
192− A list of the maintainers of this Nix expression. Maintainers are defined in <link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/maintainers/maintainer-list.nix"><filename>nixpkgs/maintainers/maintainer-list.nix</filename></link>. There is no restriction to becoming a maintainer, just add yourself to that list in a separate commit titled 'maintainers: add alice', and reference maintainers with <literal>maintainers = with lib.maintainers; [ alice bob ]</literal>.
193− </para>
194− </listitem>
195− </varlistentry>
196− <varlistentry>
197− <term>
198− <varname>priority</varname>
199− </term>
200− <listitem>
201− <para>
202− The <emphasis>priority</emphasis> of the package, used by <command>nix-env</command> to resolve file name conflicts between packages. See the Nix manual page for <command>nix-env</command> for details. Example: <literal>"10"</literal> (a low-priority package).
203− </para>
204− </listitem>
205− </varlistentry>
206− <varlistentry>
207− <term>
208− <varname>platforms</varname>
209− </term>
210− <listitem>
211− <para>
212− The list of Nix platform types on which the package is supported. Hydra builds packages according to the platform specified. If no platform is specified, the package does not have prebuilt binaries. An example is:
213−<programlisting>
214−meta.platforms = stdenv.lib.platforms.linux;
215−</programlisting>
216− Attribute Set <varname>stdenv.lib.platforms</varname> defines <link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/lib/systems/doubles.nix"> various common lists</link> of platforms types.
217− </para>
218− </listitem>
219− </varlistentry>
220− <varlistentry>
221− <term>
222− <varname>tests</varname>
223− </term>
224− <listitem>
225− <warning>
226− <para>
227− This attribute is special in that it is not actually under the <literal>meta</literal> attribute set but rather under the <literal>passthru</literal> attribute set. This is due to how <literal>meta</literal> attributes work, and the fact that they are supposed to contain only metadata, not derivations.
228− </para>
229− </warning>
230− <para>
231− An attribute set with as values tests. A test is a derivation, which builds successfully when the test passes, and fails to build otherwise. A derivation that is a test needs to have <literal>meta.timeout</literal> defined.
232− </para>
233− <para>
234− The NixOS tests are available as <literal>nixosTests</literal> in parameters of derivations. For instance, the OpenSMTPD derivation includes lines similar to:
235−<programlisting>
236−{ /* ... */, nixosTests }:
237−{
238− # ...
239− passthru.tests = {
240− basic-functionality-and-dovecot-integration = nixosTests.opensmtpd;
241− };
242−}
243−</programlisting>
244− </para>
245− </listitem>
246− </varlistentry>
247− <varlistentry>
248− <term>
249− <varname>timeout</varname>
250− </term>
251− <listitem>
252− <para>
253− A timeout (in seconds) for building the derivation. If the derivation takes longer than this time to build, it can fail due to breaking the timeout. However, all computers do not have the same computing power, hence some builders may decide to apply a multiplicative factor to this value. When filling this value in, try to keep it approximately consistent with other values already present in <literal>nixpkgs</literal>.
254− </para>
255− </listitem>
256− </varlistentry>
257− <varlistentry>
258− <term>
259− <varname>hydraPlatforms</varname>
260− </term>
261− <listitem>
262− <para>
263− The list of Nix platform types for which the Hydra instance at <literal>hydra.nixos.org</literal> will build the package. (Hydra is the Nix-based continuous build system.) It defaults to the value of <varname>meta.platforms</varname>. Thus, the only reason to set <varname>meta.hydraPlatforms</varname> is if you want <literal>hydra.nixos.org</literal> to build the package on a subset of <varname>meta.platforms</varname>, or not at all, e.g.
264−<programlisting>
265−meta.platforms = stdenv.lib.platforms.linux;
266−meta.hydraPlatforms = [];
267−</programlisting>
268− </para>
269− </listitem>
270− </varlistentry>
271− <varlistentry>
272− <term>
273− <varname>broken</varname>
274− </term>
275− <listitem>
276− <para>
277− If set to <literal>true</literal>, the package is marked as “broken”, meaning that it won’t show up in <literal>nix-env -qa</literal>, and cannot be built or installed. Such packages should be removed from Nixpkgs eventually unless they are fixed.
278− </para>
279− </listitem>
280− </varlistentry>
281− <varlistentry>
282− <term>
283− <varname>updateWalker</varname>
284− </term>
285− <listitem>
286− <para>
287− If set to <literal>true</literal>, the package is tested to be updated correctly by the <literal>update-walker.sh</literal> script without additional settings. Such packages have <varname>meta.version</varname> set and their homepage (or the page specified by <varname>meta.downloadPage</varname>) contains a direct link to the package tarball.
288− </para>
289− </listitem>
290− </varlistentry>
291− </variablelist>
292− </section>
293− <section xml:id="sec-meta-license">
294− <title>Licenses</title>
295−
296− <para>
297− The <varname>meta.license</varname> attribute should preferrably contain a value from <varname>stdenv.lib.licenses</varname> defined in <link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/lib/licenses.nix"> <filename>nixpkgs/lib/licenses.nix</filename></link>, or in-place license description of the same format if the license is unlikely to be useful in another expression.
298− </para>
299−
300− <para>
301− Although it's typically better to indicate the specific license, a few generic options are available:
302− <variablelist>
303− <varlistentry>
304− <term>
305− <varname>stdenv.lib.licenses.free</varname>, <varname>"free"</varname>
306− </term>
307− <listitem>
308− <para>
309− Catch-all for free software licenses not listed above.
310− </para>
311− </listitem>
312− </varlistentry>
313− <varlistentry>
314− <term>
315− <varname>stdenv.lib.licenses.unfreeRedistributable</varname>, <varname>"unfree-redistributable"</varname>
316− </term>
317− <listitem>
318− <para>
319− Unfree package that can be redistributed in binary form. That is, it’s legal to redistribute the <emphasis>output</emphasis> of the derivation. This means that the package can be included in the Nixpkgs channel.
320− </para>
321− <para>
322− Sometimes proprietary software can only be redistributed unmodified. Make sure the builder doesn’t actually modify the original binaries; otherwise we’re breaking the license. For instance, the NVIDIA X11 drivers can be redistributed unmodified, but our builder applies <command>patchelf</command> to make them work. Thus, its license is <varname>"unfree"</varname> and it cannot be included in the Nixpkgs channel.
323− </para>
324− </listitem>
325− </varlistentry>
326− <varlistentry>
327− <term>
328− <varname>stdenv.lib.licenses.unfree</varname>, <varname>"unfree"</varname>
329− </term>
330− <listitem>
331− <para>
332− Unfree package that cannot be redistributed. You can build it yourself, but you cannot redistribute the output of the derivation. Thus it cannot be included in the Nixpkgs channel.
333− </para>
334− </listitem>
335− </varlistentry>
336− <varlistentry>
337− <term>
338− <varname>stdenv.lib.licenses.unfreeRedistributableFirmware</varname>, <varname>"unfree-redistributable-firmware"</varname>
339− </term>
340− <listitem>
341− <para>
342− This package supplies unfree, redistributable firmware. This is a separate value from <varname>unfree-redistributable</varname> because not everybody cares whether firmware is free.
343− </para>
344− </listitem>
345− </varlistentry>
346− </variablelist>
347− </para>
348− </section>
349−</chapter>
doc/stdenv/multiple-output.chapter.mdnew file+128
@@ -0,0 +1,128 @@
1+# Multiple-output packages {#chap-multiple-output}
2+
3+## Introduction {#sec-multiple-outputs-introduction}
4+
5+The Nix language allows a derivation to produce multiple outputs, which is similar to what is utilized by other Linux distribution packaging systems. The outputs reside in separate Nix store paths, so they can be mostly handled independently of each other, including passing to build inputs, garbage collection or binary substitution. The exception is that building from source always produces all the outputs.
6+
7+The main motivation is to save disk space by reducing runtime closure sizes; consequently also sizes of substituted binaries get reduced. Splitting can be used to have more granular runtime dependencies, for example the typical reduction is to split away development-only files, as those are typically not needed during runtime. As a result, closure sizes of many packages can get reduced to a half or even much less.
8+
9+::: {.note}
10+The reduction effects could be instead achieved by building the parts in completely separate derivations. That would often additionally reduce build-time closures, but it tends to be much harder to write such derivations, as build systems typically assume all parts are being built at once. This compromise approach of single source package producing multiple binary packages is also utilized often by rpm and deb.
11+:::
12+
13+A number of attributes can be used to work with a derivation with multiple outputs. The attribute `outputs` is a list of strings, which are the names of the outputs. For each of these names, an identically named attribute is created, corresponding to that output. The attribute `meta.outputsToInstall` is used to determine the default set of outputs to install when using the derivation name unqualified.
14+
15+## Installing a split package {#sec-multiple-outputs-installing}
16+
17+When installing a package with multiple outputs, the package’s `meta.outputsToInstall` attribute determines which outputs are actually installed. `meta.outputsToInstall` is a list whose [default installs binaries and the associated man pages](https://github.com/NixOS/nixpkgs/blob/f1680774340d5443a1409c3421ced84ac1163ba9/pkgs/stdenv/generic/make-derivation.nix#L310-L320). The following sections describe ways to install different outputs.
18+
19+### Selecting outputs to install via NixOS {#sec-multiple-outputs-installing-nixos}
20+
21+NixOS provides two ways to select the outputs to install for packages listed in `environment.systemPackages`:
22+
23+- The configuration option `environment.extraOutputsToInstall` is appended to each package’s `meta.outputsToInstall` attribute to determine the outputs to install. It can for example be used to install `info` documentation or debug symbols for all packages.
24+
25+- The outputs can be listed as packages in `environment.systemPackages`. For example, the `"out"` and `"info"` outputs for the `coreutils` package can be installed by including `coreutils` and `coreutils.info` in `environment.systemPackages`.
26+
27+### Selecting outputs to install via `nix-env` {#sec-multiple-outputs-installing-nix-env}
28+
29+`nix-env` lacks an easy way to select the outputs to install. When installing a package, `nix-env` always installs the outputs listed in `meta.outputsToInstall`, even when the user explicitly selects an output.
30+
31+::: {.warning}
32+`nix-env` silenty disregards the outputs selected by the user, and instead installs the outputs from `meta.outputsToInstall`. For example,
33+
34+```ShellSession
35+$ nix-env -iA nixpkgs.coreutils.info
36+```
37+
38+installs the `"out"` output (`coreutils.meta.outputsToInstall` is `[ "out" ]`) instead of the requested `"info"`.
39+:::
40+
41+The only recourse to select an output with `nix-env` is to override the package’s `meta.outputsToInstall`, using the functions described in [](#chap-overrides). For example, the following overlay adds the `"info"` output for the `coreutils` package:
42+
43+```nix
44+self: super:
45+{
46+ coreutils = super.coreutils.overrideAttrs (oldAttrs: {
47+ meta = oldAttrs.meta // { outputsToInstall = oldAttrs.meta.outputsToInstall or [ "out" ] ++ [ "info" ]; };
48+ });
49+}
50+```
51+
52+## Using a split package {#sec-multiple-outputs-using-split-packages}
53+
54+In the Nix language the individual outputs can be reached explicitly as attributes, e.g. `coreutils.info`, but the typical case is just using packages as build inputs.
55+
56+When a multiple-output derivation gets into a build input of another derivation, the `dev` output is added if it exists, otherwise the first output is added. In addition to that, `propagatedBuildOutputs` of that package which by default contain `$outputBin` and `$outputLib` are also added. (See [](#multiple-output-file-type-groups).)
57+
58+In some cases it may be desirable to combine different outputs under a single store path. A function `symlinkJoin` can be used to do this. (Note that it may negate some closure size benefits of using a multiple-output package.)
59+
60+## Writing a split derivation {#sec-multiple-outputs-}
61+
62+Here you find how to write a derivation that produces multiple outputs.
63+
64+In nixpkgs there is a framework supporting multiple-output derivations. It tries to cover most cases by default behavior. You can find the source separated in `<nixpkgs/pkgs/build-support/setup-hooks/multiple-outputs.sh>`; it’s relatively well-readable. The whole machinery is triggered by defining the `outputs` attribute to contain the list of desired output names (strings).
65+
66+```nix
67+outputs = [ "bin" "dev" "out" "doc" ];
68+```
69+
70+Often such a single line is enough. For each output an equally named environment variable is passed to the builder and contains the path in nix store for that output. Typically you also want to have the main `out` output, as it catches any files that didn’t get elsewhere.
71+
72+::: {.note}
73+There is a special handling of the `debug` output, described at [](#stdenv-separateDebugInfo).
74+:::
75+
76+### “Binaries first” {#multiple-output-file-binaries-first-convention}
77+
78+A commonly adopted convention in `nixpkgs` is that executables provided by the package are contained within its first output. This convention allows the dependent packages to reference the executables provided by packages in a uniform manner. For instance, provided with the knowledge that the `perl` package contains a `perl` executable it can be referenced as `${pkgs.perl}/bin/perl` within a Nix derivation that needs to execute a Perl script.
79+
80+The `glibc` package is a deliberate single exception to the “binaries first” convention. The `glibc` has `libs` as its first output allowing the libraries provided by `glibc` to be referenced directly (e.g. `${stdenv.glibc}/lib/ld-linux-x86-64.so.2`). The executables provided by `glibc` can be accessed via its `bin` attribute (e.g. `${stdenv.glibc.bin}/bin/ldd`).
81+
82+The reason for why `glibc` deviates from the convention is because referencing a library provided by `glibc` is a very common operation among Nix packages. For instance, third-party executables packaged by Nix are typically patched and relinked with the relevant version of `glibc` libraries from Nix packages (please see the documentation on [patchelf](https://github.com/NixOS/patchelf) for more details).
83+
84+### File type groups {#multiple-output-file-type-groups}
85+
86+The support code currently recognizes some particular kinds of outputs and either instructs the build system of the package to put files into their desired outputs or it moves the files during the fixup phase. Each group of file types has an `outputFoo` variable specifying the output name where they should go. If that variable isn’t defined by the derivation writer, it is guessed – a default output name is defined, falling back to other possibilities if the output isn’t defined.
87+
88+#### `$outputDev` {#outputdev}
89+
90+is for development-only files. These include C(++) headers (`include/`), pkg-config (`lib/pkgconfig/`), cmake (`lib/cmake/`) and aclocal files (`share/aclocal/`). They go to `dev` or `out` by default.
91+
92+#### `$outputBin` {#outputbin}
93+
94+is meant for user-facing binaries, typically residing in `bin/`. They go to `bin` or `out` by default.
95+
96+#### `$outputLib` {#outputlib}
97+
98+is meant for libraries, typically residing in `lib/` and `libexec/`. They go to `lib` or `out` by default.
99+
100+#### `$outputDoc` {#outputdoc}
101+
102+is for user documentation, typically residing in `share/doc/`. It goes to `doc` or `out` by default.
103+
104+#### `$outputDevdoc` {#outputdevdoc}
105+
106+is for _developer_ documentation. Currently we count gtk-doc and devhelp books, typically residing in `share/gtk-doc/` and `share/devhelp/`, in there. It goes to `devdoc` or is removed (!) by default. This is because e.g. gtk-doc tends to be rather large and completely unused by nixpkgs users.
107+
108+#### `$outputMan` {#outputman}
109+
110+is for man pages (except for section 3), typically residing in `share/man/man[0-9]/`. They go to `man` or `$outputBin` by default.
111+
112+#### `$outputDevman` {#outputdevman}
113+
114+is for section 3 man pages, typically residing in `share/man/man[0-9]/`. They go to `devman` or `$outputMan` by default.
115+
116+#### `$outputInfo` {#outputinfo}
117+
118+is for info pages, typically residing in `share/info/`. They go to `info` or `$outputBin` by default.
119+
120+### Common caveats {#sec-multiple-outputs-caveats}
121+
122+- Some configure scripts don’t like some of the parameters passed by default by the framework, e.g. `--docdir=/foo/bar`. You can disable this by setting `setOutputFlags = false;`.
123+
124+- The outputs of a single derivation can retain references to each other, but note that circular references are not allowed. (And each strongly-connected component would act as a single output anyway.)
125+
126+- Most of split packages contain their core functionality in libraries. These libraries tend to refer to various kind of data that typically gets into `out`, e.g. locale strings, so there is often no advantage in separating the libraries into `lib`, as keeping them in `out` is easier.
127+
128+- Some packages have hidden assumptions on install paths, which complicates splitting.
doc/stdenv/multiple-output.xmldeleted−262
@@ -1,262 +0,0 @@
1−<?xml version="1.0" encoding="UTF-8"?>
2−<!DOCTYPE chapter [
3− <!ENTITY ndash "&#x2013;"> <!-- @vcunat likes to use this one ;-) -->
4−]>
5−<chapter xmlns="http://docbook.org/ns/docbook"
6− xmlns:xlink="http://www.w3.org/1999/xlink"
7− xml:id="chap-multiple-output">
8− <title>Multiple-output packages</title>
9− <section xml:id="sec-multiple-outputs-introduction">
10− <title>Introduction</title>
11−
12− <para>
13− The Nix language allows a derivation to produce multiple outputs, which is similar to what is utilized by other Linux distribution packaging systems. The outputs reside in separate Nix store paths, so they can be mostly handled independently of each other, including passing to build inputs, garbage collection or binary substitution. The exception is that building from source always produces all the outputs.
14− </para>
15−
16− <para>
17− The main motivation is to save disk space by reducing runtime closure sizes; consequently also sizes of substituted binaries get reduced. Splitting can be used to have more granular runtime dependencies, for example the typical reduction is to split away development-only files, as those are typically not needed during runtime. As a result, closure sizes of many packages can get reduced to a half or even much less.
18− </para>
19−
20− <note>
21− <para>
22− The reduction effects could be instead achieved by building the parts in completely separate derivations. That would often additionally reduce build-time closures, but it tends to be much harder to write such derivations, as build systems typically assume all parts are being built at once. This compromise approach of single source package producing multiple binary packages is also utilized often by rpm and deb.
23− </para>
24− </note>
25−
26− <para>
27− A number of attributes can be used to work with a derivation with multiple outputs. The attribute <varname>outputs</varname> is a list of strings, which are the names of the outputs. For each of these names, an identically named attribute is created, corresponding to that output. The attribute <varname>meta.outputsToInstall</varname> is used to determine the default set of outputs to install when using the derivation name unqualified.
28− </para>
29−
30− </section>
31− <section xml:id="sec-multiple-outputs-installing">
32− <title>Installing a split package</title>
33−
34− <para>
35− When installing a package with multiple outputs, the package's <varname>meta.outputsToInstall</varname> attribute determines which outputs are actually installed. <varname>meta.outputsToInstall</varname> is a list whose <link xlink:href="https://github.com/NixOS/nixpkgs/blob/f1680774340d5443a1409c3421ced84ac1163ba9/pkgs/stdenv/generic/make-derivation.nix#L310-L320">default installs binaries and the associated man pages</link>. The following sections describe ways to install different outputs.
36− </para>
37−
38− <section xml:id="sec-multiple-outputs-installing-nixos">
39− <title>Selecting outputs to install via NixOS</title>
40−
41− <para>
42− NixOS provides two ways to select the outputs to install for packages listed in <varname>environment.systemPackages</varname>:
43− </para>
44−
45− <itemizedlist>
46− <listitem>
47− <para>
48− The configuration option <varname>environment.extraOutputsToInstall</varname> is appended to each package's <varname>meta.outputsToInstall</varname> attribute to determine the outputs to install. It can for example be used to install <literal>info</literal> documentation or debug symbols for all packages.
49− </para>
50− </listitem>
51− <listitem>
52− <para>
53− The outputs can be listed as packages in <varname>environment.systemPackages</varname>. For example, the <literal>"out"</literal> and <literal>"info"</literal> outputs for the <varname>coreutils</varname> package can be installed by including <varname>coreutils</varname> and <varname>coreutils.info</varname> in <varname>environment.systemPackages</varname>.
54− </para>
55− </listitem>
56− </itemizedlist>
57− </section>
58−
59− <section xml:id="sec-multiple-outputs-installing-nix-env">
60− <title>Selecting outputs to install via <command>nix-env</command></title>
61−
62− <para>
63− <command>nix-env</command> lacks an easy way to select the outputs to install. When installing a package, <command>nix-env</command> always installs the outputs listed in <varname>meta.outputsToInstall</varname>, even when the user explicitly selects an output.
64− </para>
65−
66− <warning>
67− <para>
68− <command>nix-env</command> silenty disregards the outputs selected by the user, and instead installs the outputs from <varname>meta.outputsToInstall</varname>. For example,
69− </para>
70−<screen><prompt>$ </prompt>nix-env -iA nixpkgs.coreutils.info</screen>
71− <para>
72− installs the <literal>"out"</literal> output (<varname>coreutils.meta.outputsToInstall</varname> is <literal>[ "out" ]</literal>) instead of the requested <literal>"info"</literal>.
73− </para>
74− </warning>
75−
76− <para>
77− The only recourse to select an output with <command>nix-env</command> is to override the package's <varname>meta.outputsToInstall</varname>, using the functions described in <xref linkend="chap-overrides" />. For example, the following overlay adds the <literal>"info"</literal> output for the <varname>coreutils</varname> package:
78− </para>
79−
80−<programlisting>self: super:
81−{
82− coreutils = super.coreutils.overrideAttrs (oldAttrs: {
83− meta = oldAttrs.meta // { outputsToInstall = oldAttrs.meta.outputsToInstall or [ "out" ] ++ [ "info" ]; };
84− });
85−}
86−</programlisting>
87− </section>
88− </section>
89− <section xml:id="sec-multiple-outputs-using-split-packages">
90− <title>Using a split package</title>
91−
92− <para>
93− In the Nix language the individual outputs can be reached explicitly as attributes, e.g. <varname>coreutils.info</varname>, but the typical case is just using packages as build inputs.
94− </para>
95−
96− <para>
97− When a multiple-output derivation gets into a build input of another derivation, the <varname>dev</varname> output is added if it exists, otherwise the first output is added. In addition to that, <varname>propagatedBuildOutputs</varname> of that package which by default contain <varname>$outputBin</varname> and <varname>$outputLib</varname> are also added. (See <xref linkend="multiple-output-file-type-groups" />.)
98− </para>
99−
100− <para>
101− In some cases it may be desirable to combine different outputs under a single store path. A function <literal>symlinkJoin</literal> can be used to do this. (Note that it may negate some closure size benefits of using a multiple-output package.)
102− </para>
103− </section>
104− <section xml:id="sec-multiple-outputs-">
105− <title>Writing a split derivation</title>
106−
107− <para>
108− Here you find how to write a derivation that produces multiple outputs.
109− </para>
110−
111− <para>
112− In nixpkgs there is a framework supporting multiple-output derivations. It tries to cover most cases by default behavior. You can find the source separated in &lt;<filename>nixpkgs/pkgs/build-support/setup-hooks/multiple-outputs.sh</filename>&gt;; it's relatively well-readable. The whole machinery is triggered by defining the <varname>outputs</varname> attribute to contain the list of desired output names (strings).
113− </para>
114−
115−<programlisting>outputs = [ "bin" "dev" "out" "doc" ];</programlisting>
116−
117− <para>
118− Often such a single line is enough. For each output an equally named environment variable is passed to the builder and contains the path in nix store for that output. Typically you also want to have the main <varname>out</varname> output, as it catches any files that didn't get elsewhere.
119− </para>
120−
121− <note>
122− <para>
123− There is a special handling of the <varname>debug</varname> output, described at <xref linkend="stdenv-separateDebugInfo" />.
124− </para>
125− </note>
126−
127− <section xml:id="multiple-output-file-binaries-first-convention">
128− <title><quote>Binaries first</quote></title>
129−
130− <para>
131− A commonly adopted convention in <literal>nixpkgs</literal> is that executables provided by the package are contained within its first output. This convention allows the dependent packages to reference the executables provided by packages in a uniform manner. For instance, provided with the knowledge that the <literal>perl</literal> package contains a <literal>perl</literal> executable it can be referenced as <literal>${pkgs.perl}/bin/perl</literal> within a Nix derivation that needs to execute a Perl script.
132− </para>
133−
134− <para>
135− The <literal>glibc</literal> package is a deliberate single exception to the <quote>binaries first</quote> convention. The <literal>glibc</literal> has <literal>libs</literal> as its first output allowing the libraries provided by <literal>glibc</literal> to be referenced directly (e.g. <literal>${stdenv.glibc}/lib/ld-linux-x86-64.so.2</literal>). The executables provided by <literal>glibc</literal> can be accessed via its <literal>bin</literal> attribute (e.g. <literal>${stdenv.glibc.bin}/bin/ldd</literal>).
136− </para>
137−
138− <para>
139− The reason for why <literal>glibc</literal> deviates from the convention is because referencing a library provided by <literal>glibc</literal> is a very common operation among Nix packages. For instance, third-party executables packaged by Nix are typically patched and relinked with the relevant version of <literal>glibc</literal> libraries from Nix packages (please see the documentation on <link xlink:href="https://github.com/NixOS/patchelf/blob/master/README">patchelf</link> for more details).
140− </para>
141− </section>
142−
143− <section xml:id="multiple-output-file-type-groups">
144− <title>File type groups</title>
145−
146− <para>
147− The support code currently recognizes some particular kinds of outputs and either instructs the build system of the package to put files into their desired outputs or it moves the files during the fixup phase. Each group of file types has an <varname>outputFoo</varname> variable specifying the output name where they should go. If that variable isn't defined by the derivation writer, it is guessed &ndash; a default output name is defined, falling back to other possibilities if the output isn't defined.
148− </para>
149−
150− <variablelist>
151− <varlistentry>
152− <term>
153− <varname> $outputDev</varname>
154− </term>
155− <listitem>
156− <para>
157− is for development-only files. These include C(++) headers, pkg-config, cmake and aclocal files. They go to <varname>dev</varname> or <varname>out</varname> by default.
158− </para>
159− </listitem>
160− </varlistentry>
161− <varlistentry>
162− <term>
163− <varname> $outputBin</varname>
164− </term>
165− <listitem>
166− <para>
167− is meant for user-facing binaries, typically residing in bin/. They go to <varname>bin</varname> or <varname>out</varname> by default.
168− </para>
169− </listitem>
170− </varlistentry>
171− <varlistentry>
172− <term>
173− <varname> $outputLib</varname>
174− </term>
175− <listitem>
176− <para>
177− is meant for libraries, typically residing in <filename>lib/</filename> and <filename>libexec/</filename>. They go to <varname>lib</varname> or <varname>out</varname> by default.
178− </para>
179− </listitem>
180− </varlistentry>
181− <varlistentry>
182− <term>
183− <varname> $outputDoc</varname>
184− </term>
185− <listitem>
186− <para>
187− is for user documentation, typically residing in <filename>share/doc/</filename>. It goes to <varname>doc</varname> or <varname>out</varname> by default.
188− </para>
189− </listitem>
190− </varlistentry>
191− <varlistentry>
192− <term>
193− <varname> $outputDevdoc</varname>
194− </term>
195− <listitem>
196− <para>
197− is for <emphasis>developer</emphasis> documentation. Currently we count gtk-doc and devhelp books in there. It goes to <varname>devdoc</varname> or is removed (!) by default. This is because e.g. gtk-doc tends to be rather large and completely unused by nixpkgs users.
198− </para>
199− </listitem>
200− </varlistentry>
201− <varlistentry>
202− <term>
203− <varname> $outputMan</varname>
204− </term>
205− <listitem>
206− <para>
207− is for man pages (except for section 3). They go to <varname>man</varname> or <varname>$outputBin</varname> by default.
208− </para>
209− </listitem>
210− </varlistentry>
211− <varlistentry>
212− <term>
213− <varname> $outputDevman</varname>
214− </term>
215− <listitem>
216− <para>
217− is for section 3 man pages. They go to <varname>devman</varname> or <varname>$outputMan</varname> by default.
218− </para>
219− </listitem>
220− </varlistentry>
221− <varlistentry>
222− <term>
223− <varname> $outputInfo</varname>
224− </term>
225− <listitem>
226− <para>
227− is for info pages. They go to <varname>info</varname> or <varname>$outputBin</varname> by default.
228− </para>
229− </listitem>
230− </varlistentry>
231− </variablelist>
232− </section>
233−
234− <section xml:id="sec-multiple-outputs-caveats">
235− <title>Common caveats</title>
236−
237− <itemizedlist>
238− <listitem>
239− <para>
240− Some configure scripts don't like some of the parameters passed by default by the framework, e.g. <literal>--docdir=/foo/bar</literal>. You can disable this by setting <literal>setOutputFlags = false;</literal>.
241− </para>
242− </listitem>
243− <listitem>
244− <para>
245− The outputs of a single derivation can retain references to each other, but note that circular references are not allowed. (And each strongly-connected component would act as a single output anyway.)
246− </para>
247− </listitem>
248− <listitem>
249− <para>
250− Most of split packages contain their core functionality in libraries. These libraries tend to refer to various kind of data that typically gets into <varname>out</varname>, e.g. locale strings, so there is often no advantage in separating the libraries into <varname>lib</varname>, as keeping them in <varname>out</varname> is easier.
251− </para>
252− </listitem>
253− <listitem>
254− <para>
255− Some packages have hidden assumptions on install paths, which complicates splitting.
256− </para>
257− </listitem>
258− </itemizedlist>
259− </section>
260− </section>
261−<!--Writing a split derivation-->
262−</chapter>
doc/stdenv/platform-notes.chapter.mdnew file+62
@@ -0,0 +1,62 @@
1+# Platform Notes {#chap-platform-notes}
2+
3+## Darwin (macOS) {#sec-darwin}
4+
5+Some common issues when packaging software for Darwin:
6+
7+- The Darwin `stdenv` uses clang instead of gcc. When referring to the compiler `$CC` or `cc` will work in both cases. Some builds hardcode gcc/g++ in their build scripts, that can usually be fixed with using something like `makeFlags = [ "CC=cc" ];` or by patching the build scripts.
8+
9+ ```nix
10+ stdenv.mkDerivation {
11+ name = "libfoo-1.2.3";
12+ # ...
13+ buildPhase = ''
14+ $CC -o hello hello.c
15+ '';
16+ }
17+ ```
18+
19+- On Darwin, libraries are linked using absolute paths, libraries are resolved by their `install_name` at link time. Sometimes packages won’t set this correctly causing the library lookups to fail at runtime. This can be fixed by adding extra linker flags or by running `install_name_tool -id` during the `fixupPhase`.
20+
21+ ```nix
22+ stdenv.mkDerivation {
23+ name = "libfoo-1.2.3";
24+ # ...
25+ makeFlags = lib.optional stdenv.isDarwin "LDFLAGS=-Wl,-install_name,$(out)/lib/libfoo.dylib";
26+ }
27+ ```
28+
29+- Even if the libraries are linked using absolute paths and resolved via their `install_name` correctly, tests can sometimes fail to run binaries. This happens because the `checkPhase` runs before the libraries are installed.
30+
31+ This can usually be solved by running the tests after the `installPhase` or alternatively by using `DYLD_LIBRARY_PATH`. More information about this variable can be found in the *dyld(1)* manpage.
32+
33+ ```
34+ dyld: Library not loaded: /nix/store/7hnmbscpayxzxrixrgxvvlifzlxdsdir-jq-1.5-lib/lib/libjq.1.dylib
35+ Referenced from: /private/tmp/nix-build-jq-1.5.drv-0/jq-1.5/tests/../jq
36+ Reason: image not found
37+ ./tests/jqtest: line 5: 75779 Abort trap: 6
38+ ```
39+
40+ ```nix
41+ stdenv.mkDerivation {
42+ name = "libfoo-1.2.3";
43+ # ...
44+ doInstallCheck = true;
45+ installCheckTarget = "check";
46+ }
47+ ```
48+
49+- Some packages assume xcode is available and use `xcrun` to resolve build tools like `clang`, etc. This causes errors like `xcode-select: error: no developer tools were found at '/Applications/Xcode.app'` while the build doesn’t actually depend on xcode.
50+
51+ ```nix
52+ stdenv.mkDerivation {
53+ name = "libfoo-1.2.3";
54+ # ...
55+ prePatch = ''
56+ substituteInPlace Makefile \
57+ --replace '/usr/bin/xcrun clang' clang
58+ '';
59+ }
60+ ```
61+
62+ The package `xcbuild` can be used to build projects that really depend on Xcode. However, this replacement is not 100% compatible with Xcode and can occasionally cause issues.
doc/stdenv/platform-notes.xmldeleted−83
@@ -1,83 +0,0 @@
1−<chapter xmlns="http://docbook.org/ns/docbook"
2− xmlns:xlink="http://www.w3.org/1999/xlink"
3− xml:id="chap-platform-notes">
4− <title>Platform Notes</title>
5− <section xml:id="sec-darwin">
6− <title>Darwin (macOS)</title>
7−
8− <para>
9− Some common issues when packaging software for Darwin:
10− </para>
11−
12− <itemizedlist>
13− <listitem>
14− <para>
15− The Darwin <literal>stdenv</literal> uses clang instead of gcc. When referring to the compiler <varname>$CC</varname> or <command>cc</command> will work in both cases. Some builds hardcode gcc/g++ in their build scripts, that can usually be fixed with using something like <literal>makeFlags = [ "CC=cc" ];</literal> or by patching the build scripts.
16− </para>
17−<programlisting>
18−stdenv.mkDerivation {
19− name = "libfoo-1.2.3";
20− # ...
21− buildPhase = ''
22− $CC -o hello hello.c
23− '';
24−}
25−</programlisting>
26− </listitem>
27− <listitem>
28− <para>
29− On Darwin, libraries are linked using absolute paths, libraries are resolved by their <literal>install_name</literal> at link time. Sometimes packages won't set this correctly causing the library lookups to fail at runtime. This can be fixed by adding extra linker flags or by running <command>install_name_tool -id</command> during the <function>fixupPhase</function>.
30− </para>
31−<programlisting>
32−stdenv.mkDerivation {
33− name = "libfoo-1.2.3";
34− # ...
35− makeFlags = stdenv.lib.optional stdenv.isDarwin "LDFLAGS=-Wl,-install_name,$(out)/lib/libfoo.dylib";
36−}
37−</programlisting>
38− </listitem>
39− <listitem>
40− <para>
41− Even if the libraries are linked using absolute paths and resolved via their <literal>install_name</literal> correctly, tests can sometimes fail to run binaries. This happens because the <varname>checkPhase</varname> runs before the libraries are installed.
42− </para>
43− <para>
44− This can usually be solved by running the tests after the <varname>installPhase</varname> or alternatively by using <varname>DYLD_LIBRARY_PATH</varname>. More information about this variable can be found in the <citerefentry>
45− <refentrytitle>dyld</refentrytitle>
46− <manvolnum>1</manvolnum></citerefentry> manpage.
47− </para>
48−<programlisting>
49−dyld: Library not loaded: /nix/store/7hnmbscpayxzxrixrgxvvlifzlxdsdir-jq-1.5-lib/lib/libjq.1.dylib
50−Referenced from: /private/tmp/nix-build-jq-1.5.drv-0/jq-1.5/tests/../jq
51−Reason: image not found
52−./tests/jqtest: line 5: 75779 Abort trap: 6
53−</programlisting>
54−<programlisting>
55−stdenv.mkDerivation {
56− name = "libfoo-1.2.3";
57− # ...
58− doInstallCheck = true;
59− installCheckTarget = "check";
60−}
61−</programlisting>
62− </listitem>
63− <listitem>
64− <para>
65− Some packages assume xcode is available and use <command>xcrun</command> to resolve build tools like <command>clang</command>, etc. This causes errors like <code>xcode-select: error: no developer tools were found at '/Applications/Xcode.app'</code> while the build doesn't actually depend on xcode.
66− </para>
67−<programlisting>
68−stdenv.mkDerivation {
69− name = "libfoo-1.2.3";
70− # ...
71− prePatch = ''
72− substituteInPlace Makefile \
73− --replace '/usr/bin/xcrun clang' clang
74− '';
75−}
76−</programlisting>
77− <para>
78− The package <literal>xcbuild</literal> can be used to build projects that really depend on Xcode. However, this replacement is not 100% compatible with Xcode and can occasionally cause issues.
79− </para>
80− </listitem>
81− </itemizedlist>
82− </section>
83−</chapter>
doc/stdenv/stdenv.chapter.mdnew file+1323

This diff is too big to show here.

doc/stdenv/stdenv.xmldeleted−2423

This diff is too big to show here.

doc/using/configuration.chapter.mdnew file+356

This diff is too big to show here.

doc/using/configuration.xmldeleted−448

This diff is too big to show here.

doc/using/overlays.chapter.mdnew file+167

This diff is too big to show here.

doc/using/overlays.xmldeleted−294

This diff is too big to show here.

doc/using/overrides.chapter.mdnew file+108

This diff is too big to show here.

doc/using/overrides.xmldeleted−145

This diff is too big to show here.

flake.nix+9−35

This diff is too big to show here.

lib/asserts.nix+10−12

This diff is too big to show here.

lib/attrsets.nix+162−29

This diff is too big to show here.

lib/customisation.nix+55−6

This diff is too big to show here.

lib/debug.nix+22

This diff is too big to show here.

lib/default.nix+27−16

This diff is too big to show here.

lib/deprecated.nix+5−5

This diff is too big to show here.

lib/fixed-points.nix+5−5

This diff is too big to show here.

lib/flake.nixnew file+5

This diff is too big to show here.

lib/flakes.nixnew file+22

This diff is too big to show here.

lib/generators.nix+101−5

This diff is too big to show here.

lib/licenses.nix+286−136

This diff is too big to show here.

lib/lists.nix+15−15

This diff is too big to show here.

lib/meta.nix+54−1

This diff is too big to show here.

lib/modules.nix+365−103

This diff is too big to show here.

lib/options.nix+84−19

This diff is too big to show here.

lib/sources.nix+177−72

This diff is too big to show here.

lib/strings.nix+222−18

This diff is too big to show here.

lib/systems/architectures.nix+38−8

This diff is too big to show here.

lib/systems/default.nix+52−7

This diff is too big to show here.

lib/systems/doubles.nix+46−25

This diff is too big to show here.

lib/systems/examples.nix+101−43

This diff is too big to show here.

lib/systems/inspect.nix+11−1

This diff is too big to show here.

lib/systems/parse.nix+43−13

This diff is too big to show here.

lib/systems/platforms.nix+427−340

This diff is too big to show here.

lib/systems/supported.nixnew file+26

This diff is too big to show here.

lib/tests/flakes/subflakeTest/flake.nixnew file+8

This diff is too big to show here.

lib/tests/flakes/subflakeTest/subflake/flake.nixnew file+5

This diff is too big to show here.

lib/tests/maintainers.nix+6−2

This diff is too big to show here.

lib/tests/misc.nix+531−2

This diff is too big to show here.

lib/tests/modules.sh+184−115

This diff is too big to show here.

lib/tests/modules/adhoc-freeformType-survives-type-merge.nixnew file+14

This diff is too big to show here.

lib/tests/modules/declare-attrsOf.nix+8−1

This diff is too big to show here.

lib/tests/modules/declare-bare-submodule-deep-option-duplicate.nixnew file+10

This diff is too big to show here.

lib/tests/modules/declare-bare-submodule-deep-option.nixnew file+10

This diff is too big to show here.

lib/tests/modules/declare-bare-submodule-nested-option.nixnew file+19

This diff is too big to show here.

lib/tests/modules/declare-bare-submodule.nixnew file+18

This diff is too big to show here.

lib/tests/modules/declare-set.nixnew file+12

This diff is too big to show here.

lib/tests/modules/declare-submodule-via-evalModules.nixnew file+28

This diff is too big to show here.

lib/tests/modules/declare-submoduleWith-modules.nix+1−3

This diff is too big to show here.

lib/tests/modules/declare-variants.nixnew file+9

This diff is too big to show here.

lib/tests/modules/define-bare-submodule-values.nixnew file+4

This diff is too big to show here.

lib/tests/modules/define-shorthandOnlyDefinesConfig-true.nixnew file+1

This diff is too big to show here.

lib/tests/modules/define-variant.nixnew file+22

This diff is too big to show here.

lib/tests/modules/emptyValues.nixnew file+36

This diff is too big to show here.

lib/tests/modules/extendModules-168767-imports.nixnew file+41

This diff is too big to show here.

lib/tests/modules/freeform-nested.nix+8−1

This diff is too big to show here.

lib/tests/modules/freeform-submodules.nixnew file+22

This diff is too big to show here.

lib/tests/modules/functionTo/list-order.nixnew file+25

This diff is too big to show here.

lib/tests/modules/functionTo/merging-attrs.nixnew file+27

This diff is too big to show here.

lib/tests/modules/functionTo/merging-list.nixnew file+24

This diff is too big to show here.

lib/tests/modules/functionTo/trivial.nixnew file+17

This diff is too big to show here.

lib/tests/modules/functionTo/wrong-type.nixnew file+18

This diff is too big to show here.

lib/tests/modules/optionTypeFile.nixnew file+28

This diff is too big to show here.

lib/tests/modules/optionTypeMerging.nixnew file+27

This diff is too big to show here.

lib/tests/modules/raw.nixnew file+30

This diff is too big to show here.

lib/tests/modules/types-anything/functions.nix+9−3

This diff is too big to show here.

lib/tests/release.nix+9−1

This diff is too big to show here.

lib/tests/sources.shnew file+61

This diff is too big to show here.

lib/tests/systems.nix+7−4

This diff is too big to show here.

lib/trivial.nix+131−10

This diff is too big to show here.

lib/types.nix+186−57

This diff is too big to show here.

maintainers/maintainer-list.nix+4737−263

This diff is too big to show here.

maintainers/scripts/build.nix+10−2

This diff is too big to show here.

maintainers/scripts/check-hydra-by-maintainer.nixnew file+68

This diff is too big to show here.

maintainers/scripts/check-maintainer-github-handles.sh+9−9

This diff is too big to show here.

maintainers/scripts/copy-tarballs.pl+15−1

This diff is too big to show here.

maintainers/scripts/db-to-md.shnew file+88

This diff is too big to show here.

maintainers/scripts/dep-licenses.sh+1−1

This diff is too big to show here.

maintainers/scripts/doc/escape-code-markup.pynew file+97

This diff is too big to show here.

maintainers/scripts/doc/replace-xrefs-by-empty-links.pynew file+32

This diff is too big to show here.

maintainers/scripts/doc/unknown-code-language.luanew file+12

This diff is too big to show here.

maintainers/scripts/feature-freeze-teams.plnew file+98

This diff is too big to show here.

maintainers/scripts/fetch-kde-qt.sh+4−5

This diff is too big to show here.

maintainers/scripts/find-tarballs.nix+1−1

This diff is too big to show here.

maintainers/scripts/haskell/dependencies.nixnew file+10

This diff is too big to show here.

maintainers/scripts/haskell/hydra-report.hsnew file+490

This diff is too big to show here.

maintainers/scripts/haskell/maintained-broken-pkgs.nixnew file+22

This diff is too big to show here.

maintainers/scripts/haskell/maintainer-handles.nixnew file+7

This diff is too big to show here.

maintainers/scripts/haskell/mark-broken.shnew file+47

This diff is too big to show here.

maintainers/scripts/haskell/merge-and-open-pr.shnew file+122

This diff is too big to show here.

maintainers/scripts/haskell/regenerate-hackage-packages.shnew file+46

This diff is too big to show here.

maintainers/scripts/haskell/regenerate-transitive-broken-packages.shnew file+15

This diff is too big to show here.

maintainers/scripts/haskell/test-configurations.nixnew file+136

This diff is too big to show here.

maintainers/scripts/haskell/transitive-broken-packages.nixnew file+16

This diff is too big to show here.

maintainers/scripts/haskell/update-cabal2nix-unstable.shnew file+17

This diff is too big to show here.

maintainers/scripts/haskell/update-hackage.shnew file+35

This diff is too big to show here.

maintainers/scripts/haskell/update-stackage.shnew file+70

This diff is too big to show here.

maintainers/scripts/haskell/upload-nixos-package-list-to-hackage.shnew file+22

This diff is too big to show here.

maintainers/scripts/luarocks-packages.csv+87−86

This diff is too big to show here.

maintainers/scripts/nix-generate-from-cpan.nix+3−3

This diff is too big to show here.

maintainers/scripts/nix-generate-from-cpan.pl+3−3

This diff is too big to show here.

maintainers/scripts/nixpkgs-lint.nix+6−5

This diff is too big to show here.

maintainers/scripts/nixpkgs-lint.pl+1−1

This diff is too big to show here.

maintainers/scripts/pluginupdate.pynew file+701

This diff is too big to show here.

maintainers/scripts/rebuild-amount.sh+86−79

This diff is too big to show here.

maintainers/scripts/remove-old-aliases.pynew file+211

This diff is too big to show here.

maintainers/scripts/update-luarocks-packages+207−125

This diff is too big to show here.

maintainers/scripts/update-luarocks-shell.nix+7−3

This diff is too big to show here.

maintainers/scripts/update-redirected-urls.shnew file+12

This diff is too big to show here.

maintainers/scripts/update-ruby-packages+4−1

This diff is too big to show here.

maintainers/scripts/update.nix+18−8

This diff is too big to show here.

maintainers/scripts/update.py+8−1

This diff is too big to show here.

maintainers/scripts/update_redirected_urls.shdeleted−11

This diff is too big to show here.

maintainers/scripts/vanity.sh+19−19

This diff is too big to show here.

maintainers/team-list.nix+555−6

This diff is too big to show here.

nixos/default.nix+1−19

This diff is too big to show here.

nixos/doc/manual/Makefile+1−1

This diff is too big to show here.

nixos/doc/manual/READMEdeleted−3

This diff is too big to show here.

nixos/doc/manual/README.mdnew file+3

This diff is too big to show here.

nixos/doc/manual/administration/boot-problems.section.mdnew file+41

This diff is too big to show here.

nixos/doc/manual/administration/boot-problems.xmldeleted−126

This diff is too big to show here.

nixos/doc/manual/administration/cleaning-store.chapter.mdnew file+62

This diff is too big to show here.

nixos/doc/manual/administration/cleaning-store.xmldeleted−63

This diff is too big to show here.

nixos/doc/manual/administration/container-networking.section.mdnew file+44

This diff is too big to show here.

nixos/doc/manual/administration/container-networking.xmldeleted−59

This diff is too big to show here.

nixos/doc/manual/administration/containers.chapter.mdnew file+28

This diff is too big to show here.

nixos/doc/manual/administration/containers.xmldeleted−34

This diff is too big to show here.

nixos/doc/manual/administration/control-groups.chapter.mdnew file+59

This diff is too big to show here.

nixos/doc/manual/administration/control-groups.xmldeleted−65

This diff is too big to show here.

nixos/doc/manual/administration/declarative-containers.section.mdnew file+48

This diff is too big to show here.

nixos/doc/manual/administration/declarative-containers.xmldeleted−60

This diff is too big to show here.

nixos/doc/manual/administration/imperative-containers.section.mdnew file+115

This diff is too big to show here.

nixos/doc/manual/administration/imperative-containers.xmldeleted−123

This diff is too big to show here.

nixos/doc/manual/administration/logging.chapter.mdnew file+38

This diff is too big to show here.

nixos/doc/manual/administration/logging.xmldeleted−43

This diff is too big to show here.

nixos/doc/manual/administration/maintenance-mode.section.mdnew file+11

This diff is too big to show here.

nixos/doc/manual/administration/maintenance-mode.xmldeleted−16

This diff is too big to show here.

nixos/doc/manual/administration/network-problems.section.mdnew file+21

This diff is too big to show here.

nixos/doc/manual/administration/network-problems.xmldeleted−27

This diff is too big to show here.

nixos/doc/manual/administration/rebooting.chapter.mdnew file+30

This diff is too big to show here.

nixos/doc/manual/administration/rebooting.xmldeleted−35

This diff is too big to show here.

nixos/doc/manual/administration/rollback.section.mdnew file+38

This diff is too big to show here.

nixos/doc/manual/administration/rollback.xmldeleted−41

This diff is too big to show here.

nixos/doc/manual/administration/running.xml+8−8

This diff is too big to show here.

nixos/doc/manual/administration/service-mgmt.chapter.mdnew file+120

This diff is too big to show here.

nixos/doc/manual/administration/service-mgmt.xmldeleted−140

This diff is too big to show here.

nixos/doc/manual/administration/store-corruption.section.mdnew file+28

This diff is too big to show here.

nixos/doc/manual/administration/store-corruption.xmldeleted−36

This diff is too big to show here.

nixos/doc/manual/administration/troubleshooting.chapter.mdnew file+12

This diff is too big to show here.

nixos/doc/manual/administration/troubleshooting.xmldeleted−16

This diff is too big to show here.

nixos/doc/manual/administration/user-sessions.chapter.mdnew file+43

This diff is too big to show here.

nixos/doc/manual/administration/user-sessions.xmldeleted−45

This diff is too big to show here.

nixos/doc/manual/configuration/abstractions.section.mdnew file+80

This diff is too big to show here.

nixos/doc/manual/configuration/abstractions.xmldeleted−101

This diff is too big to show here.

nixos/doc/manual/configuration/ad-hoc-network-config.section.mdnew file+13

This diff is too big to show here.

nixos/doc/manual/configuration/ad-hoc-network-config.xmldeleted−20

This diff is too big to show here.

nixos/doc/manual/configuration/ad-hoc-packages.section.mdnew file+51

This diff is too big to show here.

nixos/doc/manual/configuration/ad-hoc-packages.xmldeleted−61

This diff is too big to show here.

nixos/doc/manual/configuration/adding-custom-packages.section.mdnew file+74

This diff is too big to show here.

nixos/doc/manual/configuration/adding-custom-packages.xmldeleted−73

This diff is too big to show here.

nixos/doc/manual/configuration/config-file.section.mdnew file+175

This diff is too big to show here.

nixos/doc/manual/configuration/config-file.xmldeleted−215

This diff is too big to show here.

nixos/doc/manual/configuration/config-syntax.chapter.mdnew file+19

This diff is too big to show here.

nixos/doc/manual/configuration/config-syntax.xmldeleted−25

This diff is too big to show here.

nixos/doc/manual/configuration/configuration.xml+13−13

This diff is too big to show here.

nixos/doc/manual/configuration/customizing-packages.section.mdnew file+74

This diff is too big to show here.

nixos/doc/manual/configuration/customizing-packages.xmldeleted−86

This diff is too big to show here.

nixos/doc/manual/configuration/declarative-packages.section.mdnew file+46

This diff is too big to show here.

nixos/doc/manual/configuration/declarative-packages.xmldeleted−54

This diff is too big to show here.

nixos/doc/manual/configuration/file-systems.chapter.mdnew file+42

This diff is too big to show here.

nixos/doc/manual/configuration/file-systems.xmldeleted−57

This diff is too big to show here.

nixos/doc/manual/configuration/firewall.section.mdnew file+32

This diff is too big to show here.

nixos/doc/manual/configuration/firewall.xmldeleted−37

This diff is too big to show here.

nixos/doc/manual/configuration/gpu-accel.chapter.mdnew file+204

This diff is too big to show here.

nixos/doc/manual/configuration/gpu-accel.xmldeleted−263

This diff is too big to show here.

nixos/doc/manual/configuration/ipv4-config.section.mdnew file+35

This diff is too big to show here.

nixos/doc/manual/configuration/ipv4-config.xmldeleted−43

This diff is too big to show here.

nixos/doc/manual/configuration/ipv6-config.section.mdnew file+42

This diff is too big to show here.

nixos/doc/manual/configuration/ipv6-config.xmldeleted−50

This diff is too big to show here.

nixos/doc/manual/configuration/kubernetes.chapter.mdnew file+104

This diff is too big to show here.

nixos/doc/manual/configuration/kubernetes.xmldeleted−112

This diff is too big to show here.

nixos/doc/manual/configuration/linux-kernel.chapter.mdnew file+140

This diff is too big to show here.

nixos/doc/manual/configuration/linux-kernel.xmldeleted−138

This diff is too big to show here.

nixos/doc/manual/configuration/luks-file-systems.section.mdnew file+77

This diff is too big to show here.

nixos/doc/manual/configuration/luks-file-systems.xmldeleted−74

This diff is too big to show here.

nixos/doc/manual/configuration/modularity.section.mdnew file+133

This diff is too big to show here.

nixos/doc/manual/configuration/modularity.xmldeleted−146

This diff is too big to show here.

nixos/doc/manual/configuration/network-manager.section.mdnew file+42

This diff is too big to show here.

nixos/doc/manual/configuration/network-manager.xmldeleted−48

This diff is too big to show here.

nixos/doc/manual/configuration/networking.chapter.mdnew file+16

This diff is too big to show here.

nixos/doc/manual/configuration/networking.xmldeleted−19

This diff is too big to show here.

nixos/doc/manual/configuration/package-mgmt.chapter.mdnew file+18

This diff is too big to show here.

nixos/doc/manual/configuration/package-mgmt.xmldeleted−31

This diff is too big to show here.

nixos/doc/manual/configuration/profiles.chapter.mdnew file+34

This diff is too big to show here.

nixos/doc/manual/configuration/profiles.xmldeleted−39

This diff is too big to show here.

nixos/doc/manual/configuration/profiles/all-hardware.section.mdnew file+11

This diff is too big to show here.

nixos/doc/manual/configuration/profiles/all-hardware.xmldeleted−21

This diff is too big to show here.

nixos/doc/manual/configuration/profiles/base.section.mdnew file+7

This diff is too big to show here.

nixos/doc/manual/configuration/profiles/base.xmldeleted−15

This diff is too big to show here.

nixos/doc/manual/configuration/profiles/clone-config.section.mdnew file+11

This diff is too big to show here.

nixos/doc/manual/configuration/profiles/clone-config.xmldeleted−21

This diff is too big to show here.

nixos/doc/manual/configuration/profiles/demo.section.mdnew file+4

This diff is too big to show here.

nixos/doc/manual/configuration/profiles/demo.xmldeleted−14

This diff is too big to show here.

nixos/doc/manual/configuration/profiles/docker-container.section.mdnew file+7

This diff is too big to show here.

nixos/doc/manual/configuration/profiles/docker-container.xmldeleted−16

This diff is too big to show here.

nixos/doc/manual/configuration/profiles/graphical.section.mdnew file+10

This diff is too big to show here.

nixos/doc/manual/configuration/profiles/graphical.xmldeleted−20

This diff is too big to show here.

nixos/doc/manual/configuration/profiles/hardened.section.mdnew file+20

This diff is too big to show here.

nixos/doc/manual/configuration/profiles/hardened.xmldeleted−24

This diff is too big to show here.

nixos/doc/manual/configuration/profiles/headless.section.mdnew file+9

This diff is too big to show here.

nixos/doc/manual/configuration/profiles/headless.xmldeleted−19

This diff is too big to show here.

nixos/doc/manual/configuration/profiles/installation-device.section.mdnew file+24

This diff is too big to show here.

nixos/doc/manual/configuration/profiles/installation-device.xmldeleted−36

This diff is too big to show here.

nixos/doc/manual/configuration/profiles/minimal.section.mdnew file+9

This diff is too big to show here.

nixos/doc/manual/configuration/profiles/minimal.xmldeleted−17

This diff is too big to show here.

nixos/doc/manual/configuration/profiles/qemu-guest.section.mdnew file+7

This diff is too big to show here.

nixos/doc/manual/configuration/profiles/qemu-guest.xmldeleted−18

This diff is too big to show here.

nixos/doc/manual/configuration/renaming-interfaces.section.mdnew file+51

This diff is too big to show here.

nixos/doc/manual/configuration/ssh.section.mdnew file+19

This diff is too big to show here.

nixos/doc/manual/configuration/ssh.xmldeleted−27

This diff is too big to show here.

nixos/doc/manual/configuration/sshfs-file-systems.section.mdnew file+104

This diff is too big to show here.

nixos/doc/manual/configuration/subversion.chapter.mdnew file+102

This diff is too big to show here.

nixos/doc/manual/configuration/subversion.xmldeleted−140

This diff is too big to show here.

nixos/doc/manual/configuration/summary.section.mdnew file+46

This diff is too big to show here.

nixos/doc/manual/configuration/summary.xmldeleted−227

This diff is too big to show here.

nixos/doc/manual/configuration/user-mgmt.chapter.mdnew file+92

This diff is too big to show here.

nixos/doc/manual/configuration/user-mgmt.xmldeleted−88

This diff is too big to show here.

nixos/doc/manual/configuration/wayland.chapter.mdnew file+27

This diff is too big to show here.

nixos/doc/manual/configuration/wayland.xmldeleted−23

This diff is too big to show here.

nixos/doc/manual/configuration/wireless.section.mdnew file+67

This diff is too big to show here.

nixos/doc/manual/configuration/wireless.xmldeleted−70

This diff is too big to show here.

nixos/doc/manual/configuration/x-windows.chapter.mdnew file+337

This diff is too big to show here.

nixos/doc/manual/configuration/x-windows.xmldeleted−341

This diff is too big to show here.

nixos/doc/manual/configuration/xfce.chapter.mdnew file+52

This diff is too big to show here.

nixos/doc/manual/configuration/xfce.xmldeleted−59

This diff is too big to show here.

nixos/doc/manual/contributing-to-this-manual.chapter.mdnew file+13

This diff is too big to show here.

nixos/doc/manual/contributing-to-this-manual.xmldeleted−22

This diff is too big to show here.

nixos/doc/manual/default.nix+19−6

This diff is too big to show here.

nixos/doc/manual/development/activation-script.section.mdnew file+72

This diff is too big to show here.

nixos/doc/manual/development/assertions.section.mdnew file+40

This diff is too big to show here.

nixos/doc/manual/development/assertions.xmldeleted−74

This diff is too big to show here.

nixos/doc/manual/development/building-nixos.xmldeleted−33

This diff is too big to show here.

nixos/doc/manual/development/building-parts.chapter.mdnew file+74

This diff is too big to show here.

nixos/doc/manual/development/building-parts.xmldeleted−121

This diff is too big to show here.

nixos/doc/manual/development/development.xml+7−8

This diff is too big to show here.

nixos/doc/manual/development/freeform-modules.section.mdnew file+79

This diff is too big to show here.

nixos/doc/manual/development/freeform-modules.xmldeleted−68

This diff is too big to show here.

nixos/doc/manual/development/importing-modules.section.mdnew file+46

This diff is too big to show here.

nixos/doc/manual/development/importing-modules.xmldeleted−56

This diff is too big to show here.

nixos/doc/manual/development/linking-nixos-tests-to-packages.section.mdnew file+6

This diff is too big to show here.

nixos/doc/manual/development/meta-attributes.section.mdnew file+66

This diff is too big to show here.

nixos/doc/manual/development/meta-attributes.xmldeleted−63

This diff is too big to show here.

nixos/doc/manual/development/nixos-tests.chapter.mdnew file+13

This diff is too big to show here.

nixos/doc/manual/development/nixos-tests.xmldeleted−19

This diff is too big to show here.

nixos/doc/manual/development/option-declarations.section.mdnew file+221

This diff is too big to show here.

nixos/doc/manual/development/option-declarations.xmldeleted−199

This diff is too big to show here.

nixos/doc/manual/development/option-def.section.mdnew file+91

This diff is too big to show here.

nixos/doc/manual/development/option-def.xmldeleted−99

This diff is too big to show here.

nixos/doc/manual/development/option-types.section.mdnew file+583

This diff is too big to show here.

nixos/doc/manual/development/option-types.xmldeleted−914

This diff is too big to show here.

nixos/doc/manual/development/releases.xmldeleted−366

This diff is too big to show here.

nixos/doc/manual/development/replace-modules.section.mdnew file+64

This diff is too big to show here.

nixos/doc/manual/development/replace-modules.xmldeleted−79

This diff is too big to show here.

nixos/doc/manual/development/running-nixos-tests-interactively.section.mdnew file+35

This diff is too big to show here.

nixos/doc/manual/development/running-nixos-tests-interactively.xmldeleted−49

This diff is too big to show here.

nixos/doc/manual/development/running-nixos-tests.section.mdnew file+31

This diff is too big to show here.

nixos/doc/manual/development/running-nixos-tests.xmldeleted−36

This diff is too big to show here.

nixos/doc/manual/development/settings-options.section.mdnew file+251

This diff is too big to show here.

nixos/doc/manual/development/settings-options.xmldeleted−216

This diff is too big to show here.

nixos/doc/manual/development/sources.chapter.mdnew file+77

This diff is too big to show here.

nixos/doc/manual/development/sources.xmldeleted−85

This diff is too big to show here.

nixos/doc/manual/development/testing-installer.chapter.mdnew file+18

This diff is too big to show here.

nixos/doc/manual/development/testing-installer.xmldeleted−22

This diff is too big to show here.

nixos/doc/manual/development/unit-handling.section.mdnew file+62

This diff is too big to show here.

nixos/doc/manual/development/what-happens-during-a-system-switch.chapter.mdnew file+53

This diff is too big to show here.

nixos/doc/manual/development/writing-documentation.chapter.mdnew file+93

This diff is too big to show here.

nixos/doc/manual/development/writing-documentation.xmldeleted−149

This diff is too big to show here.

nixos/doc/manual/development/writing-modules.chapter.mdnew file+208

This diff is too big to show here.

nixos/doc/manual/development/writing-modules.xmldeleted−188

This diff is too big to show here.

nixos/doc/manual/development/writing-nixos-tests.section.mdnew file+382

This diff is too big to show here.

nixos/doc/manual/development/writing-nixos-tests.xmldeleted−453

This diff is too big to show here.

nixos/doc/manual/from_md/README.mdnew file+5

This diff is too big to show here.

nixos/doc/manual/from_md/administration/boot-problems.section.xmlnew file+144

This diff is too big to show here.

nixos/doc/manual/from_md/administration/cleaning-store.chapter.xmlnew file+72

This diff is too big to show here.

nixos/doc/manual/from_md/administration/container-networking.section.xmlnew file+54

This diff is too big to show here.

nixos/doc/manual/from_md/administration/containers.chapter.xmlnew file+31

This diff is too big to show here.

nixos/doc/manual/from_md/administration/control-groups.chapter.xmlnew file+67

This diff is too big to show here.

nixos/doc/manual/from_md/administration/declarative-containers.section.xmlnew file+60

This diff is too big to show here.

nixos/doc/manual/from_md/administration/imperative-containers.section.xmlnew file+132

This diff is too big to show here.

nixos/doc/manual/from_md/administration/logging.chapter.xmlnew file+45

This diff is too big to show here.

nixos/doc/manual/from_md/administration/maintenance-mode.section.xmlnew file+14

This diff is too big to show here.

nixos/doc/manual/from_md/administration/network-problems.section.xmlnew file+25

This diff is too big to show here.

nixos/doc/manual/from_md/administration/rebooting.chapter.xmlnew file+38

This diff is too big to show here.

nixos/doc/manual/from_md/administration/rollback.section.xmlnew file+42

This diff is too big to show here.

nixos/doc/manual/from_md/administration/service-mgmt.chapter.xmlnew file+141

This diff is too big to show here.

nixos/doc/manual/from_md/administration/store-corruption.section.xmlnew file+34

This diff is too big to show here.

nixos/doc/manual/from_md/administration/troubleshooting.chapter.xmlnew file+12

This diff is too big to show here.

nixos/doc/manual/from_md/administration/user-sessions.chapter.xmlnew file+46

This diff is too big to show here.

nixos/doc/manual/from_md/configuration/abstractions.section.xmlnew file+101

This diff is too big to show here.

nixos/doc/manual/from_md/configuration/ad-hoc-network-config.section.xmlnew file+16

This diff is too big to show here.

nixos/doc/manual/from_md/configuration/ad-hoc-packages.section.xmlnew file+59

This diff is too big to show here.

nixos/doc/manual/from_md/configuration/adding-custom-packages.section.xmlnew file+80

This diff is too big to show here.

nixos/doc/manual/from_md/configuration/config-file.section.xmlnew file+231

This diff is too big to show here.

nixos/doc/manual/from_md/configuration/config-syntax.chapter.xmlnew file+21

This diff is too big to show here.

nixos/doc/manual/from_md/configuration/customizing-packages.section.xmlnew file+90

This diff is too big to show here.

nixos/doc/manual/from_md/configuration/declarative-packages.section.xmlnew file+53

This diff is too big to show here.

nixos/doc/manual/from_md/configuration/file-systems.chapter.xmlnew file+55

This diff is too big to show here.

nixos/doc/manual/from_md/configuration/firewall.section.xmlnew file+39

This diff is too big to show here.

nixos/doc/manual/from_md/configuration/gpu-accel.chapter.xmlnew file+239

This diff is too big to show here.

nixos/doc/manual/from_md/configuration/ipv4-config.section.xmlnew file+43

This diff is too big to show here.

nixos/doc/manual/from_md/configuration/ipv6-config.section.xmlnew file+47

This diff is too big to show here.

nixos/doc/manual/from_md/configuration/kubernetes.chapter.xmlnew file+126

This diff is too big to show here.

nixos/doc/manual/from_md/configuration/linux-kernel.chapter.xmlnew file+157

This diff is too big to show here.

nixos/doc/manual/from_md/configuration/luks-file-systems.section.xmlnew file+84

This diff is too big to show here.

nixos/doc/manual/from_md/configuration/modularity.section.xmlnew file+152

This diff is too big to show here.

nixos/doc/manual/from_md/configuration/network-manager.section.xmlnew file+49

This diff is too big to show here.

nixos/doc/manual/from_md/configuration/networking.chapter.xmlnew file+15

This diff is too big to show here.

nixos/doc/manual/from_md/configuration/package-mgmt.chapter.xmlnew file+28

This diff is too big to show here.

nixos/doc/manual/from_md/configuration/profiles.chapter.xmlnew file+38

This diff is too big to show here.

nixos/doc/manual/from_md/configuration/profiles/all-hardware.section.xmlnew file+15

This diff is too big to show here.

nixos/doc/manual/from_md/configuration/profiles/base.section.xmlnew file+10

This diff is too big to show here.

nixos/doc/manual/from_md/configuration/profiles/clone-config.section.xmlnew file+16

This diff is too big to show here.

nixos/doc/manual/from_md/configuration/profiles/demo.section.xmlnew file+10

This diff is too big to show here.

nixos/doc/manual/from_md/configuration/profiles/docker-container.section.xmlnew file+12

This diff is too big to show here.

nixos/doc/manual/from_md/configuration/profiles/graphical.section.xmlnew file+14

This diff is too big to show here.

nixos/doc/manual/from_md/configuration/profiles/hardened.section.xmlnew file+25

This diff is too big to show here.

nixos/doc/manual/from_md/configuration/profiles/headless.section.xmlnew file+15

This diff is too big to show here.

nixos/doc/manual/from_md/configuration/profiles/installation-device.section.xmlnew file+32

This diff is too big to show here.

nixos/doc/manual/from_md/configuration/profiles/minimal.section.xmlnew file+13

This diff is too big to show here.

nixos/doc/manual/from_md/configuration/profiles/qemu-guest.section.xmlnew file+11

This diff is too big to show here.

nixos/doc/manual/from_md/configuration/renaming-interfaces.section.xmlnew file+62

This diff is too big to show here.

nixos/doc/manual/from_md/configuration/ssh.section.xmlnew file+23

This diff is too big to show here.

nixos/doc/manual/from_md/configuration/sshfs-file-systems.section.xmlnew file+139

This diff is too big to show here.

nixos/doc/manual/from_md/configuration/subversion.chapter.xmlnew file+121

This diff is too big to show here.

nixos/doc/manual/from_md/configuration/summary.section.xmlnew file+332

This diff is too big to show here.

nixos/doc/manual/from_md/configuration/user-mgmt.chapter.xmlnew file+105

This diff is too big to show here.

nixos/doc/manual/from_md/configuration/wayland.chapter.xmlnew file+31

This diff is too big to show here.

nixos/doc/manual/from_md/configuration/wireless.section.xmlnew file+73

This diff is too big to show here.

nixos/doc/manual/from_md/configuration/x-windows.chapter.xmlnew file+381

This diff is too big to show here.

nixos/doc/manual/from_md/configuration/xfce.chapter.xmlnew file+62

This diff is too big to show here.

nixos/doc/manual/from_md/contributing-to-this-manual.chapter.xmlnew file+22

This diff is too big to show here.

nixos/doc/manual/from_md/development/activation-script.section.xmlnew file+150

This diff is too big to show here.

nixos/doc/manual/from_md/development/assertions.section.xmlnew file+58

This diff is too big to show here.

nixos/doc/manual/from_md/development/building-parts.chapter.xmlnew file+124

This diff is too big to show here.

nixos/doc/manual/from_md/development/freeform-modules.section.xmlnew file+87

This diff is too big to show here.

nixos/doc/manual/from_md/development/importing-modules.section.xmlnew file+47

This diff is too big to show here.

nixos/doc/manual/from_md/development/linking-nixos-tests-to-packages.section.xmlnew file+10

This diff is too big to show here.

nixos/doc/manual/from_md/development/meta-attributes.section.xmlnew file+95

This diff is too big to show here.

nixos/doc/manual/from_md/development/nixos-tests.chapter.xmlnew file+14

This diff is too big to show here.

nixos/doc/manual/from_md/development/option-declarations.section.xmlnew file+327

This diff is too big to show here.

nixos/doc/manual/from_md/development/option-def.section.xmlnew file+104

This diff is too big to show here.

nixos/doc/manual/from_md/development/option-types.section.xmlnew file+1038

This diff is too big to show here.

nixos/doc/manual/from_md/development/replace-modules.section.xmlnew file+70

This diff is too big to show here.

nixos/doc/manual/from_md/development/running-nixos-tests-interactively.section.xmlnew file+39

This diff is too big to show here.

nixos/doc/manual/from_md/development/running-nixos-tests.section.xmlnew file+34

This diff is too big to show here.

nixos/doc/manual/from_md/development/settings-options.section.xmlnew file+421

This diff is too big to show here.

nixos/doc/manual/from_md/development/sources.chapter.xmlnew file+90

This diff is too big to show here.

nixos/doc/manual/from_md/development/testing-installer.chapter.xmlnew file+22

This diff is too big to show here.

nixos/doc/manual/from_md/development/unit-handling.section.xmlnew file+131

This diff is too big to show here.

nixos/doc/manual/from_md/development/what-happens-during-a-system-switch.chapter.xmlnew file+122

This diff is too big to show here.

nixos/doc/manual/from_md/development/writing-documentation.chapter.xmlnew file+144

This diff is too big to show here.

nixos/doc/manual/from_md/development/writing-modules.chapter.xmlnew file+245

This diff is too big to show here.

nixos/doc/manual/from_md/development/writing-nixos-tests.section.xmlnew file+655

This diff is too big to show here.

nixos/doc/manual/from_md/installation/building-nixos.chapter.xmlnew file+106

This diff is too big to show here.

nixos/doc/manual/from_md/installation/changing-config.chapter.xmlnew file+117

This diff is too big to show here.

nixos/doc/manual/from_md/installation/installing-behind-a-proxy.section.xmlnew file+41

This diff is too big to show here.

nixos/doc/manual/from_md/installation/installing-from-other-distro.section.xmlnew file+388

This diff is too big to show here.

nixos/doc/manual/from_md/installation/installing-pxe.section.xmlnew file+42

This diff is too big to show here.

nixos/doc/manual/from_md/installation/installing-usb.section.xmlnew file+35

This diff is too big to show here.

nixos/doc/manual/from_md/installation/installing-virtualbox-guest.section.xmlnew file+92

This diff is too big to show here.

nixos/doc/manual/from_md/installation/installing.chapter.xmlnew file+645

This diff is too big to show here.

nixos/doc/manual/from_md/installation/obtaining.chapter.xmlnew file+48

This diff is too big to show here.

nixos/doc/manual/from_md/installation/upgrading.chapter.xmlnew file+152

This diff is too big to show here.

nixos/doc/manual/from_md/release-notes/rl-1310.section.xmlnew file+6

This diff is too big to show here.

nixos/doc/manual/from_md/release-notes/rl-1404.section.xmlnew file+189

This diff is too big to show here.

nixos/doc/manual/from_md/release-notes/rl-1412.section.xmlnew file+466

This diff is too big to show here.

nixos/doc/manual/from_md/release-notes/rl-1509.section.xmlnew file+776

This diff is too big to show here.

nixos/doc/manual/from_md/release-notes/rl-1603.section.xmlnew file+695

This diff is too big to show here.

nixos/doc/manual/from_md/release-notes/rl-1609.section.xmlnew file+273

This diff is too big to show here.

nixos/doc/manual/from_md/release-notes/rl-1703.section.xmlnew file+818

This diff is too big to show here.

nixos/doc/manual/from_md/release-notes/rl-1709.section.xmlnew file+922

This diff is too big to show here.

nixos/doc/manual/from_md/release-notes/rl-1803.section.xmlnew file+879

This diff is too big to show here.

nixos/doc/manual/from_md/release-notes/rl-1809.section.xmlnew file+941

This diff is too big to show here.

nixos/doc/manual/from_md/release-notes/rl-1903.section.xmlnew file+790

This diff is too big to show here.

nixos/doc/manual/from_md/release-notes/rl-1909.section.xmlnew file+1197

This diff is too big to show here.

nixos/doc/manual/from_md/release-notes/rl-2003.section.xmlnew file+1497

This diff is too big to show here.

nixos/doc/manual/from_md/release-notes/rl-2009.section.xmlnew file+2210

This diff is too big to show here.

nixos/doc/manual/from_md/release-notes/rl-2105.section.xmlnew file+1567

This diff is too big to show here.

nixos/doc/manual/from_md/release-notes/rl-2111.section.xmlnew file+2091

This diff is too big to show here.

nixos/doc/manual/from_md/release-notes/rl-2205.section.xmlnew file+2470

This diff is too big to show here.

nixos/doc/manual/installation/building-nixos.chapter.mdnew file+77

This diff is too big to show here.

nixos/doc/manual/installation/changing-config.chapter.mdnew file+100

This diff is too big to show here.

nixos/doc/manual/installation/changing-config.xmldeleted−97

This diff is too big to show here.

nixos/doc/manual/installation/installation.xml+5−4

This diff is too big to show here.

nixos/doc/manual/installation/installing-behind-a-proxy.section.mdnew file+29

This diff is too big to show here.

nixos/doc/manual/installation/installing-behind-a-proxy.xmldeleted−48

This diff is too big to show here.

nixos/doc/manual/installation/installing-from-other-distro.section.mdnew file+279

This diff is too big to show here.

nixos/doc/manual/installation/installing-from-other-distro.xmldeleted−364

This diff is too big to show here.

nixos/doc/manual/installation/installing-pxe.section.mdnew file+32

This diff is too big to show here.

nixos/doc/manual/installation/installing-pxe.xmldeleted−50

This diff is too big to show here.

nixos/doc/manual/installation/installing-usb.section.mdnew file+31

This diff is too big to show here.

nixos/doc/manual/installation/installing-usb.xmldeleted−40

This diff is too big to show here.

nixos/doc/manual/installation/installing-virtualbox-guest.section.mdnew file+59

This diff is too big to show here.

nixos/doc/manual/installation/installing-virtualbox-guest.xmldeleted−108

This diff is too big to show here.

nixos/doc/manual/installation/installing.chapter.mdnew file+482

This diff is too big to show here.

nixos/doc/manual/installation/installing.xmldeleted−578

This diff is too big to show here.

nixos/doc/manual/installation/obtaining.chapter.mdnew file+26

This diff is too big to show here.

nixos/doc/manual/installation/obtaining.xmldeleted−54

This diff is too big to show here.

nixos/doc/manual/installation/upgrading.chapter.mdnew file+118

This diff is too big to show here.

nixos/doc/manual/installation/upgrading.xmldeleted−139

This diff is too big to show here.

nixos/doc/manual/man-nixos-install.xml+9−4

This diff is too big to show here.

nixos/doc/manual/man-nixos-rebuild.xml+68−11

This diff is too big to show here.

nixos/doc/manual/man-pages.xml+7−2

This diff is too big to show here.

nixos/doc/manual/manual.xml+1−1

This diff is too big to show here.

nixos/doc/manual/md-to-db.shnew file+49

This diff is too big to show here.

nixos/doc/manual/preface.xml+9−4

This diff is too big to show here.

nixos/doc/manual/release-notes/release-notes.xml+17−15

This diff is too big to show here.

nixos/doc/manual/release-notes/rl-1310.section.mdnew file+3

This diff is too big to show here.

nixos/doc/manual/release-notes/rl-1310.xmldeleted−11

This diff is too big to show here.

nixos/doc/manual/release-notes/rl-1404.section.mdnew file+81

This diff is too big to show here.

nixos/doc/manual/release-notes/rl-1404.xmldeleted−179

This diff is too big to show here.

nixos/doc/manual/release-notes/rl-1412.section.mdnew file+171

This diff is too big to show here.

nixos/doc/manual/release-notes/rl-1412.xmldeleted−467

This diff is too big to show here.

nixos/doc/manual/release-notes/rl-1509.section.mdnew file+319

This diff is too big to show here.

nixos/doc/manual/release-notes/rl-1509.xmldeleted−750

This diff is too big to show here.

nixos/doc/manual/release-notes/rl-1603.section.mdnew file+282

This diff is too big to show here.

nixos/doc/manual/release-notes/rl-1603.xmldeleted−671

This diff is too big to show here.

nixos/doc/manual/release-notes/rl-1609.section.mdnew file+73

This diff is too big to show here.

nixos/doc/manual/release-notes/rl-1609.xmldeleted−277

This diff is too big to show here.

nixos/doc/manual/release-notes/rl-1703.section.mdnew file+303

This diff is too big to show here.

nixos/doc/manual/release-notes/rl-1703.xmldeleted−817

This diff is too big to show here.

nixos/doc/manual/release-notes/rl-1709.section.mdnew file+316

This diff is too big to show here.

nixos/doc/manual/release-notes/rl-1709.xmldeleted−899

This diff is too big to show here.

nixos/doc/manual/release-notes/rl-1803.section.mdnew file+286

This diff is too big to show here.

nixos/doc/manual/release-notes/rl-1803.xmldeleted−855

This diff is too big to show here.

nixos/doc/manual/release-notes/rl-1809.section.mdnew file+332

This diff is too big to show here.

nixos/doc/manual/release-notes/rl-1809.xmldeleted−933

This diff is too big to show here.

nixos/doc/manual/release-notes/rl-1903.section.mdnew file+214

This diff is too big to show here.

nixos/doc/manual/release-notes/rl-1903.xmldeleted−768

This diff is too big to show here.

nixos/doc/manual/release-notes/rl-1909.section.mdnew file+313

This diff is too big to show here.

nixos/doc/manual/release-notes/rl-1909.xmldeleted−902

This diff is too big to show here.

nixos/doc/manual/release-notes/rl-2003.section.mdnew file+507

This diff is too big to show here.

nixos/doc/manual/release-notes/rl-2003.xmldeleted−1243

This diff is too big to show here.

nixos/doc/manual/release-notes/rl-2009.section.mdnew file+747

This diff is too big to show here.

nixos/doc/manual/release-notes/rl-2009.xmldeleted−1814

This diff is too big to show here.

nixos/doc/manual/release-notes/rl-2103.xmldeleted−336

This diff is too big to show here.

nixos/doc/manual/release-notes/rl-2105.section.mdnew file+428

This diff is too big to show here.

nixos/doc/manual/release-notes/rl-2111.section.mdnew file+575

This diff is too big to show here.

nixos/doc/manual/release-notes/rl-2205.section.mdnew file+878

This diff is too big to show here.

nixos/doc/manual/shell.nix+1−1

This diff is too big to show here.

nixos/lib/build-vms.nix+23−9

This diff is too big to show here.

nixos/lib/default.nixnew file+33

This diff is too big to show here.

nixos/lib/eval-cacheable-options.nixnew file+53

This diff is too big to show here.

nixos/lib/eval-config-minimal.nixnew file+49

This diff is too big to show here.

nixos/lib/eval-config.nix+54−16

This diff is too big to show here.

nixos/lib/make-disk-image.nix+182−34

This diff is too big to show here.

nixos/lib/make-ext4-fs.nix+3−5

This diff is too big to show here.

nixos/lib/make-iso9660-image.sh+1

This diff is too big to show here.

nixos/lib/make-multi-disk-zfs-image.nixnew file+333

This diff is too big to show here.

nixos/lib/make-options-doc/default.nix+79−78

This diff is too big to show here.

nixos/lib/make-options-doc/generateAsciiDoc.pynew file+37

This diff is too big to show here.

nixos/lib/make-options-doc/generateCommonMark.pynew file+27

This diff is too big to show here.

nixos/lib/make-options-doc/mergeJSON.pynew file+95

This diff is too big to show here.

nixos/lib/make-options-doc/options-to-docbook.xsl+30−20

This diff is too big to show here.

nixos/lib/make-options-doc/optionsJSONtoXML.nixnew file+6

This diff is too big to show here.

nixos/lib/make-options-doc/sortXML.pynew file+27

This diff is too big to show here.

nixos/lib/make-single-disk-zfs-image.nixnew file+322

This diff is too big to show here.

nixos/lib/make-squashfs.nix+8−1

This diff is too big to show here.

nixos/lib/qemu-common.nixnew file+32

This diff is too big to show here.

nixos/lib/qemu-flags.nixdeleted−30

This diff is too big to show here.

nixos/lib/systemd-lib.nixnew file+426

This diff is too big to show here.

nixos/lib/systemd-types.nixnew file+69

This diff is too big to show here.

nixos/lib/systemd-unit-options.nixnew file+711

This diff is too big to show here.

nixos/lib/test-driver/default.nixnew file+32

This diff is too big to show here.

nixos/lib/test-driver/setup.pynew file+13

This diff is too big to show here.

nixos/lib/test-driver/test-driver.pydeleted−966

This diff is too big to show here.

nixos/lib/test-driver/test_driver/__init__.pynew file+128

This diff is too big to show here.

nixos/lib/test-driver/test_driver/driver.pynew file+226

This diff is too big to show here.

nixos/lib/test-driver/test_driver/logger.pynew file+105

This diff is too big to show here.

nixos/lib/test-driver/test_driver/machine.pynew file+1023

This diff is too big to show here.

nixos/lib/test-driver/test_driver/polling_condition.pynew file+77

This diff is too big to show here.

nixos/lib/test-driver/test_driver/vlan.pynew file+58

This diff is too big to show here.

nixos/lib/testing-python.nix+188−236

This diff is too big to show here.

nixos/lib/utils.nix+78−6

This diff is too big to show here.

nixos/maintainers/scripts/azure-new/examples/basic/image.nix+1−1

This diff is too big to show here.

nixos/maintainers/scripts/azure-new/examples/basic/system.nix+1−1

This diff is too big to show here.

nixos/maintainers/scripts/cloudstack/cloudstack-image.nix−1

This diff is too big to show here.

nixos/maintainers/scripts/ec2/amazon-image-zfs.nixnew file+12

This diff is too big to show here.

nixos/maintainers/scripts/ec2/amazon-image.nix+100−29

This diff is too big to show here.

nixos/maintainers/scripts/ec2/create-amis.sh+84−46

This diff is too big to show here.

nixos/maintainers/scripts/gce/create-gce.sh+12

This diff is too big to show here.

nixos/maintainers/scripts/lxd/lxd-image-inner.nixnew file+102

This diff is too big to show here.

nixos/maintainers/scripts/lxd/lxd-image.nixnew file+34

This diff is too big to show here.

nixos/maintainers/scripts/lxd/nix.tplnew file+9

This diff is too big to show here.

nixos/maintainers/scripts/openstack/openstack-image-zfs.nixnew file+101

This diff is too big to show here.

nixos/maintainers/scripts/openstack/openstack-image.nix+10−9

This diff is too big to show here.

nixos/modules/config/console.nix+44−30

This diff is too big to show here.

nixos/modules/config/fonts/fontconfig.nix+36−18

This diff is too big to show here.

nixos/modules/config/fonts/fontdir.nix+2−2

This diff is too big to show here.

nixos/modules/config/fonts/fonts.nix+46−21

This diff is too big to show here.

nixos/modules/config/gnu.nix+4−6

This diff is too big to show here.

nixos/modules/config/gtk/gtk-icon-cache.nix+1

This diff is too big to show here.

nixos/modules/config/i18n.nix+8−2

This diff is too big to show here.

nixos/modules/config/iproute2.nix+9−9

This diff is too big to show here.

nixos/modules/config/krb5/default.nix+8−8

This diff is too big to show here.

nixos/modules/config/ldap.nix+20−17

This diff is too big to show here.

nixos/modules/config/malloc.nix+28−2

This diff is too big to show here.

nixos/modules/config/networking.nix+15−7

This diff is too big to show here.

nixos/modules/config/no-x-libs.nix+1

This diff is too big to show here.

nixos/modules/config/nsswitch.nix+9−6

This diff is too big to show here.

nixos/modules/config/power-management.nix+2−2

This diff is too big to show here.

nixos/modules/config/pulseaudio.nix+13−12

This diff is too big to show here.

nixos/modules/config/resolvconf.nix+2−4

This diff is too big to show here.

nixos/modules/config/shells-environment.nix+15−5

This diff is too big to show here.

nixos/modules/config/swap.nix+34−9

This diff is too big to show here.

nixos/modules/config/sysctl.nix+1−1

This diff is too big to show here.

nixos/modules/config/system-environment.nix+34−36

This diff is too big to show here.

nixos/modules/config/system-path.nix+31−12

This diff is too big to show here.

nixos/modules/config/terminfo.nix+25−1

This diff is too big to show here.

nixos/modules/config/unix-odbc-drivers.nix+1−1

This diff is too big to show here.

nixos/modules/config/update-users-groups.pl+41−18

This diff is too big to show here.

nixos/modules/config/users-groups.nix+112−57

This diff is too big to show here.

nixos/modules/config/xdg/mime.nix+64−2

This diff is too big to show here.

nixos/modules/config/xdg/portal.nix+23−12

This diff is too big to show here.

nixos/modules/config/xdg/portals/wlr.nixnew file+67

This diff is too big to show here.

nixos/modules/hardware/all-firmware.nix+26−7

This diff is too big to show here.

nixos/modules/hardware/ckb-next.nix+1−1

This diff is too big to show here.

nixos/modules/hardware/corectrl.nixnew file+62

This diff is too big to show here.

nixos/modules/hardware/cpu/intel-sgx.nixnew file+69

This diff is too big to show here.

nixos/modules/hardware/device-tree.nix+9−9

This diff is too big to show here.

nixos/modules/hardware/digitalbitbox.nix+1−1

This diff is too big to show here.

nixos/modules/hardware/flirc.nixnew file+12

This diff is too big to show here.

nixos/modules/hardware/gkraken.nixnew file+18

This diff is too big to show here.

nixos/modules/hardware/gpgsmartcards.nixnew file+37

This diff is too big to show here.

nixos/modules/hardware/hackrf.nixnew file+23

This diff is too big to show here.

nixos/modules/hardware/i2c.nixnew file+43

This diff is too big to show here.

nixos/modules/hardware/keyboard/teck.nixnew file+16

This diff is too big to show here.

nixos/modules/hardware/keyboard/zsa.nixnew file+24

This diff is too big to show here.

nixos/modules/hardware/ksm.nix+6−6

This diff is too big to show here.

nixos/modules/hardware/network/ath-user-regd.nixnew file+31

This diff is too big to show here.

nixos/modules/hardware/network/b43.nix−4

This diff is too big to show here.

nixos/modules/hardware/nitrokey.nix+1−15

This diff is too big to show here.

nixos/modules/hardware/onlykey.udevdeleted−4

This diff is too big to show here.

nixos/modules/hardware/onlykey.nix → nixos/modules/hardware/onlykey/default.nixrenamed

The content is the same.

nixos/modules/hardware/onlykey/onlykey.udevnew file+18

This diff is too big to show here.

nixos/modules/hardware/opengl.nix+3−4

This diff is too big to show here.

nixos/modules/hardware/openrazer.nix+18−5

This diff is too big to show here.

nixos/modules/hardware/opentabletdriver.nixnew file+69

This diff is too big to show here.

nixos/modules/hardware/pcmcia.nix+1

This diff is too big to show here.

nixos/modules/hardware/printers.nix+7−12

This diff is too big to show here.

nixos/modules/hardware/raid/hpsa.nix+4−1

This diff is too big to show here.

nixos/modules/hardware/rtl-sdr.nix+9−6

This diff is too big to show here.

nixos/modules/hardware/sata.nixnew file+100

This diff is too big to show here.

nixos/modules/hardware/sensor/hddtemp.nixnew file+81

This diff is too big to show here.

nixos/modules/hardware/sensor/iio.nix+1−1

This diff is too big to show here.

nixos/modules/hardware/system-76.nix+36−3

This diff is too big to show here.

nixos/modules/hardware/ubertooth.nixnew file+29

This diff is too big to show here.

nixos/modules/hardware/video/amdgpu-pro.nix+25−22

This diff is too big to show here.

nixos/modules/hardware/video/amdgpu.nixdeleted−9

This diff is too big to show here.

nixos/modules/hardware/video/ati.nixdeleted−40

This diff is too big to show here.

nixos/modules/hardware/video/bumblebee.nix+1−1

This diff is too big to show here.

nixos/modules/hardware/video/capture/mwprocapture.nix−5

This diff is too big to show here.

nixos/modules/hardware/video/nvidia.nix+140−52

This diff is too big to show here.

nixos/modules/hardware/video/switcheroo-control.nixnew file+18

This diff is too big to show here.

nixos/modules/hardware/video/uvcvideo/default.nix+1−1

This diff is too big to show here.

nixos/modules/hardware/video/webcam/facetimehd.nix+14−6

This diff is too big to show here.

nixos/modules/hardware/xone.nixnew file+23

This diff is too big to show here.

nixos/modules/hardware/xpadneo.nix+1−1

This diff is too big to show here.

nixos/modules/i18n/input-method/default.nix+3−1

This diff is too big to show here.

nixos/modules/i18n/input-method/default.xml+22

This diff is too big to show here.

nixos/modules/i18n/input-method/fcitx.nix+4−1

This diff is too big to show here.

nixos/modules/i18n/input-method/fcitx5.nixnew file+47

This diff is too big to show here.

nixos/modules/i18n/input-method/ibus.nix+5−2

This diff is too big to show here.

nixos/modules/i18n/input-method/kime.nixnew file+51

This diff is too big to show here.

nixos/modules/installer/cd-dvd/channel.nix+2−1

This diff is too big to show here.

nixos/modules/installer/cd-dvd/installation-cd-base.nix+16

This diff is too big to show here.

nixos/modules/installer/cd-dvd/installation-cd-graphical-base.nix+14−8

This diff is too big to show here.

nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares-gnome.nixnew file+59

This diff is too big to show here.

nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares-plasma5.nixnew file+49

This diff is too big to show here.

nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares.nixnew file+20

This diff is too big to show here.

nixos/modules/installer/cd-dvd/installation-cd-graphical-gnome.nix+4−6

This diff is too big to show here.

nixos/modules/installer/cd-dvd/installation-cd-graphical-plasma5.nix+1−3

This diff is too big to show here.

nixos/modules/installer/cd-dvd/iso-image.nix+195−89

This diff is too big to show here.

nixos/modules/installer/cd-dvd/sd-image-aarch64-new-kernel.nix+12−5

This diff is too big to show here.

nixos/modules/installer/cd-dvd/sd-image-aarch64.nix+9−55

This diff is too big to show here.

nixos/modules/installer/cd-dvd/sd-image-armv7l-multiplatform.nix+9−52

This diff is too big to show here.

nixos/modules/installer/cd-dvd/sd-image-raspberrypi.nix+9−41

This diff is too big to show here.

nixos/modules/installer/cd-dvd/sd-image-raspberrypi4.nixdeleted−38

This diff is too big to show here.

nixos/modules/installer/cd-dvd/sd-image.nix+8−238

This diff is too big to show here.

nixos/modules/installer/cd-dvd/system-tarball-fuloong2f.nix+3−3

This diff is too big to show here.

nixos/modules/installer/cd-dvd/system-tarball-pc.nix+3−3

This diff is too big to show here.

nixos/modules/installer/cd-dvd/system-tarball-sheevaplug.nix+5−5

This diff is too big to show here.

nixos/modules/installer/cd-dvd/system-tarball.nix+2−2

This diff is too big to show here.

nixos/modules/installer/kexec/kexec-boot.nixnew file+51

This diff is too big to show here.

nixos/modules/installer/netboot/netboot.nix+14−6

This diff is too big to show here.

nixos/modules/installer/sd-card/sd-image-aarch64-installer.nixnew file+10

This diff is too big to show here.

nixos/modules/installer/sd-card/sd-image-aarch64-new-kernel-installer.nixnew file+10

This diff is too big to show here.

nixos/modules/installer/sd-card/sd-image-aarch64-new-kernel.nixnew file+7

This diff is too big to show here.

nixos/modules/installer/sd-card/sd-image-aarch64.nixnew file+83

This diff is too big to show here.

nixos/modules/installer/sd-card/sd-image-armv7l-multiplatform-installer.nixnew file+10

This diff is too big to show here.

nixos/modules/installer/sd-card/sd-image-armv7l-multiplatform.nixnew file+52

This diff is too big to show here.

nixos/modules/installer/sd-card/sd-image-raspberrypi-installer.nixnew file+10

This diff is too big to show here.

nixos/modules/installer/sd-card/sd-image-raspberrypi.nixnew file+41

This diff is too big to show here.

nixos/modules/installer/sd-card/sd-image-riscv64-qemu-installer.nixnew file+10

This diff is too big to show here.

nixos/modules/installer/sd-card/sd-image-riscv64-qemu.nixnew file+32

This diff is too big to show here.

nixos/modules/installer/sd-card/sd-image-x86_64.nixnew file+27

This diff is too big to show here.

nixos/modules/installer/sd-card/sd-image.nixnew file+269

This diff is too big to show here.

nixos/modules/installer/tools/nix-fallback-paths.nix+5−4

This diff is too big to show here.

nixos/modules/installer/tools/nixos-build-vms/build-vms.nix+18−5

This diff is too big to show here.

nixos/modules/installer/tools/nixos-build-vms/nixos-build-vms.sh+4−3

This diff is too big to show here.

nixos/modules/installer/tools/nixos-enter.sh+36−1

This diff is too big to show here.

nixos/modules/installer/tools/nixos-generate-config.pl+42−6

This diff is too big to show here.

nixos/modules/installer/tools/nixos-install.sh+20−19

This diff is too big to show here.

nixos/modules/installer/tools/nixos-option/default.nix+1−11

This diff is too big to show here.

nixos/modules/installer/tools/nixos-rebuild.shdeleted−506

This diff is too big to show here.

nixos/modules/installer/tools/nixos-version.sh+1

This diff is too big to show here.

nixos/modules/installer/tools/tools.nix+39−21

This diff is too big to show here.

nixos/modules/installer/virtualbox-demo.nix+2−2

This diff is too big to show here.

nixos/modules/misc/crashdump.nix+3−2

This diff is too big to show here.

nixos/modules/misc/documentation.nix+131−55

This diff is too big to show here.

nixos/modules/misc/extra-arguments.nix+2−2

This diff is too big to show here.

nixos/modules/misc/ids.nix+75−62

This diff is too big to show here.

nixos/modules/misc/locate.nix+196−66

This diff is too big to show here.

nixos/modules/misc/man-db.nixnew file+73

This diff is too big to show here.

nixos/modules/misc/mandoc.nixnew file+61

This diff is too big to show here.

nixos/modules/misc/meta.nix+18−3

This diff is too big to show here.

nixos/modules/misc/nixpkgs.nix+18−10

This diff is too big to show here.

nixos/modules/misc/nixpkgs/test.nixnew file+8

This diff is too big to show here.

nixos/modules/misc/version.nix+52−18

This diff is too big to show here.

nixos/modules/misc/wordlist.nixnew file+59

This diff is too big to show here.

nixos/modules/module-list.nix+275−58

This diff is too big to show here.

nixos/modules/profiles/all-hardware.nix+70−4

This diff is too big to show here.

nixos/modules/profiles/base.nix+1

This diff is too big to show here.

nixos/modules/profiles/hardened.nix+8−4

This diff is too big to show here.

nixos/modules/profiles/headless.nix+1−1

This diff is too big to show here.

nixos/modules/profiles/installation-device.nix+20−2

This diff is too big to show here.

nixos/modules/profiles/minimal.nix+2

This diff is too big to show here.

nixos/modules/profiles/qemu-guest.nix+2−4

This diff is too big to show here.

nixos/modules/programs/_1password-gui.nixnew file+68

This diff is too big to show here.

nixos/modules/programs/_1password.nixnew file+44

This diff is too big to show here.

nixos/modules/programs/adb.nix+1−2

This diff is too big to show here.

nixos/modules/programs/appgate-sdp.nixnew file+25

This diff is too big to show here.

nixos/modules/programs/atop.nix+127−8

This diff is too big to show here.

nixos/modules/programs/bandwhich.nix+3−1

This diff is too big to show here.

nixos/modules/programs/bash/bash-completion.nixnew file+37

This diff is too big to show here.

nixos/modules/programs/bash/bash.nix+10−43

This diff is too big to show here.

nixos/modules/programs/bash/ls-colors.nixnew file+20

This diff is too big to show here.

nixos/modules/programs/bash/undistract-me.nixnew file+36

This diff is too big to show here.

nixos/modules/programs/bcc.nix+3−3

This diff is too big to show here.

nixos/modules/programs/calls.nixnew file+27

This diff is too big to show here.

nixos/modules/programs/captive-browser.nix+75−45

This diff is too big to show here.

nixos/modules/programs/ccache.nix+3−1

This diff is too big to show here.

nixos/modules/programs/cdemu.nix+3

This diff is too big to show here.

nixos/modules/programs/chromium.nix+13−2

This diff is too big to show here.

nixos/modules/programs/cnping.nixnew file+21

This diff is too big to show here.

nixos/modules/programs/command-not-found/command-not-found.nix+9−9

This diff is too big to show here.

nixos/modules/programs/command-not-found/command-not-found.pl+43−17

This diff is too big to show here.

nixos/modules/programs/dconf.nix+3−1

This diff is too big to show here.

nixos/modules/programs/digitalbitbox/default.nix+1−1

This diff is too big to show here.

nixos/modules/programs/dmrconfig.nix+1−1

This diff is too big to show here.

nixos/modules/programs/droidcam.nixnew file+16

This diff is too big to show here.

nixos/modules/programs/environment.nix+9−2

This diff is too big to show here.

nixos/modules/programs/evince.nix+13−4

This diff is too big to show here.

nixos/modules/programs/extra-container.nixnew file+17

This diff is too big to show here.

nixos/modules/programs/feedbackd.nixnew file+33

This diff is too big to show here.

nixos/modules/programs/file-roller.nix+13−4

This diff is too big to show here.

nixos/modules/programs/firejail.nix+52−9

This diff is too big to show here.

nixos/modules/programs/fish.nix+196−123

This diff is too big to show here.

nixos/modules/programs/fish_completion-generator.patch+10−9

This diff is too big to show here.

nixos/modules/programs/flashrom.nixnew file+26

This diff is too big to show here.

nixos/modules/programs/flexoptix-app.nixnew file+25

This diff is too big to show here.

nixos/modules/programs/freetds.nix+1−1

This diff is too big to show here.

nixos/modules/programs/gamemode.nixnew file+98

This diff is too big to show here.

nixos/modules/programs/geary.nix+3−3

This diff is too big to show here.

nixos/modules/programs/git.nixnew file+69

This diff is too big to show here.

nixos/modules/programs/gnome-disks.nix+2−2

This diff is too big to show here.

nixos/modules/programs/gnome-documents.nix+5−5

This diff is too big to show here.

nixos/modules/programs/gnome-terminal.nix+3−3

This diff is too big to show here.

nixos/modules/programs/gnupg.nix+4−1

This diff is too big to show here.

nixos/modules/programs/gpaste.nix+4−4

This diff is too big to show here.

nixos/modules/programs/hamster.nix+1−1

This diff is too big to show here.

nixos/modules/programs/htop.nixnew file+58

This diff is too big to show here.

nixos/modules/programs/iftop.nix+3−1

This diff is too big to show here.

nixos/modules/programs/iotop.nix+3−1

This diff is too big to show here.

nixos/modules/programs/java.nix+1−1

This diff is too big to show here.

nixos/modules/programs/k3b.nixnew file+52

This diff is too big to show here.

nixos/modules/programs/k40-whisperer.nixnew file+40

This diff is too big to show here.

nixos/modules/programs/kbdlight.nix+6−1

This diff is too big to show here.

nixos/modules/programs/kclock.nixnew file+13

This diff is too big to show here.

nixos/modules/programs/kdeconnect.nixnew file+35

This diff is too big to show here.

nixos/modules/programs/less.nix+9−6

This diff is too big to show here.

nixos/modules/programs/liboping.nix+3−1

This diff is too big to show here.

nixos/modules/programs/mininet.nix+3−3

This diff is too big to show here.

nixos/modules/programs/mosh.nix+1−1

This diff is too big to show here.

nixos/modules/programs/msmtp.nixnew file+106

This diff is too big to show here.

nixos/modules/programs/mtr.nix+4−1

This diff is too big to show here.

nixos/modules/programs/nbd.nixnew file+19

This diff is too big to show here.

nixos/modules/programs/neovim.nix+29−28

This diff is too big to show here.

nixos/modules/programs/nethoscope.nixnew file+30

This diff is too big to show here.

nixos/modules/programs/nix-ld.nixnew file+12

This diff is too big to show here.

nixos/modules/programs/nncp.nixnew file+101

This diff is too big to show here.

nixos/modules/programs/noisetorch.nixnew file+28

This diff is too big to show here.

nixos/modules/programs/npm.nix+3−2

This diff is too big to show here.

nixos/modules/programs/pantheon-tweaks.nixnew file+19

This diff is too big to show here.

nixos/modules/programs/partition-manager.nixnew file+19

This diff is too big to show here.

nixos/modules/programs/phosh.nixnew file+162

This diff is too big to show here.

nixos/modules/programs/plotinus.nix+1−1

This diff is too big to show here.

nixos/modules/programs/proxychains.nixnew file+165

This diff is too big to show here.

nixos/modules/programs/qt5ct.nix+1−1

This diff is too big to show here.

nixos/modules/programs/seahorse.nix+3−3

This diff is too big to show here.

nixos/modules/programs/shadow.nix+15−8

This diff is too big to show here.

nixos/modules/programs/singularity.nix+6−1

This diff is too big to show here.

nixos/modules/programs/slock.nix+6−1

This diff is too big to show here.

nixos/modules/programs/spacefm.nix+6−6

This diff is too big to show here.

nixos/modules/programs/ssh.nix+73−19

This diff is too big to show here.

nixos/modules/programs/ssmtp.nixdeleted−186

This diff is too big to show here.

nixos/modules/programs/starship.nixnew file+51

This diff is too big to show here.

nixos/modules/programs/steam.nix+40−2

This diff is too big to show here.

nixos/modules/programs/sway.nix+29−16

This diff is too big to show here.

nixos/modules/programs/thefuck.nix+7−6

This diff is too big to show here.

nixos/modules/programs/tmux.nix+14−1

This diff is too big to show here.

nixos/modules/programs/traceroute.nix+3−1

This diff is too big to show here.

nixos/modules/programs/tsm-client.nix+8−8

This diff is too big to show here.

nixos/modules/programs/turbovnc.nixnew file+54

This diff is too big to show here.

nixos/modules/programs/udevil.nix+6−1

This diff is too big to show here.

nixos/modules/programs/venus.nixdeleted−173

This diff is too big to show here.

nixos/modules/programs/vim.nix+2−2

This diff is too big to show here.

nixos/modules/programs/wavemon.nix+3−1

This diff is too big to show here.

nixos/modules/programs/weylus.nixnew file+47

This diff is too big to show here.

nixos/modules/programs/wireshark.nix+1−1

This diff is too big to show here.

nixos/modules/programs/wshowkeys.nix+6−1

This diff is too big to show here.

nixos/modules/programs/xonsh.nix+2−1

This diff is too big to show here.

nixos/modules/programs/xss-lock.nix+2−1

This diff is too big to show here.

nixos/modules/programs/xwayland.nix+13−8

This diff is too big to show here.

nixos/modules/programs/yabar.nix+2−1

This diff is too big to show here.

nixos/modules/programs/zsh/oh-my-zsh.nix+1−1

This diff is too big to show here.

nixos/modules/programs/zsh/zsh-autoenv.nix+1−1

This diff is too big to show here.

nixos/modules/programs/zsh/zsh-autosuggestions.nix+20−11

This diff is too big to show here.

nixos/modules/programs/zsh/zsh-syntax-highlighting.nix+2−2

This diff is too big to show here.

nixos/modules/programs/zsh/zsh.nix+14−6

This diff is too big to show here.

nixos/modules/rename.nix+63−35

This diff is too big to show here.

nixos/modules/security/acme.nixdeleted−688

This diff is too big to show here.

nixos/modules/security/acme.xmldeleted−266

This diff is too big to show here.

nixos/modules/security/acme/default.nixnew file+921

This diff is too big to show here.

nixos/modules/security/acme/doc.xmlnew file+413

This diff is too big to show here.

nixos/modules/security/acme/mk-cert-ownership-assertion.nixnew file+4

This diff is too big to show here.

nixos/modules/security/apparmor-suid.nixdeleted−49

This diff is too big to show here.

nixos/modules/security/apparmor.nix+208−51

This diff is too big to show here.

nixos/modules/security/apparmor/includes.nixnew file+317

This diff is too big to show here.

nixos/modules/security/apparmor/profiles.nixnew file+11

This diff is too big to show here.

nixos/modules/security/ca.nix+11−17

This diff is too big to show here.

nixos/modules/security/chromium-suid-sandbox.nix+6−1

This diff is too big to show here.

nixos/modules/security/dhparams.nix+5−3

This diff is too big to show here.

nixos/modules/security/doas.nix+19−5

This diff is too big to show here.

nixos/modules/security/duosec.nix+6−1

This diff is too big to show here.

nixos/modules/security/google_oslogin.nix+6−3

This diff is too big to show here.

nixos/modules/security/hidepid.nixdeleted−27

This diff is too big to show here.

nixos/modules/security/hidepid.xmldeleted−28

This diff is too big to show here.

nixos/modules/security/lock-kernel-modules.nix+19−9

This diff is too big to show here.

nixos/modules/security/misc.nix+6−2

This diff is too big to show here.

nixos/modules/security/pam.nix+504−145

This diff is too big to show here.

nixos/modules/security/pam_mount.nix+102−7

This diff is too big to show here.

nixos/modules/security/pam_usb.nix+12−2

This diff is too big to show here.

nixos/modules/security/polkit.nix+15−7

This diff is too big to show here.

nixos/modules/security/rngd.nix+12−52

This diff is too big to show here.

nixos/modules/security/rtkit.nix+4−1

This diff is too big to show here.

nixos/modules/security/sudo.nix+28−6

This diff is too big to show here.

nixos/modules/security/systemd-confinement.nix+7−9

This diff is too big to show here.

nixos/modules/security/tpm2.nix+5−5

This diff is too big to show here.

nixos/modules/security/wrappers/default.nix+197−106

This diff is too big to show here.

nixos/modules/security/wrappers/wrapper.c+162−168

This diff is too big to show here.

nixos/modules/security/wrappers/wrapper.nixnew file+21

This diff is too big to show here.

nixos/modules/services/admin/meshcentral.nixnew file+53

This diff is too big to show here.

nixos/modules/services/admin/oxidized.nix+2−2

This diff is too big to show here.

nixos/modules/services/admin/pgadmin.nixnew file+127

This diff is too big to show here.

nixos/modules/services/amqp/activemq/default.nix+3−1

This diff is too big to show here.

nixos/modules/services/amqp/rabbitmq.nix+26−9

This diff is too big to show here.

nixos/modules/services/audio/alsa.nix+9−9

This diff is too big to show here.

nixos/modules/services/audio/botamusique.nixnew file+115

This diff is too big to show here.

nixos/modules/services/audio/hqplayerd.nixnew file+142

This diff is too big to show here.

nixos/modules/services/audio/icecast.nix+1

This diff is too big to show here.

nixos/modules/services/audio/jack.nix+8−8

This diff is too big to show here.

nixos/modules/services/audio/jmusicbot.nixnew file+48

This diff is too big to show here.

nixos/modules/services/audio/liquidsoap.nix+3−3

This diff is too big to show here.

nixos/modules/services/audio/mopidy.nix+1−1

This diff is too big to show here.

nixos/modules/services/audio/mpd.nix+78−56

This diff is too big to show here.

nixos/modules/services/audio/mpdscribble.nixnew file+213

This diff is too big to show here.

nixos/modules/services/audio/navidrome.nixnew file+71

This diff is too big to show here.

nixos/modules/services/audio/networkaudiod.nixnew file+19

This diff is too big to show here.

nixos/modules/services/audio/roon-bridge.nixnew file+76

This diff is too big to show here.

nixos/modules/services/audio/roon-server.nix+9−4

This diff is too big to show here.

nixos/modules/services/audio/slimserver.nix+2−1

This diff is too big to show here.

nixos/modules/services/audio/snapserver.nix+55−24

This diff is too big to show here.

nixos/modules/services/audio/spotifyd.nix+27−1

This diff is too big to show here.

nixos/modules/services/audio/squeezelite.nix+17−21

This diff is too big to show here.

nixos/modules/services/audio/ympd.nix+1−1

This diff is too big to show here.

nixos/modules/services/backup/automysqlbackup.nix+3−2

This diff is too big to show here.

nixos/modules/services/backup/bacula.nix+24−2

This diff is too big to show here.

nixos/modules/services/backup/borgbackup.nix+78−23

This diff is too big to show here.

nixos/modules/services/backup/borgmatic.nixnew file+57

This diff is too big to show here.

nixos/modules/services/backup/btrbk.nixnew file+220

This diff is too big to show here.

nixos/modules/services/backup/duplicati.nix+31−12

This diff is too big to show here.

nixos/modules/services/backup/duplicity.nix+73−18

This diff is too big to show here.

nixos/modules/services/backup/mysql-backup.nix+8−3

This diff is too big to show here.

nixos/modules/services/backup/postgresql-backup.nix+47−9

This diff is too big to show here.

nixos/modules/services/backup/postgresql-wal-receiver.nix+5−5

This diff is too big to show here.

nixos/modules/services/backup/restic-rest-server.nix+5−1

This diff is too big to show here.

nixos/modules/services/backup/restic.nix+27−10

This diff is too big to show here.

nixos/modules/services/backup/sanoid.nix+143−152

This diff is too big to show here.

nixos/modules/services/backup/syncoid.nix+390−185

This diff is too big to show here.

nixos/modules/services/backup/tarsnap.nix+29−27

This diff is too big to show here.

nixos/modules/services/backup/tsm.nix+33−14

This diff is too big to show here.

nixos/modules/services/backup/znapzend.nix+8−8

This diff is too big to show here.

nixos/modules/services/backup/zrepl.nixnew file+57

This diff is too big to show here.

nixos/modules/services/blockchain/ethereum/geth.nixnew file+179

This diff is too big to show here.

nixos/modules/services/cluster/corosync/default.nixnew file+112

This diff is too big to show here.

nixos/modules/services/cluster/hadoop/conf.nix+25−12

This diff is too big to show here.

nixos/modules/services/cluster/hadoop/default.nix+180−25

This diff is too big to show here.

nixos/modules/services/cluster/hadoop/hdfs.nix+175−44

This diff is too big to show here.

nixos/modules/services/cluster/hadoop/yarn.nix+155−29

This diff is too big to show here.

nixos/modules/services/cluster/k3s/default.nix+36−9

This diff is too big to show here.

nixos/modules/services/cluster/kubernetes/addon-manager.nix+8−4

This diff is too big to show here.

nixos/modules/services/cluster/kubernetes/addons/dashboard.nixdeleted−332

This diff is too big to show here.

nixos/modules/services/cluster/kubernetes/addons/dns.nix+53−19

This diff is too big to show here.

nixos/modules/services/cluster/kubernetes/apiserver.nix+47−16

This diff is too big to show here.

nixos/modules/services/cluster/kubernetes/controller-manager.nix+11−2

This diff is too big to show here.

nixos/modules/services/cluster/kubernetes/default.nix+39−11

This diff is too big to show here.

nixos/modules/services/cluster/kubernetes/flannel.nix+6−40

This diff is too big to show here.

nixos/modules/services/cluster/kubernetes/kubelet.nix+58−10

This diff is too big to show here.

nixos/modules/services/cluster/kubernetes/pki.nix+6−1

This diff is too big to show here.

nixos/modules/services/cluster/kubernetes/proxy.nix+11−3

This diff is too big to show here.

nixos/modules/services/cluster/kubernetes/scheduler.nix+11−4

This diff is too big to show here.

nixos/modules/services/cluster/pacemaker/default.nixnew file+52

This diff is too big to show here.

nixos/modules/services/cluster/spark/default.nixnew file+162

This diff is too big to show here.

nixos/modules/services/computing/boinc/client.nix+2−2

This diff is too big to show here.

nixos/modules/services/computing/foldingathome/client.nix+11−1

This diff is too big to show here.

nixos/modules/services/computing/slurm/slurm.nix+67−43

This diff is too big to show here.

nixos/modules/services/continuous-integration/buildbot/master.nix+13−9

This diff is too big to show here.

nixos/modules/services/continuous-integration/buildbot/worker.nix+7−5

This diff is too big to show here.

nixos/modules/services/continuous-integration/buildkite-agents.nix+12−8

This diff is too big to show here.

nixos/modules/services/continuous-integration/github-runner.nixnew file+320

This diff is too big to show here.

nixos/modules/services/continuous-integration/gitlab-runner.nix+24−11

This diff is too big to show here.

nixos/modules/services/continuous-integration/gocd-agent/default.nix+14−2

This diff is too big to show here.

nixos/modules/services/continuous-integration/gocd-server/default.nix+20−2

This diff is too big to show here.

nixos/modules/services/continuous-integration/hail.nix+1−1

This diff is too big to show here.

nixos/modules/services/continuous-integration/hercules-ci-agent/common.nix+137−84

This diff is too big to show here.

nixos/modules/services/continuous-integration/hercules-ci-agent/default.nix+25−9

This diff is too big to show here.

nixos/modules/services/continuous-integration/hydra/default.nix+41−18

This diff is too big to show here.

nixos/modules/services/continuous-integration/jenkins/default.nix+30−9

This diff is too big to show here.

nixos/modules/services/continuous-integration/jenkins/job-builder.nix+52−16

This diff is too big to show here.

nixos/modules/services/continuous-integration/jenkins/slave.nix+15−1

This diff is too big to show here.

nixos/modules/services/databases/aerospike.nix+1−1

This diff is too big to show here.

nixos/modules/services/databases/cassandra.nix+245−174

This diff is too big to show here.

nixos/modules/services/databases/clickhouse.nix+14−4

This diff is too big to show here.

nixos/modules/services/databases/cockroachdb.nix+38−30

This diff is too big to show here.

nixos/modules/services/databases/couchdb.nix+27−20

This diff is too big to show here.

nixos/modules/services/databases/firebird.nix+19−12

This diff is too big to show here.

nixos/modules/services/databases/hbase.nix+39−17

This diff is too big to show here.

nixos/modules/services/databases/influxdb.nix+4−4

This diff is too big to show here.

nixos/modules/services/databases/influxdb2.nixnew file+66

This diff is too big to show here.

nixos/modules/services/databases/memcached.nix+12−5

This diff is too big to show here.

nixos/modules/services/databases/monetdb.nix+1−1

This diff is too big to show here.

nixos/modules/services/databases/mongodb.nix+12−3

This diff is too big to show here.

nixos/modules/services/databases/mysql.nix+192−191

This diff is too big to show here.

nixos/modules/services/databases/neo4j.nix+16−6

This diff is too big to show here.

nixos/modules/services/databases/openldap.nix+8−7

This diff is too big to show here.

nixos/modules/services/databases/opentsdb.nix+1−2

This diff is too big to show here.

nixos/modules/services/databases/pgmanage.nix+2−1

This diff is too big to show here.

nixos/modules/services/databases/postgresql.nix+30−15

This diff is too big to show here.

nixos/modules/services/databases/postgresql.xml+54−32

This diff is too big to show here.

nixos/modules/services/databases/redis.nix+342−202

This diff is too big to show here.

nixos/modules/services/databases/riak.nix+1−2

This diff is too big to show here.

nixos/modules/services/databases/victoriametrics.nix+9−1

This diff is too big to show here.

nixos/modules/services/databases/virtuoso.nixdeleted−94

This diff is too big to show here.

nixos/modules/services/desktops/bamf.nix+2−2

This diff is too big to show here.

nixos/modules/services/desktops/cpupower-gui.nixnew file+56

This diff is too big to show here.

nixos/modules/services/desktops/espanso.nix−1

This diff is too big to show here.

nixos/modules/services/desktops/flatpak.nix+3−13

This diff is too big to show here.

nixos/modules/services/desktops/geoclue2.nix+7−5

This diff is too big to show here.

nixos/modules/services/desktops/gnome/at-spi2-core.nixnew file+57

This diff is too big to show here.

nixos/modules/services/desktops/gnome/chrome-gnome-shell.nixnew file+41

This diff is too big to show here.

nixos/modules/services/desktops/gnome/evolution-data-server.nixnew file+71

This diff is too big to show here.

nixos/modules/services/desktops/gnome/glib-networking.nixnew file+45

This diff is too big to show here.

nixos/modules/services/desktops/gnome3/gnome-initial-setup.nix → nixos/modules/services/desktops/gnome/gnome-initial-setup.nixrenamed+12−4

This diff is too big to show here.

nixos/modules/services/desktops/gnome/gnome-keyring.nixnew file+63

This diff is too big to show here.

nixos/modules/services/desktops/gnome/gnome-online-accounts.nixnew file+51

This diff is too big to show here.

nixos/modules/services/desktops/gnome/gnome-online-miners.nixnew file+51

This diff is too big to show here.

nixos/modules/services/desktops/gnome/gnome-remote-desktop.nixnew file+32

This diff is too big to show here.

nixos/modules/services/desktops/gnome/gnome-settings-daemon.nixnew file+70

This diff is too big to show here.

nixos/modules/services/desktops/gnome/gnome-user-share.nixnew file+48

This diff is too big to show here.

nixos/modules/services/desktops/gnome/rygel.nixnew file+44

This diff is too big to show here.

nixos/modules/services/desktops/gnome/sushi.nixnew file+50

This diff is too big to show here.

nixos/modules/services/desktops/gnome/tracker-miners.nixnew file+54

This diff is too big to show here.

nixos/modules/services/desktops/gnome/tracker.nixnew file+76

This diff is too big to show here.

nixos/modules/services/desktops/gnome3/at-spi2-core.nixdeleted−49

This diff is too big to show here.

nixos/modules/services/desktops/gnome3/chrome-gnome-shell.nixdeleted−33

This diff is too big to show here.

nixos/modules/services/desktops/gnome3/evolution-data-server.nixdeleted−45

This diff is too big to show here.

nixos/modules/services/desktops/gnome3/glib-networking.nixdeleted−37

This diff is too big to show here.

nixos/modules/services/desktops/gnome3/gnome-keyring.nixdeleted−53

This diff is too big to show here.

nixos/modules/services/desktops/gnome3/gnome-online-accounts.nixdeleted−43

This diff is too big to show here.

nixos/modules/services/desktops/gnome3/gnome-online-miners.nixdeleted−43

This diff is too big to show here.

nixos/modules/services/desktops/gnome3/gnome-remote-desktop.nixdeleted−24

This diff is too big to show here.

nixos/modules/services/desktops/gnome3/gnome-settings-daemon.nixdeleted−78

This diff is too big to show here.

nixos/modules/services/desktops/gnome3/gnome-user-share.nixdeleted−40

This diff is too big to show here.

nixos/modules/services/desktops/gnome3/rygel.nixdeleted−36

This diff is too big to show here.

nixos/modules/services/desktops/gnome3/sushi.nixdeleted−42

This diff is too big to show here.

nixos/modules/services/desktops/gnome3/tracker-miners.nixdeleted−44

This diff is too big to show here.

nixos/modules/services/desktops/gnome3/tracker.nixdeleted−45

This diff is too big to show here.

nixos/modules/services/desktops/gsignond.nix+1−1

This diff is too big to show here.

nixos/modules/services/desktops/gvfs.nix+4−3

This diff is too big to show here.

nixos/modules/services/desktops/pantheon/files.nixdeleted−13

This diff is too big to show here.

nixos/modules/services/desktops/pipewire.nixdeleted−105

This diff is too big to show here.

nixos/modules/services/desktops/pipewire/daemon/client-rt.conf.jsonnew file+39

This diff is too big to show here.

nixos/modules/services/desktops/pipewire/daemon/client.conf.jsonnew file+31

This diff is too big to show here.

nixos/modules/services/desktops/pipewire/daemon/jack.conf.jsonnew file+38

This diff is too big to show here.

nixos/modules/services/desktops/pipewire/daemon/minimal.conf.jsonnew file+118

This diff is too big to show here.

nixos/modules/services/desktops/pipewire/daemon/pipewire-pulse.conf.jsonnew file+100

This diff is too big to show here.

nixos/modules/services/desktops/pipewire/daemon/pipewire.conf.jsonnew file+96

This diff is too big to show here.

nixos/modules/services/desktops/pipewire/media-session/alsa-monitor.conf.jsonnew file+34

This diff is too big to show here.

nixos/modules/services/desktops/pipewire/media-session/bluez-monitor.conf.jsonnew file+36

This diff is too big to show here.

nixos/modules/services/desktops/pipewire/media-session/media-session.conf.jsonnew file+68

This diff is too big to show here.

nixos/modules/services/desktops/pipewire/media-session/v4l2-monitor.conf.jsonnew file+30

This diff is too big to show here.

nixos/modules/services/desktops/pipewire/pipewire-media-session.nixnew file+141

This diff is too big to show here.

nixos/modules/services/desktops/pipewire/pipewire.nixnew file+262

This diff is too big to show here.

nixos/modules/services/desktops/pipewire/wireplumber.nixnew file+54

This diff is too big to show here.

nixos/modules/services/desktops/telepathy.nix+1−1

This diff is too big to show here.

nixos/modules/services/desktops/tumbler.nix+2−2

This diff is too big to show here.

nixos/modules/services/desktops/zeitgeist.nix+2−2

This diff is too big to show here.

nixos/modules/services/development/blackfire.nix+4−9

This diff is too big to show here.

nixos/modules/services/development/blackfire.xml+2−1

This diff is too big to show here.

nixos/modules/services/development/bloop.nix+1−1

This diff is too big to show here.

nixos/modules/services/development/distccd.nixnew file+155

This diff is too big to show here.

nixos/modules/services/development/hoogle.nix+13−8

This diff is too big to show here.

nixos/modules/services/development/jupyter/default.nix+5−6

This diff is too big to show here.

nixos/modules/services/development/jupyter/kernel-options.nix+4−4

This diff is too big to show here.

nixos/modules/services/development/jupyterhub/default.nix+21−9

This diff is too big to show here.

nixos/modules/services/development/lorri.nix+1−2

This diff is too big to show here.

nixos/modules/services/development/rstudio-server/default.nixnew file+107

This diff is too big to show here.

nixos/modules/services/development/zammad.nixnew file+323

This diff is too big to show here.

nixos/modules/services/display-managers/greetd.nixnew file+111

This diff is too big to show here.

nixos/modules/services/editors/emacs.nix+1−1

This diff is too big to show here.

nixos/modules/services/editors/emacs.xml+5−5

This diff is too big to show here.

nixos/modules/services/editors/haste.nixnew file+86

This diff is too big to show here.

nixos/modules/services/editors/infinoted.nix+6−6

This diff is too big to show here.

nixos/modules/services/finance/odoo.nixnew file+122

This diff is too big to show here.

nixos/modules/services/games/asf.nixnew file+236

This diff is too big to show here.

nixos/modules/services/games/crossfire-server.nixnew file+179

This diff is too big to show here.

nixos/modules/services/games/deliantra-server.nixnew file+172

This diff is too big to show here.

nixos/modules/services/games/factorio.nix+36−6

This diff is too big to show here.

nixos/modules/services/games/freeciv.nixnew file+187

This diff is too big to show here.

nixos/modules/services/games/minecraft-server.nix+29−6

This diff is too big to show here.

nixos/modules/services/games/minetest-server.nix+1−1

This diff is too big to show here.

nixos/modules/services/games/openarena.nix+1−1

This diff is too big to show here.

nixos/modules/services/games/quake3-server.nixnew file+112

This diff is too big to show here.

nixos/modules/services/games/terraria.nix+18−4

This diff is too big to show here.

nixos/modules/services/hardware/acpid.nix+16−17

This diff is too big to show here.

nixos/modules/services/hardware/actkbd.nix+2−2

This diff is too big to show here.

nixos/modules/services/hardware/auto-cpufreq.nixnew file+24

This diff is too big to show here.

nixos/modules/services/hardware/bluetooth.nix+84−68

This diff is too big to show here.

nixos/modules/services/hardware/brltty.nix+32−25

This diff is too big to show here.

nixos/modules/services/hardware/ddccontrol.nixnew file+39

This diff is too big to show here.

nixos/modules/services/hardware/fancontrol.nix+10−7

This diff is too big to show here.

nixos/modules/services/hardware/freefall.nix+1−1

This diff is too big to show here.

nixos/modules/services/hardware/fwupd.nix+2−1

This diff is too big to show here.

nixos/modules/services/hardware/interception-tools.nix+1

This diff is too big to show here.

nixos/modules/services/hardware/joycond.nixnew file+36

This diff is too big to show here.

nixos/modules/services/hardware/lirc.nix+1−1

This diff is too big to show here.

nixos/modules/services/hardware/pcscd.nix+45−41

This diff is too big to show here.

nixos/modules/services/hardware/power-profiles-daemon.nixnew file+55

This diff is too big to show here.

nixos/modules/services/hardware/rasdaemon.nixnew file+170

This diff is too big to show here.

nixos/modules/services/hardware/sane.nix+41−6

This diff is too big to show here.

nixos/modules/services/hardware/sane_extra_backends/brscan4.nix+4−4

This diff is too big to show here.

nixos/modules/services/hardware/sane_extra_backends/brscan4_etc_files.nix+7−10

This diff is too big to show here.

nixos/modules/services/hardware/sane_extra_backends/brscan5.nixnew file+110

This diff is too big to show here.

nixos/modules/services/hardware/sane_extra_backends/brscan5_etc_files.nixnew file+77

This diff is too big to show here.

nixos/modules/services/hardware/spacenavd.nixnew file+24

This diff is too big to show here.

nixos/modules/services/hardware/tcsd.nix+29−18

This diff is too big to show here.

nixos/modules/services/hardware/thermald.nix+12−12

This diff is too big to show here.

nixos/modules/services/hardware/thinkfan.nix+166−94

This diff is too big to show here.

nixos/modules/services/hardware/throttled.nix+6

This diff is too big to show here.

nixos/modules/services/hardware/trezord.nix+2−2

This diff is too big to show here.

nixos/modules/services/hardware/triggerhappy.nix+2−2

This diff is too big to show here.

nixos/modules/services/hardware/udev.nix+133−9

This diff is too big to show here.

nixos/modules/services/hardware/udisks2.nix+41

This diff is too big to show here.

nixos/modules/services/hardware/undervolt.nix+2−4

This diff is too big to show here.

nixos/modules/services/hardware/upower.nix+7−8

This diff is too big to show here.

nixos/modules/services/hardware/usbrelayd.nixnew file+44

This diff is too big to show here.

nixos/modules/services/hardware/vdr.nix+2−2

This diff is too big to show here.

nixos/modules/services/hardware/xow.nix+3

This diff is too big to show here.

nixos/modules/services/home-automation/home-assistant.nixnew file+552

This diff is too big to show here.

nixos/modules/services/home-automation/zigbee2mqtt.nixnew file+142

This diff is too big to show here.

nixos/modules/services/logging/SystemdJournal2Gelf.nix+1

This diff is too big to show here.

nixos/modules/services/logging/awstats.nix+4−4

This diff is too big to show here.

nixos/modules/services/logging/filebeat.nixnew file+253

This diff is too big to show here.

nixos/modules/services/logging/fluentd.nix+1−1

This diff is too big to show here.

nixos/modules/services/logging/graylog.nix+7−8

This diff is too big to show here.

nixos/modules/services/logging/journalbeat.nix+4−17

This diff is too big to show here.

nixos/modules/services/logging/journalwatch.nix+1

This diff is too big to show here.

nixos/modules/services/logging/klogd.nix+6−34

This diff is too big to show here.

nixos/modules/services/logging/logcheck.nix+6−2

This diff is too big to show here.

nixos/modules/services/logging/logrotate.nix+267−33

This diff is too big to show here.

nixos/modules/services/logging/logstash.nix+26−13

This diff is too big to show here.

nixos/modules/services/logging/promtail.nix+6−1

This diff is too big to show here.

nixos/modules/services/logging/syslog-ng.nix+2−2

This diff is too big to show here.

nixos/modules/services/logging/vector.nixnew file+64

This diff is too big to show here.

nixos/modules/services/mail/davmail.nix+1−1

This diff is too big to show here.

nixos/modules/services/mail/dovecot.nix+21−50

This diff is too big to show here.

nixos/modules/services/mail/exim.nix+16−4

This diff is too big to show here.

nixos/modules/services/mail/maddy.nixnew file+273

This diff is too big to show here.

nixos/modules/services/mail/mail.nix+2−1

This diff is too big to show here.

nixos/modules/services/mail/mailman.nix+51−19

This diff is too big to show here.

nixos/modules/services/mail/mailman.xml+40−5

This diff is too big to show here.

nixos/modules/services/mail/mlmmj.nix+30−13

This diff is too big to show here.

nixos/modules/services/mail/nullmailer.nix+2−1

This diff is too big to show here.

nixos/modules/services/mail/offlineimap.nix+2−2

This diff is too big to show here.

nixos/modules/services/mail/opendkim.nix+2−1

This diff is too big to show here.

nixos/modules/services/mail/opensmtpd.nix+5−2

This diff is too big to show here.

nixos/modules/services/mail/postfix.nix+56−36

This diff is too big to show here.

nixos/modules/services/mail/postfixadmin.nixnew file+199

This diff is too big to show here.

nixos/modules/services/mail/postgrey.nix+1−1

This diff is too big to show here.

nixos/modules/services/mail/roundcube.nix+5−4

This diff is too big to show here.

nixos/modules/services/mail/rspamd.nix+45−15

This diff is too big to show here.

nixos/modules/services/mail/spamassassin.nix+36−29

This diff is too big to show here.

nixos/modules/services/mail/sympa.nix+4−4

This diff is too big to show here.

nixos/modules/services/misc/matrix-synapse-log_config.yaml → nixos/modules/services/matrix/matrix-synapse-log_config.yamlrenamed

The content is the same.

nixos/modules/services/matrix/matrix-synapse.nixnew file+773

This diff is too big to show here.

nixos/modules/services/misc/matrix-synapse.xml → nixos/modules/services/matrix/matrix-synapse.xmlrenamed+25−21

This diff is too big to show here.

nixos/modules/services/matrix/mjolnir.nixnew file+242

This diff is too big to show here.

nixos/modules/services/matrix/mjolnir.xmlnew file+134

This diff is too big to show here.

nixos/modules/services/matrix/pantalaimon-options.nixnew file+70

This diff is too big to show here.

nixos/modules/services/matrix/pantalaimon.nixnew file+70

This diff is too big to show here.

nixos/modules/services/misc/airsonic.nix+32−8

This diff is too big to show here.

nixos/modules/services/misc/ananicy.nixnew file+107

This diff is too big to show here.

nixos/modules/services/misc/ankisyncd.nix+1−1

This diff is too big to show here.

nixos/modules/services/misc/apache-kafka.nix+13−16

This diff is too big to show here.

nixos/modules/services/misc/autofs.nix+2−1

This diff is too big to show here.

nixos/modules/services/misc/autorandr.nix+309−2

This diff is too big to show here.

nixos/modules/services/misc/bazarr.nix+1

This diff is too big to show here.

nixos/modules/services/misc/bees.nix+44−35

This diff is too big to show here.

nixos/modules/services/misc/cfdyndns.nix+1−1

This diff is too big to show here.

nixos/modules/services/misc/cgminer.nix+11−3

This diff is too big to show here.

nixos/modules/services/misc/clipcat.nixnew file+31

This diff is too big to show here.

nixos/modules/services/misc/clipmenu.nix+1−1

This diff is too big to show here.

nixos/modules/services/misc/confd.nix+1−1

This diff is too big to show here.

nixos/modules/services/misc/couchpotato.nixdeleted−42

This diff is too big to show here.

nixos/modules/services/misc/defaultUnicornConfig.rbdeleted−69

This diff is too big to show here.

nixos/modules/services/misc/dendrite.nixnew file+273

This diff is too big to show here.

nixos/modules/services/misc/dictd.nix+3−3

This diff is too big to show here.

nixos/modules/services/misc/disnix.nix+12−2

This diff is too big to show here.

nixos/modules/services/misc/docker-registry.nix+3−1

This diff is too big to show here.

nixos/modules/services/misc/duckling.nixnew file+39

This diff is too big to show here.

nixos/modules/services/misc/dwm-status.nix+2−2

This diff is too big to show here.

nixos/modules/services/misc/dysnomia.nix+71−23

This diff is too big to show here.

nixos/modules/services/misc/etcd.nix+14−4

This diff is too big to show here.

nixos/modules/services/misc/etebase-server.nixnew file+226

This diff is too big to show here.

nixos/modules/services/misc/etesync-dav.nixnew file+92

This diff is too big to show here.

nixos/modules/services/misc/ethminer.nix+4−4

This diff is too big to show here.

nixos/modules/services/misc/exhibitor.nix+5−2

This diff is too big to show here.

nixos/modules/services/misc/felix.nix+3−1

This diff is too big to show here.

nixos/modules/services/misc/freeswitch.nix+4−5

This diff is too big to show here.

nixos/modules/services/misc/fstrim.nix+1−1

This diff is too big to show here.

nixos/modules/services/misc/gammu-smsd.nix+2−2

This diff is too big to show here.

nixos/modules/services/misc/geoip-updater.nixdeleted−306

This diff is too big to show here.

nixos/modules/services/misc/geoipupdate.nixnew file+187

This diff is too big to show here.

nixos/modules/services/misc/gitea.nix+100−51

This diff is too big to show here.

nixos/modules/services/misc/gitit.nix+28−27

This diff is too big to show here.

nixos/modules/services/misc/gitlab.nix+653−164

This diff is too big to show here.

nixos/modules/services/misc/gitlab.xml+38−19

This diff is too big to show here.

nixos/modules/services/misc/gitolite.nix+8−6

This diff is too big to show here.

nixos/modules/services/misc/gitweb.nix+2−1

This diff is too big to show here.

nixos/modules/services/misc/gogs.nix+4−9

This diff is too big to show here.

nixos/modules/services/misc/gollum.nix+3

This diff is too big to show here.

nixos/modules/services/misc/gpsd.nix+2−1

This diff is too big to show here.

nixos/modules/services/misc/greenclip.nix+1−1

This diff is too big to show here.

nixos/modules/services/misc/headphones.nix+3−1

This diff is too big to show here.

nixos/modules/services/misc/heisenbridge.nixnew file+222

This diff is too big to show here.

nixos/modules/services/misc/home-assistant.nixdeleted−276

This diff is too big to show here.

nixos/modules/services/misc/ihaskell.nix+5−3

This diff is too big to show here.

nixos/modules/services/misc/input-remapper.nixnew file+30

This diff is too big to show here.

nixos/modules/services/misc/jackett.nix+1−1

This diff is too big to show here.

nixos/modules/services/misc/jellyfin.nix+24−12

This diff is too big to show here.

nixos/modules/services/misc/klipper.nix+70−12

This diff is too big to show here.

nixos/modules/services/misc/leaps.nix+1−1

This diff is too big to show here.

nixos/modules/services/misc/libreddit.nixnew file+66

This diff is too big to show here.

nixos/modules/services/misc/lidarr.nix+1−1

This diff is too big to show here.

nixos/modules/services/misc/lifecycled.nixnew file+164

This diff is too big to show here.

nixos/modules/services/misc/mame.nix+5−3

This diff is too big to show here.

nixos/modules/services/misc/matrix-appservice-discord.nix+8−9

This diff is too big to show here.

nixos/modules/services/misc/matrix-appservice-irc.nixnew file+232

This diff is too big to show here.

nixos/modules/services/misc/matrix-conduit.nixnew file+149

This diff is too big to show here.

nixos/modules/services/misc/matrix-synapse.nixdeleted−737

This diff is too big to show here.

nixos/modules/services/misc/mautrix-facebook.nixnew file+195

This diff is too big to show here.

nixos/modules/services/misc/mautrix-telegram.nix+24−6

This diff is too big to show here.

nixos/modules/services/misc/mbpfan.nix+59−61

This diff is too big to show here.

nixos/modules/services/misc/mediatomb.nix+10−7

This diff is too big to show here.

nixos/modules/services/misc/moonraker.nixnew file+178

This diff is too big to show here.

nixos/modules/services/misc/mwlib.nixdeleted−258

This diff is too big to show here.

nixos/modules/services/misc/mx-puppet-discord.nixnew file+122

This diff is too big to show here.

nixos/modules/services/misc/n8n.nixnew file+79

This diff is too big to show here.

nixos/modules/services/misc/nitter.nixnew file+358

This diff is too big to show here.

nixos/modules/services/misc/nix-daemon.nix+510−283

This diff is too big to show here.

nixos/modules/services/misc/nix-gc.nix+52−7

This diff is too big to show here.

nixos/modules/services/misc/nix-optimise.nix+8−2

This diff is too big to show here.

nixos/modules/services/misc/nix-ssh-serve.nix+10−2

This diff is too big to show here.

nixos/modules/services/misc/nzbget.nix+36−18

This diff is too big to show here.

nixos/modules/services/misc/nzbhydra2.nixnew file+78

This diff is too big to show here.

nixos/modules/services/misc/octoprint.nix+7−3

This diff is too big to show here.

nixos/modules/services/misc/ombi.nixnew file+81

This diff is too big to show here.

nixos/modules/services/misc/owncast.nixnew file+98

This diff is too big to show here.

nixos/modules/services/misc/packagekit.nix+51−42

This diff is too big to show here.

nixos/modules/services/misc/paperless.nix+204−67

This diff is too big to show here.

nixos/modules/services/misc/pinnwand.nix+47−22

This diff is too big to show here.

nixos/modules/services/misc/plex.nix+43−14

This diff is too big to show here.

nixos/modules/services/misc/plikd.nixnew file+82

This diff is too big to show here.

nixos/modules/services/misc/podgrab.nixnew file+50

This diff is too big to show here.

nixos/modules/services/misc/prowlarr.nixnew file+41

This diff is too big to show here.

nixos/modules/services/misc/pykms.nix+7−6

This diff is too big to show here.

nixos/modules/services/misc/redmine.nix+13−12

This diff is too big to show here.

nixos/modules/services/misc/ripple-data-api.nix+3−1

This diff is too big to show here.

nixos/modules/services/misc/rippled.nix+12−5

This diff is too big to show here.

nixos/modules/services/misc/rmfakecloud.nixnew file+147

This diff is too big to show here.

nixos/modules/services/misc/safeeyes.nix+4

This diff is too big to show here.

nixos/modules/services/misc/sdrplay.nixnew file+35

This diff is too big to show here.

nixos/modules/services/misc/sickbeard.nix+6−3

This diff is too big to show here.

nixos/modules/services/misc/signald.nixnew file+105

This diff is too big to show here.

nixos/modules/services/misc/snapper.nix+42−17

This diff is too big to show here.

nixos/modules/services/misc/sourcehut/builds.nixnew file+236

This diff is too big to show here.

nixos/modules/services/misc/sourcehut/default.nixnew file+1386

This diff is too big to show here.

nixos/modules/services/misc/sourcehut/dispatch.nixnew file+127

This diff is too big to show here.

nixos/modules/services/misc/sourcehut/git.nixnew file+217

This diff is too big to show here.

nixos/modules/services/misc/sourcehut/hg.nixnew file+175

This diff is too big to show here.

nixos/modules/services/misc/sourcehut/hub.nixnew file+120

This diff is too big to show here.

nixos/modules/services/misc/sourcehut/lists.nixnew file+187

This diff is too big to show here.

nixos/modules/services/misc/sourcehut/man.nixnew file+124

This diff is too big to show here.

nixos/modules/services/misc/sourcehut/meta.nixnew file+213

This diff is too big to show here.

nixos/modules/services/misc/sourcehut/paste.nixnew file+135

This diff is too big to show here.

nixos/modules/services/misc/sourcehut/service.nixnew file+375

This diff is too big to show here.

nixos/modules/services/misc/sourcehut/sourcehut.xmlnew file+119

This diff is too big to show here.

nixos/modules/services/misc/sourcehut/todo.nixnew file+163

This diff is too big to show here.

nixos/modules/services/misc/ssm-agent.nix+11−4

This diff is too big to show here.

nixos/modules/services/misc/subsonic.nix+10−6

This diff is too big to show here.

nixos/modules/services/misc/svnserve.nix+1

This diff is too big to show here.

nixos/modules/services/misc/synergy.nix+26−1

This diff is too big to show here.

nixos/modules/services/misc/taskserver/default.nix+15−10

This diff is too big to show here.

nixos/modules/services/misc/taskserver/doc.xml+1−1

This diff is too big to show here.

nixos/modules/services/misc/taskserver/helper-tool.py+5−5

This diff is too big to show here.

nixos/modules/services/misc/tautulli.nix+1−1

This diff is too big to show here.

nixos/modules/services/misc/tp-auto-kbbl.nixnew file+58

This diff is too big to show here.

nixos/modules/services/misc/uhub.nix+85−153

This diff is too big to show here.

nixos/modules/services/misc/weechat.nix+10−5

This diff is too big to show here.

nixos/modules/services/misc/xmr-stak.nix+1−1

This diff is too big to show here.

nixos/modules/services/misc/xmrig.nixnew file+76

This diff is too big to show here.

nixos/modules/services/misc/zigbee2mqtt.nixdeleted−98

This diff is too big to show here.

nixos/modules/services/misc/zoneminder.nix+4−4

This diff is too big to show here.

nixos/modules/services/misc/zookeeper.nix+15−5

This diff is too big to show here.

nixos/modules/services/monitoring/alerta.nix+2−6

This diff is too big to show here.

nixos/modules/services/monitoring/apcupsd.nix+1−1

This diff is too big to show here.

nixos/modules/services/monitoring/arbtt.nix+1−2

This diff is too big to show here.

nixos/modules/services/monitoring/bosun.nix+1−2

This diff is too big to show here.

nixos/modules/services/monitoring/cadvisor.nix+2

This diff is too big to show here.

nixos/modules/services/monitoring/collectd.nix+56−28

This diff is too big to show here.

nixos/modules/services/monitoring/datadog-agent.nix+11−9

This diff is too big to show here.

nixos/modules/services/monitoring/grafana-image-renderer.nixnew file+150

This diff is too big to show here.

nixos/modules/services/monitoring/grafana-reporter.nix+3−2

This diff is too big to show here.

nixos/modules/services/monitoring/grafana.nix+224−55

This diff is too big to show here.

nixos/modules/services/monitoring/graphite.nix+19−7

This diff is too big to show here.

nixos/modules/services/monitoring/heapster.nix+4−2

This diff is too big to show here.

nixos/modules/services/monitoring/incron.nix+8−3

This diff is too big to show here.

nixos/modules/services/monitoring/kapacitor.nix+1−4

This diff is too big to show here.

nixos/modules/services/monitoring/loki.nix+2−2

This diff is too big to show here.

nixos/modules/services/monitoring/mackerel-agent.nix−1

This diff is too big to show here.

nixos/modules/services/monitoring/metricbeat.nixnew file+151

This diff is too big to show here.

nixos/modules/services/monitoring/mimir.nixnew file+63

This diff is too big to show here.

nixos/modules/services/monitoring/munin.nix+7−5

This diff is too big to show here.

nixos/modules/services/monitoring/nagios.nix+8−7

This diff is too big to show here.

nixos/modules/services/monitoring/netdata.nix+110−38

This diff is too big to show here.

nixos/modules/services/monitoring/parsedmarc.mdnew file+113

This diff is too big to show here.

nixos/modules/services/monitoring/parsedmarc.nixnew file+542

This diff is too big to show here.

nixos/modules/services/monitoring/parsedmarc.xmlnew file+125

This diff is too big to show here.

nixos/modules/services/monitoring/prometheus/alertmanager.nix+1−1

This diff is too big to show here.

nixos/modules/services/monitoring/prometheus/default.nix+1352−246

This diff is too big to show here.

nixos/modules/services/monitoring/prometheus/exporters.nix+64−17

This diff is too big to show here.

nixos/modules/services/monitoring/prometheus/exporters.xml+21

This diff is too big to show here.

nixos/modules/services/monitoring/prometheus/exporters/artifactory.nixnew file+59

This diff is too big to show here.

nixos/modules/services/monitoring/prometheus/exporters/bind.nix+6−6

This diff is too big to show here.

nixos/modules/services/monitoring/prometheus/exporters/bird.nixnew file+50

This diff is too big to show here.

nixos/modules/services/monitoring/prometheus/exporters/bitcoin.nixnew file+82

This diff is too big to show here.

nixos/modules/services/monitoring/prometheus/exporters/buildkite-agent.nixnew file+64

This diff is too big to show here.

nixos/modules/services/monitoring/prometheus/exporters/collectd.nix+10−10

This diff is too big to show here.

nixos/modules/services/monitoring/prometheus/exporters/dmarc.nixnew file+117

This diff is too big to show here.

nixos/modules/services/monitoring/prometheus/exporters/domain.nixnew file+19

This diff is too big to show here.

nixos/modules/services/monitoring/prometheus/exporters/dovecot.nix+20−1

This diff is too big to show here.

nixos/modules/services/monitoring/prometheus/exporters/fastly.nixnew file+41

This diff is too big to show here.

nixos/modules/services/monitoring/prometheus/exporters/flow.nixnew file+50

This diff is too big to show here.

nixos/modules/services/monitoring/prometheus/exporters/influxdb.nixnew file+34

This diff is too big to show here.

nixos/modules/services/monitoring/prometheus/exporters/jitsi.nixnew file+40

This diff is too big to show here.

nixos/modules/services/monitoring/prometheus/exporters/json.nix+18−10

This diff is too big to show here.

nixos/modules/services/monitoring/prometheus/exporters/kea.nixnew file+47

This diff is too big to show here.

nixos/modules/services/monitoring/prometheus/exporters/knot.nixnew file+54

This diff is too big to show here.

nixos/modules/services/monitoring/prometheus/exporters/mail.nix+19−1

This diff is too big to show here.

nixos/modules/services/monitoring/prometheus/exporters/mikrotik.nix+2−2

This diff is too big to show here.

nixos/modules/services/monitoring/prometheus/exporters/modemmanager.nix+4

This diff is too big to show here.

nixos/modules/services/monitoring/prometheus/exporters/nextcloud.nix+5−5

This diff is too big to show here.

nixos/modules/services/monitoring/prometheus/exporters/nginx.nix+10−7

This diff is too big to show here.

nixos/modules/services/monitoring/prometheus/exporters/nginxlog.nixnew file+51

This diff is too big to show here.

nixos/modules/services/monitoring/prometheus/exporters/node.nix+11−2

This diff is too big to show here.

nixos/modules/services/monitoring/prometheus/exporters/openldap.nixnew file+67

This diff is too big to show here.

nixos/modules/services/monitoring/prometheus/exporters/pihole.nixnew file+74

This diff is too big to show here.

nixos/modules/services/monitoring/prometheus/exporters/postfix.nix+3

This diff is too big to show here.

nixos/modules/services/monitoring/prometheus/exporters/postgres.nix+41

This diff is too big to show here.

nixos/modules/services/monitoring/prometheus/exporters/process.nixnew file+46

This diff is too big to show here.

nixos/modules/services/monitoring/prometheus/exporters/pve.nixnew file+118

This diff is too big to show here.

nixos/modules/services/monitoring/prometheus/exporters/py-air-control.nixnew file+53

This diff is too big to show here.

nixos/modules/services/monitoring/prometheus/exporters/rspamd.nix+68−63

This diff is too big to show here.

nixos/modules/services/monitoring/prometheus/exporters/rtl_433.nix+5

This diff is too big to show here.

nixos/modules/services/monitoring/prometheus/exporters/script.nixnew file+64

This diff is too big to show here.

nixos/modules/services/monitoring/prometheus/exporters/smartctl.nixnew file+75

This diff is too big to show here.

nixos/modules/services/monitoring/prometheus/exporters/smokeping.nixnew file+61

This diff is too big to show here.

nixos/modules/services/monitoring/prometheus/exporters/snmp.nix+7−9

This diff is too big to show here.

nixos/modules/services/monitoring/prometheus/exporters/sql.nix+4

This diff is too big to show here.

nixos/modules/services/monitoring/prometheus/exporters/systemd.nixnew file+22

This diff is too big to show here.

nixos/modules/services/monitoring/prometheus/exporters/unbound.nixnew file+63

This diff is too big to show here.

nixos/modules/services/monitoring/prometheus/exporters/varnish.nix+3−2

This diff is too big to show here.

nixos/modules/services/monitoring/prometheus/exporters/wireguard.nix+5

This diff is too big to show here.

nixos/modules/services/monitoring/prometheus/pushgateway.nix+1−1

This diff is too big to show here.

nixos/modules/services/monitoring/prometheus/xmpp-alerts.nix+17−9

This diff is too big to show here.

nixos/modules/services/monitoring/scollector.nix+3−4

This diff is too big to show here.

nixos/modules/services/monitoring/smartd.nix+6−1

This diff is too big to show here.

nixos/modules/services/monitoring/teamviewer.nix+6−3

This diff is too big to show here.

nixos/modules/services/monitoring/telegraf.nix+10−7

This diff is too big to show here.

nixos/modules/services/monitoring/thanos.nix+10−7

This diff is too big to show here.

nixos/modules/services/monitoring/tuptime.nix+5−1

This diff is too big to show here.

nixos/modules/services/monitoring/unifi-poller.nix+80−4

This diff is too big to show here.

nixos/modules/services/monitoring/ups.nix+1−1

This diff is too big to show here.

nixos/modules/services/monitoring/uptime.nix+7−3

This diff is too big to show here.

nixos/modules/services/monitoring/vnstat.nix+15−13

This diff is too big to show here.

nixos/modules/services/monitoring/zabbix-agent.nix+17−9

This diff is too big to show here.

nixos/modules/services/monitoring/zabbix-proxy.nix+18−7

This diff is too big to show here.

nixos/modules/services/monitoring/zabbix-server.nix+17−6

This diff is too big to show here.

nixos/modules/services/network-filesystems/ceph.nix+15−25

This diff is too big to show here.

nixos/modules/services/network-filesystems/davfs2.nix+18

This diff is too big to show here.

nixos/modules/services/network-filesystems/drbd.nix+5−7

This diff is too big to show here.

nixos/modules/services/network-filesystems/glusterfs.nix+1−4

This diff is too big to show here.

nixos/modules/services/network-filesystems/ipfs.nix+104−88

This diff is too big to show here.

nixos/modules/services/network-filesystems/litestream/default.nixnew file+100

This diff is too big to show here.

nixos/modules/services/network-filesystems/litestream/litestream.xmlnew file+65

This diff is too big to show here.

nixos/modules/services/network-filesystems/moosefs.nixnew file+249

This diff is too big to show here.

nixos/modules/services/network-filesystems/netatalk.nix+41−93

This diff is too big to show here.

nixos/modules/services/network-filesystems/openafs/client.nix+7−8

This diff is too big to show here.

nixos/modules/services/network-filesystems/openafs/server.nix+4−3

This diff is too big to show here.

nixos/modules/services/network-filesystems/orangefs/client.nix−1

This diff is too big to show here.

nixos/modules/services/network-filesystems/orangefs/server.nix+9−9

This diff is too big to show here.

nixos/modules/services/network-filesystems/rsyncd.nix+55−5

This diff is too big to show here.

nixos/modules/services/network-filesystems/samba-wsdd.nix+2−2

This diff is too big to show here.

nixos/modules/services/network-filesystems/samba.nix+17−7

This diff is too big to show here.

nixos/modules/services/network-filesystems/tahoe.nix+2−4

This diff is too big to show here.

nixos/modules/services/network-filesystems/webdav-server-rs.nixnew file+144

This diff is too big to show here.

nixos/modules/services/network-filesystems/webdav.nixnew file+107

This diff is too big to show here.

nixos/modules/services/network-filesystems/xtreemfs.nix+15

This diff is too big to show here.

nixos/modules/services/network-filesystems/yandex-disk.nix+2

This diff is too big to show here.

nixos/modules/services/networking/3proxy.nix+3−16

This diff is too big to show here.

nixos/modules/services/networking/adguardhome.nixnew file+140

This diff is too big to show here.

nixos/modules/services/networking/amuled.nix+9−3

This diff is too big to show here.

nixos/modules/services/networking/antennas.nixnew file+80

This diff is too big to show here.

nixos/modules/services/networking/asterisk.nix+13−45

This diff is too big to show here.

nixos/modules/services/networking/atftpd.nix+1−1

This diff is too big to show here.

nixos/modules/services/networking/autossh.nix+1−1

This diff is too big to show here.

nixos/modules/services/networking/avahi-daemon.nix+5−5

This diff is too big to show here.

nixos/modules/services/networking/babeld.nix+25−4

This diff is too big to show here.

nixos/modules/services/networking/bee-clef.nixnew file+107

This diff is too big to show here.

nixos/modules/services/networking/bee.nixnew file+149

This diff is too big to show here.

nixos/modules/services/networking/biboumi.nix+1

This diff is too big to show here.

nixos/modules/services/networking/bind.nix+93−24

This diff is too big to show here.

nixos/modules/services/networking/bird.nix+91−67

This diff is too big to show here.

nixos/modules/services/networking/bitcoind.nix+2−2

This diff is too big to show here.

nixos/modules/services/networking/bitlbee.nix+12−16

This diff is too big to show here.

nixos/modules/services/networking/blockbook-frontend.nix+6−9

This diff is too big to show here.

nixos/modules/services/networking/blocky.nixnew file+40

This diff is too big to show here.

nixos/modules/services/networking/charybdis.nix+8−1

This diff is too big to show here.

nixos/modules/services/networking/cjdns.nix+16−6

This diff is too big to show here.

nixos/modules/services/networking/cloudflare-dyndns.nixnew file+93

This diff is too big to show here.

nixos/modules/services/networking/cntlm.nix+7−2

This diff is too big to show here.

nixos/modules/services/networking/connman.nix+7−6

This diff is too big to show here.

nixos/modules/services/networking/consul.nix+42−11

This diff is too big to show here.

nixos/modules/services/networking/coredns.nix+1−1

This diff is too big to show here.

nixos/modules/services/networking/corerad.nix+7−13

This diff is too big to show here.

nixos/modules/services/networking/coturn.nix+68−37

This diff is too big to show here.

nixos/modules/services/networking/create_ap.nixnew file+50

This diff is too big to show here.

nixos/modules/services/networking/croc.nixnew file+86

This diff is too big to show here.

nixos/modules/services/networking/ddclient.nix+54−24

This diff is too big to show here.

nixos/modules/services/networking/dhcpcd.nix+23−3

This diff is too big to show here.

nixos/modules/services/networking/dhcpd.nix+49−50

This diff is too big to show here.

nixos/modules/services/networking/dnscache.nix+1−1

This diff is too big to show here.

nixos/modules/services/networking/dnscrypt-proxy2.nix+28−4

This diff is too big to show here.

nixos/modules/services/networking/dnscrypt-wrapper.nix+4−2

This diff is too big to show here.

nixos/modules/services/networking/dnsdist.nix+2−3

This diff is too big to show here.

nixos/modules/services/networking/dnsmasq.nix+3−1

This diff is too big to show here.

nixos/modules/services/networking/doh-proxy-rust.nixnew file+60

This diff is too big to show here.

nixos/modules/services/networking/ejabberd.nix+2−2

This diff is too big to show here.

nixos/modules/services/networking/envoy.nixnew file+84

This diff is too big to show here.

nixos/modules/services/networking/epmd.nix+19−3

This diff is too big to show here.

nixos/modules/services/networking/ergo.nix+4−2

This diff is too big to show here.

nixos/modules/services/networking/ergochat.nixnew file+155

This diff is too big to show here.

nixos/modules/services/networking/eternal-terminal.nix+2−2

This diff is too big to show here.

nixos/modules/services/networking/ferm.nix+2−2

This diff is too big to show here.

nixos/modules/services/networking/firefox/sync-server.nixdeleted−183

This diff is too big to show here.

nixos/modules/services/networking/firewall.nix+8−9

This diff is too big to show here.

nixos/modules/services/networking/flannel.nix+7−6

This diff is too big to show here.

nixos/modules/services/networking/flashpolicyd.nixdeleted−85

This diff is too big to show here.

nixos/modules/services/networking/freeradius.nix+2

This diff is too big to show here.

nixos/modules/services/networking/frr.nixnew file+211

This diff is too big to show here.

nixos/modules/services/networking/gale.nixdeleted−181

This diff is too big to show here.

nixos/modules/services/networking/gateone.nix+2−2

This diff is too big to show here.

nixos/modules/services/networking/ghostunnel.nixnew file+242

This diff is too big to show here.

nixos/modules/services/networking/git-daemon.nix+2−1

This diff is too big to show here.

nixos/modules/services/networking/globalprotect-vpn.nixnew file+43

This diff is too big to show here.

nixos/modules/services/networking/gnunet.nix+15−11

This diff is too big to show here.

nixos/modules/services/networking/go-neb.nix+30−4

This diff is too big to show here.

nixos/modules/services/networking/gobgpd.nixnew file+64

This diff is too big to show here.

nixos/modules/services/networking/gogoclient.nixdeleted−85

This diff is too big to show here.

nixos/modules/services/networking/gvpe.nix+8−2

This diff is too big to show here.

nixos/modules/services/networking/hans.nix+2−2

This diff is too big to show here.

nixos/modules/services/networking/headscale.nixnew file+490

This diff is too big to show here.

nixos/modules/services/networking/hostapd.nix+3−2

This diff is too big to show here.

nixos/modules/services/networking/https-dns-proxy.nixnew file+128

This diff is too big to show here.

nixos/modules/services/networking/hylafax/faxq-wait.sh+1−1

This diff is too big to show here.

nixos/modules/services/networking/hylafax/modem-default.nix+3−3

This diff is too big to show here.

nixos/modules/services/networking/hylafax/options.nix+25−28

This diff is too big to show here.

nixos/modules/services/networking/hylafax/spool.sh+3−3

This diff is too big to show here.

nixos/modules/services/networking/hylafax/systemd.nix+21−21

This diff is too big to show here.

nixos/modules/services/networking/i2pd.nix+19−12

This diff is too big to show here.

nixos/modules/services/networking/icecream/daemon.nixnew file+155

This diff is too big to show here.

nixos/modules/services/networking/icecream/scheduler.nixnew file+101

This diff is too big to show here.

nixos/modules/services/networking/inspircd.nixnew file+62

This diff is too big to show here.

nixos/modules/services/networking/iodine.nix+2−1

This diff is too big to show here.

nixos/modules/services/networking/ircd-hybrid/default.nix+11−3

This diff is too big to show here.

nixos/modules/services/networking/iscsi/initiator.nixnew file+84

This diff is too big to show here.

nixos/modules/services/networking/iscsi/root-initiator.nixnew file+190

This diff is too big to show here.

nixos/modules/services/networking/iscsi/target.nixnew file+53

This diff is too big to show here.

nixos/modules/services/networking/iwd.nix+48−6

This diff is too big to show here.

nixos/modules/services/networking/jibri/default.nixnew file+417

This diff is too big to show here.

nixos/modules/services/networking/jibri/logging.properties-journalnew file+32

This diff is too big to show here.

nixos/modules/services/networking/jicofo.nix+1−1

This diff is too big to show here.

nixos/modules/services/networking/jitsi-videobridge.nix+15−3

This diff is too big to show here.

nixos/modules/services/networking/kea.nixnew file+449

This diff is too big to show here.

nixos/modules/services/networking/keepalived/vrrp-instance-options.nix+1−3

This diff is too big to show here.

nixos/modules/services/networking/keepalived/vrrp-script-options.nix+1−1

This diff is too big to show here.

nixos/modules/services/networking/kippo.nixdeleted−117

This diff is too big to show here.

nixos/modules/services/networking/knot.nix+43−8

This diff is too big to show here.

nixos/modules/services/networking/kresd.nix+22−15

This diff is too big to show here.

nixos/modules/services/networking/lambdabot.nix+1−1

This diff is too big to show here.

nixos/modules/services/networking/libreswan.nix+89−58

This diff is too big to show here.

nixos/modules/services/networking/lxd-image-server.nixnew file+133

This diff is too big to show here.

nixos/modules/services/networking/mailpile.nixdeleted−72

This diff is too big to show here.

nixos/modules/services/networking/matterbridge.nix+3−3

This diff is too big to show here.

nixos/modules/services/networking/minidlna.nix+1−1

This diff is too big to show here.

nixos/modules/services/networking/miredo.nix+1−1

This diff is too big to show here.

nixos/modules/services/networking/monero.nix+15−9

This diff is too big to show here.

nixos/modules/services/networking/morty.nix+4−5

This diff is too big to show here.

nixos/modules/services/networking/mosquitto.mdnew file+102

This diff is too big to show here.

nixos/modules/services/networking/mosquitto.nix+580−170

This diff is too big to show here.

nixos/modules/services/networking/mosquitto.xmlnew file+147

This diff is too big to show here.

nixos/modules/services/networking/mozillavpn.nixnew file+19

This diff is too big to show here.

nixos/modules/services/networking/mtr-exporter.nixnew file+87

This diff is too big to show here.

nixos/modules/services/networking/mullvad-vpn.nix+6−2

This diff is too big to show here.

nixos/modules/services/networking/multipath.nixnew file+557

This diff is too big to show here.

nixos/modules/services/networking/murmur.nix+10−3

This diff is too big to show here.

nixos/modules/services/networking/mxisd.nix+2−2

This diff is too big to show here.

nixos/modules/services/networking/namecoind.nix+1−1

This diff is too big to show here.

nixos/modules/services/networking/nar-serve.nix+1−1

This diff is too big to show here.

nixos/modules/services/networking/nat.nix+98−24

This diff is too big to show here.

nixos/modules/services/networking/nats.nixnew file+158

This diff is too big to show here.

nixos/modules/services/networking/nbd.nixnew file+159

This diff is too big to show here.

nixos/modules/services/networking/ncdns.nix+10−5

This diff is too big to show here.

nixos/modules/services/networking/ndppd.nix+1−1

This diff is too big to show here.

nixos/modules/services/networking/nebula.nixnew file+217

This diff is too big to show here.

nixos/modules/services/networking/networkmanager.nix+165−89

This diff is too big to show here.

nixos/modules/services/networking/nftables.nix+7−12

This diff is too big to show here.

nixos/modules/services/networking/ngircd.nix+5−2

This diff is too big to show here.

nixos/modules/services/networking/nix-serve.nix+20−10

This diff is too big to show here.

nixos/modules/services/networking/nixops-dns.nix−1

This diff is too big to show here.

nixos/modules/services/networking/nntp-proxy.nix+18−18

This diff is too big to show here.

nixos/modules/services/networking/nomad.nixnew file+178

This diff is too big to show here.

nixos/modules/services/networking/nsd.nix+30−19

This diff is too big to show here.

nixos/modules/services/networking/ntopng.nix+57−13

This diff is too big to show here.

nixos/modules/services/networking/ntp/chrony.nix+66−14

This diff is too big to show here.

nixos/modules/services/networking/ntp/ntpd.nix+9−7

This diff is too big to show here.

nixos/modules/services/networking/ntp/openntpd.nix+4−1

This diff is too big to show here.

nixos/modules/services/networking/nylon.nix+1−1

This diff is too big to show here.

nixos/modules/services/networking/ofono.nix+1−1

This diff is too big to show here.

nixos/modules/services/networking/onedrive.nix+1−2

This diff is too big to show here.

nixos/modules/services/networking/openconnect.nixnew file+137

This diff is too big to show here.

nixos/modules/services/networking/openfire.nixdeleted−56

This diff is too big to show here.

nixos/modules/services/networking/openvpn.nix+2−2

This diff is too big to show here.

nixos/modules/services/networking/ostinato.nix+2−2

This diff is too big to show here.

nixos/modules/services/networking/owamp.nix+1−1

This diff is too big to show here.

nixos/modules/services/networking/pdns-recursor.nix+13−8

This diff is too big to show here.

nixos/modules/services/networking/pixiecore.nix+1

This diff is too big to show here.

nixos/modules/services/networking/pleroma.nixnew file+149

This diff is too big to show here.

nixos/modules/services/networking/pleroma.xmlnew file+188

This diff is too big to show here.

nixos/modules/services/networking/powerdns.nix+2−2

This diff is too big to show here.

nixos/modules/services/networking/pppd.nix+23−5

This diff is too big to show here.

nixos/modules/services/networking/prayer.nix+2−1

This diff is too big to show here.

nixos/modules/services/networking/privoxy.nix+230−65

This diff is too big to show here.

nixos/modules/services/networking/prosody.nix+3−2

This diff is too big to show here.

nixos/modules/services/networking/prosody.xml+1−1

This diff is too big to show here.

nixos/modules/services/networking/quagga.nixdeleted−185

This diff is too big to show here.

nixos/modules/services/networking/quassel.nix+11−4

This diff is too big to show here.

nixos/modules/services/networking/quicktun.nix+1−1

This diff is too big to show here.

nixos/modules/services/networking/quorum.nix+5−3

This diff is too big to show here.

nixos/modules/services/networking/racoon.nixdeleted−45

This diff is too big to show here.

nixos/modules/services/networking/radicale.nix+156−44

This diff is too big to show here.

nixos/modules/services/networking/radvd.nix+5−1

This diff is too big to show here.

nixos/modules/services/networking/rdnssd.nix+3−1

This diff is too big to show here.

nixos/modules/services/networking/resilio.nix+2

This diff is too big to show here.

nixos/modules/services/networking/rxe.nix+2−2

This diff is too big to show here.

nixos/modules/services/networking/sabnzbd.nix+11−1

This diff is too big to show here.

nixos/modules/services/networking/seafile.nixnew file+287

This diff is too big to show here.

nixos/modules/services/networking/searx.nix+184−33

This diff is too big to show here.

nixos/modules/services/networking/shadowsocks.nix+4−6

This diff is too big to show here.

nixos/modules/services/networking/shairport-sync.nix+31−2

This diff is too big to show here.

nixos/modules/services/networking/shellhub-agent.nixnew file+100

This diff is too big to show here.

nixos/modules/services/networking/shorewall.nix+1−1

This diff is too big to show here.

nixos/modules/services/networking/shorewall6.nix+1−1

This diff is too big to show here.

nixos/modules/services/networking/shout.nix+4−2

This diff is too big to show here.

nixos/modules/services/networking/skydns.nix+2−1

This diff is too big to show here.

nixos/modules/services/networking/smartdns.nix+2−1

This diff is too big to show here.

nixos/modules/services/networking/smokeping.nix+74−32

This diff is too big to show here.

nixos/modules/services/networking/sniproxy.nix+6−17

This diff is too big to show here.

nixos/modules/services/networking/snowflake-proxy.nixnew file+81

This diff is too big to show here.

nixos/modules/services/networking/softether.nix+1−1

This diff is too big to show here.

nixos/modules/services/networking/soju.nixnew file+114

This diff is too big to show here.

nixos/modules/services/networking/solanum.nixnew file+109

This diff is too big to show here.

nixos/modules/services/networking/spacecookie.nix+147−14

This diff is too big to show here.

nixos/modules/services/networking/spiped.nix+1−1

This diff is too big to show here.

nixos/modules/services/networking/squid.nix+23−4

This diff is too big to show here.

nixos/modules/services/networking/ssh/lshd.nix+12−6

This diff is too big to show here.

nixos/modules/services/networking/ssh/sshd.nix+44−23

This diff is too big to show here.

nixos/modules/services/networking/sslh.nix+1−1

This diff is too big to show here.

nixos/modules/services/networking/strongswan-swanctl/module.nix+2−2

This diff is too big to show here.

nixos/modules/services/networking/strongswan-swanctl/swanctl-params.nix+11−1

This diff is too big to show here.

nixos/modules/services/networking/strongswan.nix+3−3

This diff is too big to show here.

nixos/modules/services/networking/stubby.nix+46−174

This diff is too big to show here.

nixos/modules/services/networking/stunnel.nix+3−2

This diff is too big to show here.

nixos/modules/services/networking/supplicant.nix+5−14

This diff is too big to show here.

nixos/modules/services/networking/supybot.nix+5−3

This diff is too big to show here.

nixos/modules/services/networking/syncplay.nix+19−3

This diff is too big to show here.

nixos/modules/services/networking/syncthing.nix+372−308

This diff is too big to show here.

nixos/modules/services/networking/tailscale.nix+28−3

This diff is too big to show here.

nixos/modules/services/networking/teamspeak3.nix+20−2

This diff is too big to show here.

nixos/modules/services/networking/tedicross.nix+1−1

This diff is too big to show here.

nixos/modules/services/networking/teleport.nixnew file+99

This diff is too big to show here.

nixos/modules/services/networking/tetrd.nixnew file+96

This diff is too big to show here.

nixos/modules/services/networking/thelounge.nix+39−8

This diff is too big to show here.

nixos/modules/services/networking/tinc.nix+233−18

This diff is too big to show here.

nixos/modules/services/networking/tinydns.nix+5−1

This diff is too big to show here.

nixos/modules/services/networking/tox-bootstrapd.nix+8−13

This diff is too big to show here.

nixos/modules/services/networking/tox-node.nix+1−6

This diff is too big to show here.

nixos/modules/services/networking/toxvpn.nix+4−2

This diff is too big to show here.

nixos/modules/services/networking/trickster.nix+1−1

This diff is too big to show here.

nixos/modules/services/networking/tvheadend.nix+3−1

This diff is too big to show here.

nixos/modules/services/networking/ucarp.nixnew file+183

This diff is too big to show here.

nixos/modules/services/networking/unbound.nix+177−82

This diff is too big to show here.

nixos/modules/services/networking/unifi.nix+80−60

This diff is too big to show here.

nixos/modules/services/networking/v2ray.nix+15−7

This diff is too big to show here.

nixos/modules/services/networking/vsftpd.nix+5−2

This diff is too big to show here.

nixos/modules/services/networking/wakeonlan.nixdeleted−56

This diff is too big to show here.

nixos/modules/services/networking/wasabibackend.nix+4−2

This diff is too big to show here.

nixos/modules/services/networking/websockify.nix+1−1

This diff is too big to show here.

nixos/modules/services/networking/wg-netmanager.nixnew file+42

This diff is too big to show here.

nixos/modules/services/networking/wg-quick.nix+12−13

This diff is too big to show here.

nixos/modules/services/networking/wicd.nixdeleted−40

This diff is too big to show here.

nixos/modules/services/networking/wireguard.nix+104−54

This diff is too big to show here.

nixos/modules/services/networking/wpa_supplicant.nix+355−83

This diff is too big to show here.

nixos/modules/programs/x2goserver.nix → nixos/modules/services/networking/x2goserver.nixrenamed+24−9

This diff is too big to show here.

nixos/modules/services/networking/xandikos.nix+2−2

This diff is too big to show here.

nixos/modules/services/networking/xrdp.nix+17−3

This diff is too big to show here.

nixos/modules/services/networking/yggdrasil.nix+3−4

This diff is too big to show here.

nixos/modules/services/networking/yggdrasil.xml−1

This diff is too big to show here.

nixos/modules/services/networking/zerobin.nix+1−1

This diff is too big to show here.

nixos/modules/services/networking/zeronet.nix+5−7

This diff is too big to show here.

nixos/modules/services/networking/zerotierone.nix+1−2

This diff is too big to show here.

nixos/modules/services/networking/znc/default.nix+36−9

This diff is too big to show here.

nixos/modules/services/networking/znc/options.nix+6−6

This diff is too big to show here.

nixos/modules/services/printing/cupsd.nix+2−2

This diff is too big to show here.

nixos/modules/services/scheduling/atd.nix+6−9

This diff is too big to show here.

nixos/modules/services/scheduling/cron.nix+7−2

This diff is too big to show here.

nixos/modules/services/scheduling/fcron.nix+3

This diff is too big to show here.

nixos/modules/services/search/elasticsearch-curator.nix+1

This diff is too big to show here.

nixos/modules/services/search/elasticsearch.nix+43−12

This diff is too big to show here.

nixos/modules/services/search/hound.nix+13−11

This diff is too big to show here.

nixos/modules/services/search/kibana.nix+9−4

This diff is too big to show here.

nixos/modules/services/search/meilisearch.mdnew file+39

This diff is too big to show here.

nixos/modules/services/search/meilisearch.nixnew file+132

This diff is too big to show here.

nixos/modules/services/search/meilisearch.xmlnew file+85

This diff is too big to show here.

nixos/modules/services/search/solr.nix+1−1

This diff is too big to show here.

nixos/modules/services/security/aesmd.nixnew file+236

This diff is too big to show here.

nixos/modules/services/security/bitwarden_rs/default.nixdeleted−162

This diff is too big to show here.

nixos/modules/services/security/certmgr.nix+2−2

This diff is too big to show here.

nixos/modules/services/security/cfssl.nix+56−43

This diff is too big to show here.

nixos/modules/services/security/clamav.nix+37−33

This diff is too big to show here.

nixos/modules/services/security/fail2ban.nix+41−7

This diff is too big to show here.

nixos/modules/services/security/fprintd.nix+22−12

This diff is too big to show here.

nixos/modules/services/security/fprot.nixdeleted−79

This diff is too big to show here.

nixos/modules/services/security/haka.nix+1−1

This diff is too big to show here.

nixos/modules/services/security/haveged.nix+39−29

This diff is too big to show here.

nixos/modules/services/security/hockeypuck.nixnew file+106

This diff is too big to show here.

nixos/modules/services/security/hologram-agent.nix+1−1

This diff is too big to show here.

nixos/modules/services/security/nginx-sso.nix+2−2

This diff is too big to show here.

nixos/modules/services/security/oauth2_proxy.nix+13−7

This diff is too big to show here.

nixos/modules/services/security/oauth2_proxy_nginx.nix+5−3

This diff is too big to show here.

nixos/modules/services/security/opensnitch.nixnew file+125

This diff is too big to show here.

nixos/modules/services/security/physlock.nix+6−4

This diff is too big to show here.

nixos/modules/services/security/privacyidea.nix+40−9

This diff is too big to show here.

nixos/modules/services/security/shibboleth-sp.nix+1−1

This diff is too big to show here.

nixos/modules/services/security/sks.nix+2−2

This diff is too big to show here.

nixos/modules/services/security/sshguard.nix+24−18

This diff is too big to show here.

nixos/modules/services/security/sslmate-agent.nixnew file+32

This diff is too big to show here.

nixos/modules/services/security/step-ca.nixnew file+146

This diff is too big to show here.

nixos/modules/services/security/tor.nix+858−590

This diff is too big to show here.

nixos/modules/services/security/torsocks.nix+1

This diff is too big to show here.

nixos/modules/services/security/usbguard.nix+2−2

This diff is too big to show here.

nixos/modules/services/security/vault.nix+52−4

This diff is too big to show here.

nixos/modules/services/security/bitwarden_rs/backup.sh → nixos/modules/services/security/vaultwarden/backup.shrenamed+1−1

This diff is too big to show here.

nixos/modules/services/security/vaultwarden/default.nixnew file+185

This diff is too big to show here.

nixos/modules/services/security/yubikey-agent.nix+8−2

This diff is too big to show here.

nixos/modules/services/system/cachix-agent/default.nixnew file+57

This diff is too big to show here.

nixos/modules/services/system/cloud-init.nix+17−3

This diff is too big to show here.

nixos/modules/services/system/earlyoom.nix+134−97

This diff is too big to show here.

nixos/modules/services/system/kerberos/heimdal.nix+1−1

This diff is too big to show here.

nixos/modules/services/system/localtime.nix+6−5

This diff is too big to show here.

nixos/modules/services/system/nscd.nix+20−9

This diff is too big to show here.

nixos/modules/services/system/saslauthd.nix+1−1

This diff is too big to show here.

nixos/modules/services/system/self-deploy.nixnew file+173

This diff is too big to show here.

nixos/modules/services/system/systembus-notify.nixnew file+27

This diff is too big to show here.

nixos/modules/services/system/uptimed.nix+7−3

This diff is too big to show here.

nixos/modules/services/torrent/deluge.nix+10−2

This diff is too big to show here.

nixos/modules/services/torrent/flexget.nix+1−1

This diff is too big to show here.

nixos/modules/services/torrent/magnetico.nix+3−1

This diff is too big to show here.

nixos/modules/services/torrent/opentracker.nix+1−1

This diff is too big to show here.

nixos/modules/services/torrent/peerflix.nix+8−2

This diff is too big to show here.

nixos/modules/services/torrent/rtorrent.nix+4−2

This diff is too big to show here.

nixos/modules/services/torrent/transmission.nix+257−223

This diff is too big to show here.

nixos/modules/services/ttys/agetty.nixdeleted−117

This diff is too big to show here.

nixos/modules/services/ttys/getty.nixnew file+162

This diff is too big to show here.

nixos/modules/services/ttys/kmscon.nix+26−10

This diff is too big to show here.

nixos/modules/services/video/epgstation/default.nix+193−154

This diff is too big to show here.

nixos/modules/services/video/epgstation/streaming.json+129−108

This diff is too big to show here.

nixos/modules/services/video/mirakurun.nix+27−6

This diff is too big to show here.

nixos/modules/services/video/replay-sorcery.nixnew file+72

This diff is too big to show here.

nixos/modules/services/video/rtsp-simple-server.nixnew file+80

This diff is too big to show here.

nixos/modules/services/video/unifi-video.nixnew file+271

This diff is too big to show here.

nixos/modules/services/wayland/cage.nix+8−3

This diff is too big to show here.

nixos/modules/services/web-apps/atlassian/confluence.nix+2−2

This diff is too big to show here.

nixos/modules/services/web-apps/atlassian/crowd.nix+2−2

This diff is too big to show here.

nixos/modules/services/web-apps/atlassian/jira.nix+3−2

This diff is too big to show here.

nixos/modules/services/web-apps/baget.nixnew file+170

This diff is too big to show here.

nixos/modules/services/web-apps/bookstack.nixnew file+449

This diff is too big to show here.

nixos/modules/services/web-apps/calibre-web.nixnew file+165

This diff is too big to show here.

nixos/modules/services/web-apps/code-server.nixnew file+139

This diff is too big to show here.

nixos/modules/services/web-apps/codimd.nix−962

This diff is too big to show here.

nixos/modules/services/web-apps/cryptpad.nix+2−2

This diff is too big to show here.

nixos/modules/services/web-apps/dex.nix+118

This diff is too big to show here.

nixos/modules/services/web-apps/discourse.nix+1093

This diff is too big to show here.

nixos/modules/services/web-apps/discourse.xml+355

This diff is too big to show here.

nixos/modules/services/web-apps/documize.nix+1

This diff is too big to show here.

nixos/modules/services/web-apps/dokuwiki.nix+325−274

This diff is too big to show here.

nixos/modules/services/web-apps/engelsystem.nix+3−3

This diff is too big to show here.

nixos/modules/services/web-apps/ethercalc.nix+62

This diff is too big to show here.

nixos/modules/services/web-apps/fluidd.nix+66

This diff is too big to show here.

nixos/modules/services/web-apps/frab.nix−222

This diff is too big to show here.

nixos/modules/services/web-apps/galene.nix+214

This diff is too big to show here.

nixos/modules/services/web-apps/gerrit.nix+4−1

This diff is too big to show here.

nixos/modules/services/web-apps/grocy.nix+3−3

This diff is too big to show here.

nixos/modules/services/web-apps/hedgedoc.nix+1038

This diff is too big to show here.

nixos/modules/services/web-apps/hledger-web.nix+142

This diff is too big to show here.

nixos/modules/services/web-apps/icingaweb2/icingaweb2.nix+19−1

This diff is too big to show here.

nixos/modules/services/web-apps/ihatemoney/default.nix+20−8

This diff is too big to show here.

nixos/modules/services/web-apps/invidious.nix+264

This diff is too big to show here.

nixos/modules/services/web-apps/invoiceplane.nix+305

This diff is too big to show here.

nixos/modules/services/web-apps/isso.nix+69

This diff is too big to show here.

nixos/modules/services/web-apps/jirafeau.nix+10−6

This diff is too big to show here.

nixos/modules/services/web-apps/jitsi-meet.nix+130−12

This diff is too big to show here.

nixos/modules/services/web-apps/jitsi-meet.xml+2−2

This diff is too big to show here.

nixos/modules/services/web-apps/keycloak.nix+575−584

This diff is too big to show here.

nixos/modules/services/web-apps/keycloak.xml+82−85

This diff is too big to show here.

nixos/modules/services/web-apps/lemmy.md+34

This diff is too big to show here.

nixos/modules/services/web-apps/lemmy.nix+236

This diff is too big to show here.

nixos/modules/services/web-apps/lemmy.xml+56

This diff is too big to show here.

nixos/modules/services/web-apps/limesurvey.nix+5−5

This diff is too big to show here.

nixos/modules/services/web-apps/mastodon.nix+638

This diff is too big to show here.

nixos/modules/services/web-apps/matomo.nix+44−15

This diff is too big to show here.

nixos/modules/services/web-apps/mattermost.nix+145−37

This diff is too big to show here.

nixos/modules/services/web-apps/mediawiki.nix+7−5

This diff is too big to show here.

nixos/modules/services/web-apps/miniflux.nix+62−32

This diff is too big to show here.

nixos/modules/services/web-apps/moinmoin.nix−304

This diff is too big to show here.

nixos/modules/services/web-apps/moodle.nix+8−8

This diff is too big to show here.

nixos/modules/services/web-apps/netbox.nix+265

This diff is too big to show here.

nixos/modules/services/web-apps/nextcloud.nix+467−98

This diff is too big to show here.

nixos/modules/services/web-apps/nextcloud.xml+107−40

This diff is too big to show here.

nixos/modules/services/web-apps/nexus.nix+22

This diff is too big to show here.

nixos/modules/services/web-apps/nifi.nix+318

This diff is too big to show here.

nixos/modules/services/web-apps/node-red.nix+149

This diff is too big to show here.

nixos/modules/services/web-apps/openwebrx.nix+34

This diff is too big to show here.

nixos/modules/services/web-apps/peertube.nix+475

This diff is too big to show here.

nixos/modules/services/web-apps/pgpkeyserver-lite.nix+5−2

This diff is too big to show here.

nixos/modules/services/web-apps/pict-rs.md+88

This diff is too big to show here.

nixos/modules/services/web-apps/pict-rs.nix+50

This diff is too big to show here.

nixos/modules/services/web-apps/pict-rs.xml+162

This diff is too big to show here.

nixos/modules/services/web-apps/plantuml-server.nix+140

This diff is too big to show here.

nixos/modules/services/web-apps/plausible.nix+292

This diff is too big to show here.

nixos/modules/services/web-apps/plausible.xml+51

This diff is too big to show here.

nixos/modules/services/web-apps/powerdns-admin.nix+152

This diff is too big to show here.

nixos/modules/services/web-apps/prosody-filer.nix+86

This diff is too big to show here.

nixos/modules/services/web-apps/restya-board.nix+1−4

This diff is too big to show here.

nixos/modules/services/web-apps/rss-bridge.nix+2−4

This diff is too big to show here.

nixos/modules/services/web-apps/selfoss.nix−1

This diff is too big to show here.

nixos/modules/services/web-apps/shiori.nix+2−5

This diff is too big to show here.

nixos/modules/services/web-apps/timetagger.nix+80

This diff is too big to show here.

nixos/modules/services/web-apps/trac.nix−79

This diff is too big to show here.

nixos/modules/services/web-apps/trilium.nix+11−2

This diff is too big to show here.

nixos/modules/services/web-apps/tt-rss.nix+97−88

This diff is too big to show here.

nixos/modules/services/web-apps/vikunja.nix+145

This diff is too big to show here.

nixos/modules/services/web-apps/whitebophir.nix+52

This diff is too big to show here.

nixos/modules/services/web-apps/wiki-js.nix+139

This diff is too big to show here.

nixos/modules/services/web-apps/wordpress.nix+175−61

This diff is too big to show here.

nixos/modules/services/web-apps/youtrack.nix+3−2

This diff is too big to show here.

nixos/modules/services/web-apps/zabbix.nix+26−5

This diff is too big to show here.

nixos/modules/services/web-servers/agate.nix+148

This diff is too big to show here.

nixos/modules/services/web-servers/apache-httpd/default.nix+72−39

This diff is too big to show here.

nixos/modules/services/web-servers/apache-httpd/vhost-options.nix+27−7

This diff is too big to show here.

nixos/modules/services/web-servers/caddy.nix−138

This diff is too big to show here.

nixos/modules/services/web-servers/caddy/default.nix+339

This diff is too big to show here.

nixos/modules/services/web-servers/caddy/vhost-options.nix+79

This diff is too big to show here.

nixos/modules/services/web-servers/darkhttpd.nix+1−1

This diff is too big to show here.

nixos/modules/services/web-servers/hydron.nix+1−1

This diff is too big to show here.

nixos/modules/services/web-servers/jboss/default.nix+6

This diff is too big to show here.

nixos/modules/services/web-servers/lighttpd/cgit.nix+7−5

This diff is too big to show here.

nixos/modules/services/web-servers/lighttpd/collectd.nix+5−1

This diff is too big to show here.

nixos/modules/services/web-servers/lighttpd/default.nix+15−3

This diff is too big to show here.

nixos/modules/services/web-servers/minio.nix+34−12

This diff is too big to show here.

nixos/modules/services/web-servers/molly-brown.nix+1−2

This diff is too big to show here.

nixos/modules/services/web-servers/nginx/default.nix+246−39

This diff is too big to show here.

nixos/modules/services/web-servers/nginx/gitweb.nix+2−2

This diff is too big to show here.

nixos/modules/services/web-servers/nginx/location-options.nix+12−2

This diff is too big to show here.

nixos/modules/services/web-servers/nginx/vhost-options.nix+74−9

This diff is too big to show here.

nixos/modules/services/web-servers/phpfpm/default.nix+5−5

This diff is too big to show here.

nixos/modules/services/web-servers/pomerium.nix+135

This diff is too big to show here.

nixos/modules/services/web-servers/shellinabox.nix−122

This diff is too big to show here.

nixos/modules/services/web-servers/tomcat.nix+7−5

This diff is too big to show here.

nixos/modules/services/web-servers/traefik.nix+3−3

This diff is too big to show here.

nixos/modules/services/web-servers/trafficserver/default.nix+310

This diff is too big to show here.

nixos/modules/services/web-servers/trafficserver/ip_allow.json+36

This diff is too big to show here.

nixos/modules/services/web-servers/trafficserver/logging.json+37

This diff is too big to show here.

nixos/modules/services/web-servers/ttyd.nix+2−2

This diff is too big to show here.

nixos/modules/services/web-servers/unit/default.nix+4−2

This diff is too big to show here.

nixos/modules/services/web-servers/uwsgi.nix+69−23

This diff is too big to show here.

nixos/modules/services/web-servers/varnish/default.nix+9−7

This diff is too big to show here.

nixos/modules/services/web-servers/zope2.nix+6−2

This diff is too big to show here.

nixos/modules/services/x11/clight.nix+27−11

This diff is too big to show here.

nixos/modules/services/x11/desktop-managers/cde.nix+5−4

This diff is too big to show here.

nixos/modules/services/x11/desktop-managers/cinnamon.nix+25−12

This diff is too big to show here.

nixos/modules/services/x11/desktop-managers/default.nix+1−1

This diff is too big to show here.

nixos/modules/services/x11/desktop-managers/enlightenment.nix+24−3

This diff is too big to show here.

nixos/modules/services/x11/desktop-managers/gnome.nix+582

This diff is too big to show here.

nixos/modules/services/x11/desktop-managers/gnome.xml+253

This diff is too big to show here.

nixos/modules/services/x11/desktop-managers/gnome3.nix−501

This diff is too big to show here.

nixos/modules/services/x11/desktop-managers/kodi.nix+12−2

This diff is too big to show here.

nixos/modules/services/x11/desktop-managers/lumina.nix+4

This diff is too big to show here.

nixos/modules/services/x11/desktop-managers/lxqt.nix+13−4

This diff is too big to show here.

nixos/modules/services/x11/desktop-managers/mate.nix+12−40

This diff is too big to show here.

nixos/modules/services/x11/desktop-managers/none.nix+44−5

This diff is too big to show here.

nixos/modules/services/x11/desktop-managers/pantheon.nix+45−29

This diff is too big to show here.

nixos/modules/services/x11/desktop-managers/pantheon.xml+11−5

This diff is too big to show here.

nixos/modules/services/x11/desktop-managers/plasma5.nix+335−135

This diff is too big to show here.

nixos/modules/services/x11/desktop-managers/retroarch.nix+40

This diff is too big to show here.

nixos/modules/services/x11/desktop-managers/surf-display.nix+2−1

This diff is too big to show here.

nixos/modules/services/x11/desktop-managers/xfce.nix+17−10

This diff is too big to show here.

nixos/modules/services/x11/desktop-managers/xterm.nix+2−2

This diff is too big to show here.

nixos/modules/services/x11/display-managers/account-service-util.nix+1−1

This diff is too big to show here.

nixos/modules/services/x11/display-managers/default.nix+33−23

This diff is too big to show here.

nixos/modules/services/x11/display-managers/gdm.nix+59−64

This diff is too big to show here.

nixos/modules/services/x11/display-managers/lightdm-greeters/enso-os.nix+4−4

This diff is too big to show here.

nixos/modules/services/x11/display-managers/lightdm-greeters/gtk.nix+7−6

This diff is too big to show here.

nixos/modules/services/x11/display-managers/lightdm-greeters/pantheon.nix+2−2

This diff is too big to show here.

nixos/modules/services/x11/display-managers/lightdm.nix+8−6

This diff is too big to show here.

nixos/modules/services/x11/display-managers/sddm.nix+100−97

This diff is too big to show here.

nixos/modules/services/x11/display-managers/set-session.py+3

This diff is too big to show here.

nixos/modules/services/x11/display-managers/startx.nix+12−3

This diff is too big to show here.

nixos/modules/services/x11/display-managers/sx.nix+34

This diff is too big to show here.

nixos/modules/services/x11/extra-layouts.nix+9−48

This diff is too big to show here.

nixos/modules/services/x11/hardware/libinput.nix+79−40

This diff is too big to show here.

nixos/modules/services/x11/hardware/synaptics.nix+6−1

This diff is too big to show here.

nixos/modules/services/x11/imwheel.nix+11−9

This diff is too big to show here.

nixos/modules/services/x11/picom.nix+13−3

This diff is too big to show here.

nixos/modules/services/x11/redshift.nix+1−1

This diff is too big to show here.

nixos/modules/services/x11/touchegg.nix+38

This diff is too big to show here.

nixos/modules/services/x11/unclutter-xfixes.nix+1−1

This diff is too big to show here.

nixos/modules/services/x11/unclutter.nix+1−1

This diff is too big to show here.

nixos/modules/services/x11/urxvtd.nix+1−1

This diff is too big to show here.

nixos/modules/services/x11/window-managers/awesome.nix+1−1

This diff is too big to show here.

nixos/modules/services/x11/window-managers/bspwm.nix+6−6

This diff is too big to show here.

nixos/modules/services/x11/window-managers/clfswm.nix+13−3

This diff is too big to show here.

nixos/modules/services/x11/window-managers/default.nix+4

This diff is too big to show here.

nixos/modules/services/x11/window-managers/e16.nix+26

This diff is too big to show here.

nixos/modules/services/x11/window-managers/exwm.nix+19−4

This diff is too big to show here.

nixos/modules/services/x11/window-managers/fvwm.nix+1−1

This diff is too big to show here.

nixos/modules/services/x11/window-managers/herbstluftwm.nix+11−2

This diff is too big to show here.

nixos/modules/services/x11/window-managers/i3.nix+3−3

This diff is too big to show here.

nixos/modules/services/x11/window-managers/metacity.nix+3−3

This diff is too big to show here.

nixos/modules/services/x11/window-managers/mlvwm.nix+41

This diff is too big to show here.

nixos/modules/services/x11/window-managers/qtile.nix+11−4

This diff is too big to show here.

nixos/modules/services/x11/window-managers/wmderland.nix+61

This diff is too big to show here.

nixos/modules/services/x11/window-managers/xmonad.nix+88−33

This diff is too big to show here.

nixos/modules/services/x11/xautolock.nix+4−3

This diff is too big to show here.

nixos/modules/services/x11/xserver.nix+97−47

This diff is too big to show here.

nixos/modules/system/activation/activation-script.nix+77−46

This diff is too big to show here.

nixos/modules/system/activation/switch-to-configuration.pl+698−255

This diff is too big to show here.

nixos/modules/system/activation/top-level.nix+101−37

This diff is too big to show here.

nixos/modules/system/boot/binfmt.nix+59−11

This diff is too big to show here.

nixos/modules/system/boot/initrd-openvpn.nix+2−2

This diff is too big to show here.

nixos/modules/system/boot/initrd-ssh.nix+7−2

This diff is too big to show here.

nixos/modules/system/boot/kernel.nix+31−16

This diff is too big to show here.

nixos/modules/system/boot/kernel_config.nix+2−22

This diff is too big to show here.

nixos/modules/system/boot/kexec.nix+3−3

This diff is too big to show here.

nixos/modules/system/boot/loader/generations-dir/generations-dir.nix+1−4

This diff is too big to show here.

nixos/modules/system/boot/loader/generic-extlinux-compatible/default.nix+18−1

This diff is too big to show here.

nixos/modules/system/boot/loader/generic-extlinux-compatible/extlinux-conf-builder.sh+9−3

This diff is too big to show here.

nixos/modules/system/boot/loader/grub/grub.nix+63−10

This diff is too big to show here.

nixos/modules/system/boot/loader/grub/install-grub.pl+71−43

This diff is too big to show here.

nixos/modules/system/boot/loader/grub/ipxe.nix+1−1

This diff is too big to show here.

nixos/modules/system/boot/loader/init-script/init-script-builder.sh−1

This diff is too big to show here.

nixos/modules/system/boot/loader/raspberrypi/raspberrypi-builder.nix+2−3

This diff is too big to show here.

nixos/modules/system/boot/loader/raspberrypi/raspberrypi.nix+3−6

This diff is too big to show here.

nixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py+130−70

This diff is too big to show here.

nixos/modules/system/boot/loader/systemd-boot/systemd-boot.nix+165−5

This diff is too big to show here.

nixos/modules/system/boot/luksroot.nix+180−69

This diff is too big to show here.

nixos/modules/system/boot/modprobe.nix+2

This diff is too big to show here.

nixos/modules/system/boot/networkd.nix+434−28

This diff is too big to show here.

nixos/modules/system/boot/plymouth.nix+83−19

This diff is too big to show here.

nixos/modules/system/boot/resolved.nix+3−1

This diff is too big to show here.

nixos/modules/system/boot/stage-1-init.sh+66−54

This diff is too big to show here.

nixos/modules/system/boot/stage-1.nix+148−31

This diff is too big to show here.

nixos/modules/system/boot/stage-2-init.sh+71−99

This diff is too big to show here.

nixos/modules/system/boot/stage-2.nix+9−33

This diff is too big to show here.

nixos/modules/system/boot/systemd-lib.nix−235

This diff is too big to show here.

nixos/modules/system/boot/systemd-nspawn.nix−133

This diff is too big to show here.

nixos/modules/system/boot/systemd-unit-options.nix−536

This diff is too big to show here.

nixos/modules/system/boot/systemd.nix+96−663

This diff is too big to show here.

nixos/modules/system/boot/systemd/coredump.nix+57

This diff is too big to show here.

nixos/modules/system/boot/systemd/initrd-secrets.nix+36

This diff is too big to show here.

nixos/modules/system/boot/systemd/initrd.nix+502

This diff is too big to show here.

nixos/modules/system/boot/systemd/journald.nix+131

This diff is too big to show here.

nixos/modules/system/boot/systemd/logind.nix+114

This diff is too big to show here.

nixos/modules/system/boot/systemd/nspawn.nix+131

This diff is too big to show here.

nixos/modules/system/boot/systemd/shutdown.nix+58

This diff is too big to show here.

nixos/modules/system/boot/systemd/tmpfiles.nix+120

This diff is too big to show here.

nixos/modules/system/boot/systemd/user.nix+153

This diff is too big to show here.

nixos/modules/system/boot/timesyncd.nix+20−5

This diff is too big to show here.

nixos/modules/system/boot/tmp.nix+26−1

This diff is too big to show here.

nixos/modules/system/build.nix+21

This diff is too big to show here.

nixos/modules/system/etc/etc-activation.nix+12

This diff is too big to show here.

nixos/modules/system/etc/etc.nix+61−22

This diff is too big to show here.

nixos/modules/system/etc/make-etc.sh−45

This diff is too big to show here.

nixos/modules/system/etc/setup-etc.pl+6

This diff is too big to show here.

nixos/modules/system/etc/test.nix+70

This diff is too big to show here.

nixos/modules/tasks/auto-upgrade.nix+105−20

This diff is too big to show here.

nixos/modules/tasks/bcache.nix+16−6

This diff is too big to show here.

nixos/modules/tasks/cpu-freq.nix+1−1

This diff is too big to show here.

nixos/modules/tasks/encrypted-devices.nix+1−1

This diff is too big to show here.

nixos/modules/tasks/filesystems.nix+96−13

This diff is too big to show here.

nixos/modules/tasks/filesystems/apfs.nix+22

This diff is too big to show here.

nixos/modules/tasks/filesystems/bcachefs.nix+2−2

This diff is too big to show here.

nixos/modules/tasks/filesystems/btrfs.nix+14−5

This diff is too big to show here.

nixos/modules/tasks/filesystems/cifs.nix+1−1

This diff is too big to show here.

nixos/modules/tasks/filesystems/ecryptfs.nix+12−2

This diff is too big to show here.

nixos/modules/tasks/filesystems/exfat.nix+5−3

This diff is too big to show here.

nixos/modules/tasks/filesystems/ext.nix+10−4

This diff is too big to show here.

nixos/modules/tasks/filesystems/f2fs.nix+1−1

This diff is too big to show here.

nixos/modules/tasks/filesystems/jfs.nix+1−1

This diff is too big to show here.

nixos/modules/tasks/filesystems/nfs.nix+1−1

This diff is too big to show here.

nixos/modules/tasks/filesystems/reiserfs.nix+1−1

This diff is too big to show here.

nixos/modules/tasks/filesystems/unionfs-fuse.nix+13−2

This diff is too big to show here.

nixos/modules/tasks/filesystems/vfat.nix+1−1

This diff is too big to show here.

nixos/modules/tasks/filesystems/xfs.nix+2−2

This diff is too big to show here.

nixos/modules/tasks/filesystems/zfs.nix+169−67

This diff is too big to show here.

nixos/modules/tasks/lvm.nix+73−14

This diff is too big to show here.

nixos/modules/tasks/network-interfaces-scripted.nix+80−9

This diff is too big to show here.

nixos/modules/tasks/network-interfaces-systemd.nix+116−6

This diff is too big to show here.

nixos/modules/tasks/network-interfaces.nix+346−68

This diff is too big to show here.

nixos/modules/tasks/snapraid.nix+230

This diff is too big to show here.

nixos/modules/tasks/swraid.nix+35−9

This diff is too big to show here.

nixos/modules/tasks/trackpoint.nix+5−4

This diff is too big to show here.

nixos/modules/testing/service-runner.nix+3−3

This diff is too big to show here.

nixos/modules/testing/test-instrumentation.nix+32−32

This diff is too big to show here.

nixos/modules/virtualisation/amazon-ec2-amis.nix+444

This diff is too big to show here.

nixos/modules/virtualisation/amazon-image.nix+33−10

This diff is too big to show here.

nixos/modules/virtualisation/amazon-init.nix+40−13

This diff is too big to show here.

nixos/modules/virtualisation/amazon-options.nix+54−1

This diff is too big to show here.

nixos/modules/virtualisation/anbox.nix+1−2

This diff is too big to show here.

nixos/modules/virtualisation/azure-agent.nix+6−10

This diff is too big to show here.

nixos/modules/virtualisation/azure-common.nix+5−1

This diff is too big to show here.

nixos/modules/virtualisation/azure-image.nix+3−2

This diff is too big to show here.

nixos/modules/virtualisation/brightbox-image.nix+1−1

This diff is too big to show here.

nixos/modules/virtualisation/build-vm.nix+58

This diff is too big to show here.

nixos/modules/virtualisation/container-config.nix+1−1

This diff is too big to show here.

nixos/modules/virtualisation/containerd.nix+101

This diff is too big to show here.

nixos/modules/virtualisation/containers.nix+52−34

This diff is too big to show here.

nixos/modules/virtualisation/cri-o.nix+49−27

This diff is too big to show here.

nixos/modules/virtualisation/digital-ocean-image.nix+3−2

This diff is too big to show here.

nixos/modules/virtualisation/digital-ocean-init.nix+1−1

This diff is too big to show here.

nixos/modules/virtualisation/docker-rootless.nix+102

This diff is too big to show here.

nixos/modules/virtualisation/docker.nix+40−12

This diff is too big to show here.

nixos/modules/virtualisation/ec2-amis.nix+9−352

This diff is too big to show here.

nixos/modules/virtualisation/ec2-data.nix+1−1

This diff is too big to show here.

nixos/modules/virtualisation/ec2-metadata-fetcher.nix+1−1

This diff is too big to show here.

nixos/modules/virtualisation/ecs-agent.nix+1−1

This diff is too big to show here.

nixos/modules/virtualisation/gce-images.nix+9−1

This diff is too big to show here.

nixos/modules/virtualisation/google-compute-config.nix+33−79

This diff is too big to show here.

nixos/modules/virtualisation/google-compute-image.nix+14−4

This diff is too big to show here.

nixos/modules/virtualisation/hyperv-guest.nix+5−3

This diff is too big to show here.

nixos/modules/virtualisation/hyperv-image.nix+3−2

This diff is too big to show here.

nixos/modules/virtualisation/kubevirt.nix+30

This diff is too big to show here.

nixos/modules/virtualisation/kvmgt.nix+1−1

This diff is too big to show here.

nixos/modules/virtualisation/libvirtd.nix+184−68

This diff is too big to show here.

nixos/modules/virtualisation/lxc-container.nix+161−13

This diff is too big to show here.

nixos/modules/virtualisation/lxc.nix+8−4

This diff is too big to show here.

nixos/modules/virtualisation/lxd.nix+65−33

This diff is too big to show here.

nixos/modules/virtualisation/nixos-containers.nix+102−65

This diff is too big to show here.

nixos/modules/virtualisation/oci-containers.nix+82−40

This diff is too big to show here.

nixos/modules/virtualisation/openstack-config.nix+39−7

This diff is too big to show here.

nixos/modules/virtualisation/openstack-metadata-fetcher.nix+5−4

This diff is too big to show here.

nixos/modules/virtualisation/openstack-options.nix+71

This diff is too big to show here.

nixos/modules/virtualisation/openvswitch.nix+10−55

This diff is too big to show here.

nixos/modules/virtualisation/parallels-guest.nix+1−2

This diff is too big to show here.

nixos/modules/virtualisation/podman.nix−98

This diff is too big to show here.

nixos/modules/virtualisation/podman/default.nix+187

This diff is too big to show here.

nixos/modules/virtualisation/podman/dnsname.nix+36

This diff is too big to show here.

nixos/modules/virtualisation/podman/network-socket-ghostunnel.nix+34

This diff is too big to show here.

nixos/modules/virtualisation/podman/network-socket.nix+95

This diff is too big to show here.

nixos/modules/virtualisation/proxmox-image.nix+169

This diff is too big to show here.

nixos/modules/virtualisation/proxmox-lxc.nix+64

This diff is too big to show here.

nixos/modules/virtualisation/qemu-guest-agent.nix+6−2

This diff is too big to show here.

nixos/modules/virtualisation/qemu-vm.nix+377−88

This diff is too big to show here.

nixos/modules/virtualisation/railcar.nix+4−5

This diff is too big to show here.

nixos/modules/virtualisation/spice-usb-redirection.nix+4−2

This diff is too big to show here.

nixos/modules/virtualisation/virtualbox-guest.nix+2−2

This diff is too big to show here.

nixos/modules/virtualisation/virtualbox-host.nix+10−2

This diff is too big to show here.

nixos/modules/virtualisation/virtualbox-image.nix+25−4

This diff is too big to show here.

nixos/modules/virtualisation/vmware-guest.nix+27−1

This diff is too big to show here.

nixos/modules/virtualisation/vmware-host.nix+166

This diff is too big to show here.

nixos/modules/virtualisation/vmware-image.nix+3−2

This diff is too big to show here.

nixos/modules/virtualisation/waydroid.nix+75

This diff is too big to show here.

nixos/modules/virtualisation/xe-guest-utilities.nix+1−1

This diff is too big to show here.

nixos/modules/virtualisation/xen-dom0.nix+9−10

This diff is too big to show here.

nixos/release-combined.nix+9−5

This diff is too big to show here.

nixos/release-small.nix+4−2

This diff is too big to show here.

nixos/release.nix+75−16

This diff is too big to show here.

nixos/tests/3proxy.nix+1−1

This diff is too big to show here.

nixos/tests/acme.nix+404−177

This diff is too big to show here.

nixos/tests/adguardhome.nix+57

This diff is too big to show here.

nixos/tests/aesmd.nix+62

This diff is too big to show here.

nixos/tests/agda.nix+16−7

This diff is too big to show here.

nixos/tests/airsonic.nix+28

This diff is too big to show here.

nixos/tests/all-terminfo.nix+31

This diff is too big to show here.

nixos/tests/all-tests.nix+272−58

This diff is too big to show here.

nixos/tests/amazon-init-shell.nix+40

This diff is too big to show here.

nixos/tests/ammonite.nix−20

This diff is too big to show here.

nixos/tests/apfs.nix+54

This diff is too big to show here.

nixos/tests/apparmor.nix+82

This diff is too big to show here.

nixos/tests/atd.nix+2−2

This diff is too big to show here.

nixos/tests/atop.nix+226

This diff is too big to show here.

nixos/tests/avahi.nix+2−2

This diff is too big to show here.

nixos/tests/babeld.nix+1−7

This diff is too big to show here.

nixos/tests/bazarr.nix+1−1

This diff is too big to show here.

nixos/tests/bcachefs.nix+8−9

This diff is too big to show here.

nixos/tests/beanstalkd.nix+1−1

This diff is too big to show here.

nixos/tests/bees.nix+2−2

This diff is too big to show here.

nixos/tests/bind.nix+2−1

This diff is too big to show here.

nixos/tests/bird.nix+129

This diff is too big to show here.

nixos/tests/bitcoind.nix+2−2

This diff is too big to show here.

nixos/tests/bittorrent.nix+2−2

This diff is too big to show here.

nixos/tests/bitwarden.nix−188

This diff is too big to show here.

nixos/tests/blockbook-frontend.nix+2−2

This diff is too big to show here.

nixos/tests/blocky.nix+34

This diff is too big to show here.

nixos/tests/boot-stage1.nix+4−2

This diff is too big to show here.

nixos/tests/boot.nix+61−18

This diff is too big to show here.

nixos/tests/borgbackup.nix+35−2

This diff is too big to show here.

nixos/tests/botamusique.nix+51

This diff is too big to show here.

nixos/tests/bpf.nix+29

This diff is too big to show here.

nixos/tests/breitbandmessung.nix+33

This diff is too big to show here.

nixos/tests/brscan5.nix+43

This diff is too big to show here.

nixos/tests/btrbk.nix+110

This diff is too big to show here.

nixos/tests/buildbot.nix+1−1

This diff is too big to show here.

nixos/tests/buildkite-agents.nix+2−2

This diff is too big to show here.

nixos/tests/caddy.nix+57−41

This diff is too big to show here.

nixos/tests/cadvisor.nix+1−1

This diff is too big to show here.

nixos/tests/cage.nix+7−14

This diff is too big to show here.

nixos/tests/cagebreak.nix+26−55

This diff is too big to show here.

nixos/tests/calibre-web.nix+43

This diff is too big to show here.

nixos/tests/cassandra.nix+6−5

This diff is too big to show here.

nixos/tests/ceph-multi-node.nix+3−3

This diff is too big to show here.

nixos/tests/ceph-single-node-bluestore.nix+196

This diff is too big to show here.

nixos/tests/ceph-single-node.nix+2−2

This diff is too big to show here.

nixos/tests/cfssl.nix+1−1

This diff is too big to show here.

nixos/tests/charliecloud.nix+1−1

This diff is too big to show here.

nixos/tests/chromium.nix+132−138

This diff is too big to show here.

nixos/tests/cjdns.nix+1−1

This diff is too big to show here.

nixos/tests/clickhouse.nix+3−2

This diff is too big to show here.

nixos/tests/cloud-init.nix+39−12

This diff is too big to show here.

nixos/tests/cntr.nix+75

This diff is too big to show here.

nixos/tests/cockroachdb.nix+1−1

This diff is too big to show here.

nixos/tests/codimd.nix−60

This diff is too big to show here.

nixos/tests/collectd.nix+38

This diff is too big to show here.

nixos/tests/common/acme/client/default.nix+4−2

This diff is too big to show here.

nixos/tests/common/acme/server/default.nix+5

This diff is too big to show here.

nixos/tests/common/ec2.nix+1

This diff is too big to show here.

nixos/tests/common/lxd/config.yaml+24

This diff is too big to show here.

nixos/tests/common/wayland-cage.nix+13

This diff is too big to show here.

nixos/tests/containers-bridge.nix+5−8

This diff is too big to show here.

nixos/tests/containers-custom-pkgs.nix+23−31

This diff is too big to show here.

nixos/tests/containers-ephemeral.nix+8−8

This diff is too big to show here.

nixos/tests/containers-extra_veth.nix+5−8

This diff is too big to show here.

nixos/tests/containers-hosts.nix+4−7

This diff is too big to show here.

nixos/tests/containers-imperative.nix+33−16

This diff is too big to show here.

nixos/tests/containers-ip.nix+5−8

This diff is too big to show here.

nixos/tests/containers-macvlans.nix+3−7

This diff is too big to show here.

nixos/tests/containers-names.nix+37

This diff is too big to show here.

nixos/tests/containers-nested.nix+30

This diff is too big to show here.

nixos/tests/containers-physical_interfaces.nix+3−8

This diff is too big to show here.

nixos/tests/containers-portforward.nix+5−8

This diff is too big to show here.

nixos/tests/containers-reloadable.nix+3−4

This diff is too big to show here.

nixos/tests/containers-restart_networking.nix+3−5

This diff is too big to show here.

nixos/tests/containers-tmpfs.nix+10−13

This diff is too big to show here.

nixos/tests/convos.nix+1−1

This diff is too big to show here.

nixos/tests/coturn.nix+29

This diff is too big to show here.

nixos/tests/couchdb.nix+4−39

This diff is too big to show here.

nixos/tests/cri-o.nix+1−1

This diff is too big to show here.

nixos/tests/croc.nix+51

This diff is too big to show here.

nixos/tests/cryptpad.nix+18

This diff is too big to show here.

nixos/tests/custom-ca.nix+193

This diff is too big to show here.

nixos/tests/deluge.nix+12−58

This diff is too big to show here.

nixos/tests/dendrite.nix+99

This diff is too big to show here.

nixos/tests/dex-oidc.nix+78

This diff is too big to show here.

nixos/tests/disable-installer-tools.nix+29

This diff is too big to show here.

nixos/tests/discourse.nix+201

This diff is too big to show here.

nixos/tests/dnscrypt-proxy2.nix+1−1

This diff is too big to show here.

nixos/tests/dnscrypt-wrapper/default.nix+2−1

This diff is too big to show here.

nixos/tests/dnsdist.nix+48

This diff is too big to show here.

nixos/tests/doas.nix+16−1

This diff is too big to show here.

nixos/tests/docker-edge.nix+1−1

This diff is too big to show here.

nixos/tests/docker-registry.nix+1−1

This diff is too big to show here.

nixos/tests/docker-rootless.nix+41

This diff is too big to show here.

nixos/tests/docker-tools-cross.nix+76

This diff is too big to show here.

nixos/tests/docker-tools-overlay.nix+2−2

This diff is too big to show here.

nixos/tests/docker-tools.nix+183−10

This diff is too big to show here.

nixos/tests/docker.nix+4−1

This diff is too big to show here.

nixos/tests/documize.nix+2−2

This diff is too big to show here.

nixos/tests/doh-proxy-rust.nix+43

This diff is too big to show here.

nixos/tests/dokuwiki.nix+63−28

This diff is too big to show here.

nixos/tests/domination.nix+26

This diff is too big to show here.

nixos/tests/dovecot.nix+8−3

This diff is too big to show here.

nixos/tests/drbd.nix+87

This diff is too big to show here.

nixos/tests/earlyoom.nix+16

This diff is too big to show here.

nixos/tests/ec2.nix+5

This diff is too big to show here.

nixos/tests/ecryptfs.nix+1−1

This diff is too big to show here.

nixos/tests/elk.nix+133−41

This diff is too big to show here.

nixos/tests/emacs-daemon.nix+3−3

This diff is too big to show here.

nixos/tests/empty-file

This diff is too big to show here.

nixos/tests/engelsystem.nix+1−1

This diff is too big to show here.

nixos/tests/enlightenment.nix+5−6

This diff is too big to show here.

nixos/tests/env.nix+2−2

This diff is too big to show here.

nixos/tests/envoy.nix+33

This diff is too big to show here.

nixos/tests/ergo.nix+1−1

This diff is too big to show here.

nixos/tests/ergochat.nix+97

This diff is too big to show here.

nixos/tests/etcd-cluster.nix+1−1

This diff is too big to show here.

nixos/tests/etcd.nix+1−1

This diff is too big to show here.

nixos/tests/etebase-server.nix+50

This diff is too big to show here.

nixos/tests/etesync-dav.nix+21

This diff is too big to show here.

nixos/tests/fancontrol.nix+23−17

This diff is too big to show here.

nixos/tests/fcitx/default.nix+1−2

This diff is too big to show here.

nixos/tests/fenics.nix+2−3

This diff is too big to show here.

nixos/tests/ferm.nix+1−1

This diff is too big to show here.

nixos/tests/firefox.nix+10−12

This diff is too big to show here.

nixos/tests/firejail.nix+10−1

This diff is too big to show here.

nixos/tests/firewall.nix+1−1

This diff is too big to show here.

nixos/tests/fish.nix+1−1

This diff is too big to show here.

nixos/tests/fluentd.nix+1−1

This diff is too big to show here.

nixos/tests/fluidd.nix+21

This diff is too big to show here.

nixos/tests/fontconfig-default-fonts.nix+1−2

This diff is too big to show here.

nixos/tests/freeswitch.nix+1−1

This diff is too big to show here.

nixos/tests/frr.nix+104

This diff is too big to show here.

nixos/tests/fsck.nix+2−2

This diff is too big to show here.

nixos/tests/ft2-clone.nix+2−2

This diff is too big to show here.

nixos/tests/gerrit.nix+1−2

This diff is too big to show here.

nixos/tests/geth.nix+41

This diff is too big to show here.

nixos/tests/ghostunnel.nix+103

This diff is too big to show here.

nixos/tests/git/hub.nix+17

This diff is too big to show here.

nixos/tests/gitdaemon.nix+6−2

This diff is too big to show here.

nixos/tests/gitea.nix+2−1

This diff is too big to show here.

nixos/tests/gitlab.nix+401−60

This diff is too big to show here.

nixos/tests/gitolite-fcgiwrap.nix+3−3

This diff is too big to show here.

nixos/tests/gitolite.nix+1−1

This diff is too big to show here.

nixos/tests/glusterfs.nix+2−2

This diff is too big to show here.

nixos/tests/gnome-xorg.nix+96

This diff is too big to show here.

nixos/tests/gnome.nix+97

This diff is too big to show here.

nixos/tests/gnome3-xorg.nix−81

This diff is too big to show here.

nixos/tests/gnome3.nix−82

This diff is too big to show here.

nixos/tests/go-neb.nix+7−7

This diff is too big to show here.

nixos/tests/gobgpd.nix+71

This diff is too big to show here.

nixos/tests/gocd-agent.nix+2−2

This diff is too big to show here.

nixos/tests/gocd-server.nix+1−1

This diff is too big to show here.

nixos/tests/google-oslogin/default.nix+3−3

This diff is too big to show here.

nixos/tests/google-oslogin/server.nix+2−4

This diff is too big to show here.

nixos/tests/google-oslogin/server.py

This diff is too big to show here.

nixos/tests/gotify-server.nix+2−2

This diff is too big to show here.

nixos/tests/grafana.nix+16−4

This diff is too big to show here.

nixos/tests/graphite.nix−1

This diff is too big to show here.

nixos/tests/graylog.nix+2−2

This diff is too big to show here.

nixos/tests/grocy.nix+3−3

This diff is too big to show here.

nixos/tests/grub.nix+1−1

This diff is too big to show here.

nixos/tests/gvisor.nix+1−1

This diff is too big to show here.

nixos/tests/hadoop/default.nix+7

This diff is too big to show here.

nixos/tests/hadoop/hadoop.nix+255

This diff is too big to show here.

nixos/tests/hadoop/hdfs.nix+57−27

This diff is too big to show here.

nixos/tests/hadoop/yarn.nix+22−23

This diff is too big to show here.

nixos/tests/haka.nix+1−1

This diff is too big to show here.

nixos/tests/handbrake.nix−31

This diff is too big to show here.

nixos/tests/haproxy.nix−1

This diff is too big to show here.

nixos/tests/hardened.nix+8−44

This diff is too big to show here.

nixos/tests/haste-server.nix+23

This diff is too big to show here.

nixos/tests/hbase.nix+30

This diff is too big to show here.

nixos/tests/hedgedoc.nix+60

This diff is too big to show here.

nixos/tests/herbstluftwm.nix+37

This diff is too big to show here.

nixos/tests/hibernate.nix+113−24

This diff is too big to show here.

nixos/tests/hitch/default.nix+2−2

This diff is too big to show here.

nixos/tests/hledger-web.nix+50

This diff is too big to show here.

nixos/tests/hocker-fetchdocker/default.nix+2−2

This diff is too big to show here.

nixos/tests/hockeypuck.nix+63

This diff is too big to show here.

nixos/tests/home-assistant.nix+95−36

This diff is too big to show here.

nixos/tests/hostname.nix+12−6

This diff is too big to show here.

nixos/tests/hound.nix+2−2

This diff is too big to show here.

nixos/tests/hydra/common.nix+2−2

This diff is too big to show here.

nixos/tests/hydra/default.nix+3−3

This diff is too big to show here.

nixos/tests/i3wm.nix+2−2

This diff is too big to show here.

nixos/tests/icingaweb2.nix+1−1

This diff is too big to show here.

nixos/tests/iftop.nix+1−1

This diff is too big to show here.

nixos/tests/ihatemoney.nix−62

This diff is too big to show here.

nixos/tests/ihatemoney/default.nix+78

This diff is too big to show here.

nixos/tests/ihatemoney/rates.json+39

This diff is too big to show here.

nixos/tests/ihatemoney/server.crt+28

This diff is too big to show here.

nixos/tests/ihatemoney/server.key+52

This diff is too big to show here.

nixos/tests/image-contents.nix+51

This diff is too big to show here.

nixos/tests/incron.nix+1−1

This diff is too big to show here.

nixos/tests/influxdb.nix+1−1

This diff is too big to show here.

nixos/tests/initrd-network.nix+2−2

This diff is too big to show here.

nixos/tests/initrd-secrets.nix+41

This diff is too big to show here.

nixos/tests/input-remapper.nix+52

This diff is too big to show here.

nixos/tests/inspircd.nix+93

This diff is too big to show here.

nixos/tests/installed-tests/appstream-qt.nix+9

This diff is too big to show here.

nixos/tests/installed-tests/appstream.nix+9

This diff is too big to show here.

nixos/tests/installed-tests/default.nix+5−1

This diff is too big to show here.

nixos/tests/installed-tests/flatpak.nix+1

This diff is too big to show here.

nixos/tests/installed-tests/fwupd.nix−1

This diff is too big to show here.

nixos/tests/installed-tests/gjs.nix+6

This diff is too big to show here.

nixos/tests/installed-tests/gnome-photos.nix+1−1

This diff is too big to show here.

nixos/tests/installed-tests/libgdata.nix+1−1

This diff is too big to show here.

nixos/tests/installed-tests/librsvg.nix+9

This diff is too big to show here.

nixos/tests/installed-tests/pipewire.nix+10

This diff is too big to show here.

nixos/tests/installed-tests/power-profiles-daemon.nix+9

This diff is too big to show here.

nixos/tests/installer-systemd-stage-1.nix+33

This diff is too big to show here.

nixos/tests/installer.nix+67−54

This diff is too big to show here.

nixos/tests/invidious.nix+81

This diff is too big to show here.

nixos/tests/invoiceplane.nix+82

This diff is too big to show here.

nixos/tests/ipfs.nix+6−1

This diff is too big to show here.

nixos/tests/ipv6.nix+63−24

This diff is too big to show here.

nixos/tests/iscsi-multipath-root.nix+267

This diff is too big to show here.

nixos/tests/iscsi-root.nix+161

This diff is too big to show here.

nixos/tests/isso.nix+30

This diff is too big to show here.

nixos/tests/jellyfin.nix+155−16

This diff is too big to show here.

nixos/tests/jenkins-cli.nix+30

This diff is too big to show here.

nixos/tests/jenkins.nix+86−3

This diff is too big to show here.

nixos/tests/jibri.nix+69

This diff is too big to show here.

nixos/tests/jitsi-meet.nix+3−9

This diff is too big to show here.

nixos/tests/k3s-single-node-docker.nix+84

This diff is too big to show here.

nixos/tests/k3s-single-node.nix+82

This diff is too big to show here.

nixos/tests/k3s.nix−78

This diff is too big to show here.

nixos/tests/kafka.nix+3−18

This diff is too big to show here.

nixos/tests/kbd-setfont-decompress.nix+21

This diff is too big to show here.

nixos/tests/kbd-update-search-paths-patch.nix+19

This diff is too big to show here.

nixos/tests/kea.nix+73

This diff is too big to show here.

nixos/tests/keepassxc.nix+68

This diff is too big to show here.

nixos/tests/kerberos/heimdal.nix+2−2

This diff is too big to show here.

nixos/tests/kerberos/mit.nix+1−1

This diff is too big to show here.

nixos/tests/kernel-generic.nix+41

This diff is too big to show here.

nixos/tests/kernel-latest-ath-user-regd.nix+17

This diff is too big to show here.

nixos/tests/kernel-latest.nix−17

This diff is too big to show here.

nixos/tests/kernel-lts.nix−17

This diff is too big to show here.

nixos/tests/kernel-testing.nix−17

This diff is too big to show here.

nixos/tests/kexec.nix+44−19

This diff is too big to show here.

nixos/tests/keycloak.nix+47−11

This diff is too big to show here.

nixos/tests/keymap.nix+25−4

This diff is too big to show here.

nixos/tests/knot.nix+7−1

This diff is too big to show here.

nixos/tests/krb5/deprecated-config.nix+2−2

This diff is too big to show here.

nixos/tests/krb5/example-config.nix+2−2

This diff is too big to show here.

nixos/tests/ksm.nix+22

This diff is too big to show here.

nixos/tests/kubernetes/base.nix+3−4

This diff is too big to show here.

nixos/tests/kubernetes/default.nix+13−5

This diff is too big to show here.

nixos/tests/kubernetes/dns.nix+10−11

This diff is too big to show here.

nixos/tests/kubernetes/e2e.nix+1−1

This diff is too big to show here.

nixos/tests/kubernetes/rbac.nix+12−12

This diff is too big to show here.

nixos/tests/leaps.nix+1−1

This diff is too big to show here.

nixos/tests/libinput.nix+38

This diff is too big to show here.

nixos/tests/libreddit.nix+19

This diff is too big to show here.

nixos/tests/libresprite.nix+30

This diff is too big to show here.

nixos/tests/libreswan.nix+134

This diff is too big to show here.

nixos/tests/lightdm.nix+3−3

This diff is too big to show here.

nixos/tests/limesurvey.nix+2−2

This diff is too big to show here.

nixos/tests/litestream.nix+93

This diff is too big to show here.

nixos/tests/locate.nix+62

This diff is too big to show here.

nixos/tests/login.nix+3−3

This diff is too big to show here.

nixos/tests/logrotate.nix+152

This diff is too big to show here.

nixos/tests/loki.nix+4−2

This diff is too big to show here.

nixos/tests/lorri/default.nix+1−1

This diff is too big to show here.

nixos/tests/lvm2/default.nix+45

This diff is too big to show here.

nixos/tests/lvm2/systemd-stage-1.nix+104

This diff is too big to show here.

nixos/tests/lvm2/thinpool.nix+32

This diff is too big to show here.

nixos/tests/lvm2/vdo.nix+27

This diff is too big to show here.

nixos/tests/lxd-image-server.nix+94

This diff is too big to show here.

nixos/tests/lxd-nftables.nix+2−2

This diff is too big to show here.

nixos/tests/lxd.nix+42−65

This diff is too big to show here.

nixos/tests/maddy.nix+58

This diff is too big to show here.

nixos/tests/maestral.nix+72

This diff is too big to show here.

nixos/tests/magic-wormhole-mailbox-server.nix+2−2

This diff is too big to show here.

nixos/tests/magnetico.nix+2−2

This diff is too big to show here.

nixos/tests/mailcatcher.nix+8−3

This diff is too big to show here.

nixos/tests/mailhog.nix+24

This diff is too big to show here.

nixos/tests/make-test-python.nix+1−1

This diff is too big to show here.

nixos/tests/man.nix+100

This diff is too big to show here.

nixos/tests/matomo.nix+2−2

This diff is too big to show here.

nixos/tests/matrix-appservice-irc.nix+224

This diff is too big to show here.

nixos/tests/matrix-conduit.nix+95

This diff is too big to show here.

nixos/tests/matrix-synapse.nix+141−10

This diff is too big to show here.

nixos/tests/matrix/mjolnir.nix+170

This diff is too big to show here.

nixos/tests/matrix/pantalaimon.nix+88

This diff is too big to show here.

nixos/tests/mattermost.nix+124

This diff is too big to show here.

nixos/tests/mediawiki.nix+1−1

This diff is too big to show here.

nixos/tests/meilisearch.nix+60

This diff is too big to show here.

nixos/tests/memcached.nix+1−1

This diff is too big to show here.

nixos/tests/metabase.nix+1−2

This diff is too big to show here.

nixos/tests/minecraft-server.nix+37

This diff is too big to show here.

nixos/tests/minecraft.nix+28

This diff is too big to show here.

nixos/tests/minidlna.nix+4−2

This diff is too big to show here.

nixos/tests/miniflux.nix+36−10

This diff is too big to show here.

nixos/tests/minio.nix+5−2

This diff is too big to show here.

nixos/tests/misc.nix+11−10

This diff is too big to show here.

nixos/tests/mod_perl.nix+53

This diff is too big to show here.

nixos/tests/moinmoin.nix−28

This diff is too big to show here.

nixos/tests/molly-brown.nix+1−1

This diff is too big to show here.

nixos/tests/mongodb.nix+5−1

This diff is too big to show here.

nixos/tests/moodle.nix+1−1

This diff is too big to show here.

nixos/tests/moonraker.nix+45

This diff is too big to show here.

nixos/tests/moosefs.nix+89

This diff is too big to show here.

nixos/tests/morty.nix+1−1

This diff is too big to show here.

nixos/tests/mosquitto.nix+168−50

This diff is too big to show here.

nixos/tests/mpd.nix+7−5

This diff is too big to show here.

nixos/tests/mpv.nix+28

This diff is too big to show here.

nixos/tests/mtp.nix+109

This diff is too big to show here.

nixos/tests/mumble.nix+3−3

This diff is too big to show here.

nixos/tests/munin.nix+2−2

This diff is too big to show here.

nixos/tests/musescore.nix+86

This diff is too big to show here.

nixos/tests/mutable-users.nix+29−1

This diff is too big to show here.

nixos/tests/mxisd.nix+5−14

This diff is too big to show here.

nixos/tests/mysql/common.nix+10

This diff is too big to show here.

nixos/tests/mysql/mariadb-galera-mariabackup.nix−223

This diff is too big to show here.

nixos/tests/mysql/mariadb-galera-rsync.nix−216

This diff is too big to show here.

nixos/tests/mysql/mariadb-galera.nix+250

This diff is too big to show here.

nixos/tests/mysql/mysql-autobackup.nix+48−33

This diff is too big to show here.

nixos/tests/mysql/mysql-backup.nix+60−44

This diff is too big to show here.

nixos/tests/mysql/mysql-replication.nix+84−74

This diff is too big to show here.

nixos/tests/mysql/mysql.nix+134−188

This diff is too big to show here.

nixos/tests/n8n.nix+25

This diff is too big to show here.

nixos/tests/nagios.nix+2−2

This diff is too big to show here.

nixos/tests/nano.nix−44

This diff is too big to show here.

nixos/tests/nar-serve.nix+1−1

This diff is too big to show here.

nixos/tests/nat.nix+1−1

This diff is too big to show here.

nixos/tests/nats.nix+63

This diff is too big to show here.

nixos/tests/navidrome.nix+12

This diff is too big to show here.

nixos/tests/nbd.nix+103

This diff is too big to show here.

nixos/tests/ncdns.nix+7−10

This diff is too big to show here.

nixos/tests/ndppd.nix+1−1

This diff is too big to show here.

nixos/tests/nebula.nix+223

This diff is too big to show here.

nixos/tests/netdata.nix+1−1

This diff is too big to show here.

nixos/tests/networking-proxy.nix+1−2

This diff is too big to show here.

nixos/tests/networking.nix+251−18

This diff is too big to show here.

nixos/tests/nextcloud/basic.nix+35−8

This diff is too big to show here.

nixos/tests/nextcloud/default.nix+20−8

This diff is too big to show here.

nixos/tests/nextcloud/with-mysql-and-memcached.nix+9−19

This diff is too big to show here.

nixos/tests/nextcloud/with-postgresql-and-redis.nix+6−3

This diff is too big to show here.

nixos/tests/nexus.nix+2−2

This diff is too big to show here.

nixos/tests/nfs/kerberos.nix+5−5

This diff is too big to show here.

nixos/tests/nfs/simple.nix+3−3

This diff is too big to show here.

nixos/tests/nginx-etag.nix+1−2

This diff is too big to show here.

nixos/tests/nginx-modsecurity.nix+39

This diff is too big to show here.

nixos/tests/nginx-pubhtml.nix+1−1

This diff is too big to show here.

nixos/tests/nginx-sandbox.nix+2−2

This diff is too big to show here.

nixos/tests/nginx-sso.nix+2−2

This diff is too big to show here.

nixos/tests/nginx-variants.nix+2−2

This diff is too big to show here.

nixos/tests/nginx.nix+3−3

This diff is too big to show here.

nixos/tests/nitter.nix+18

This diff is too big to show here.

nixos/tests/nix-ld.nix+20

This diff is too big to show here.

nixos/tests/nix-serve-ssh.nix+45

This diff is too big to show here.

nixos/tests/nix-serve.nix+22

This diff is too big to show here.

nixos/tests/nix-ssh-serve.nix−45

This diff is too big to show here.

nixos/tests/nixops/default.nix+114

This diff is too big to show here.

nixos/tests/nixops/legacy/base-configuration.nix+31

This diff is too big to show here.

nixos/tests/nixops/legacy/nixops.nix+15

This diff is too big to show here.

nixos/tests/nixos-generate-config.nix+6−7

This diff is too big to show here.

nixos/tests/node-red.nix+31

This diff is too big to show here.

nixos/tests/nomad.nix+97

This diff is too big to show here.

nixos/tests/noto-fonts.nix+44

This diff is too big to show here.

nixos/tests/novacomd.nix+2−2

This diff is too big to show here.

nixos/tests/nsd.nix+11−1

This diff is too big to show here.

nixos/tests/nzbget.nix+19−3

This diff is too big to show here.

nixos/tests/nzbhydra2.nix+17

This diff is too big to show here.

nixos/tests/oci-containers.nix+1−1

This diff is too big to show here.

nixos/tests/odoo.nix+27

This diff is too big to show here.

nixos/tests/oh-my-zsh.nix+1−1

This diff is too big to show here.

nixos/tests/ombi.nix+18

This diff is too big to show here.

nixos/tests/openarena.nix+3−3

This diff is too big to show here.

nixos/tests/openldap.nix+15−10

This diff is too big to show here.

nixos/tests/openresty-lua.nix+55

This diff is too big to show here.

nixos/tests/opensmtpd-rspamd.nix+141

This diff is too big to show here.

nixos/tests/openssh.nix+13−7

This diff is too big to show here.

nixos/tests/opentabletdriver.nix+30

This diff is too big to show here.

nixos/tests/orangefs.nix+1−1

This diff is too big to show here.

nixos/tests/os-prober.nix+13−15

This diff is too big to show here.

nixos/tests/osrm-backend.nix+1−1

This diff is too big to show here.

nixos/tests/overlayfs.nix+29−32

This diff is too big to show here.

nixos/tests/owncast.nix+42

This diff is too big to show here.

nixos/tests/pacemaker.nix+110

This diff is too big to show here.

nixos/tests/packagekit.nix+2−3

This diff is too big to show here.

nixos/tests/pam/pam-file-contents.nix+25

This diff is too big to show here.

nixos/tests/pam/pam-oath-login.nix+3−3

This diff is too big to show here.

nixos/tests/pam/pam-u2f.nix+2−2

This diff is too big to show here.

nixos/tests/pam/pam-ussh.nix+70

This diff is too big to show here.

nixos/tests/pam/test_chfn.py+27

This diff is too big to show here.

nixos/tests/pantheon.nix+7−8

This diff is too big to show here.

nixos/tests/paperless.nix+25−17

This diff is too big to show here.

nixos/tests/parsedmarc/default.nix+235

This diff is too big to show here.

nixos/tests/pdns-recursor.nix+4−1

This diff is too big to show here.

nixos/tests/peerflix.nix+1−1

This diff is too big to show here.

nixos/tests/pgadmin4-standalone.nix+43

This diff is too big to show here.

nixos/tests/pgadmin4.nix+132

This diff is too big to show here.

nixos/tests/pgmanage.nix+1−1

This diff is too big to show here.

nixos/tests/php/default.nix+15−7

This diff is too big to show here.

nixos/tests/php/fpm.nix+25−19

This diff is too big to show here.

nixos/tests/php/httpd.nix+14−11

This diff is too big to show here.

nixos/tests/php/pcre.nix+14−11

This diff is too big to show here.

nixos/tests/pict-rs.nix+17

This diff is too big to show here.

nixos/tests/pinnwand.nix+10−2

This diff is too big to show here.

nixos/tests/plasma5-systemd-start.nix+42

This diff is too big to show here.

nixos/tests/plasma5.nix+9−7

This diff is too big to show here.

nixos/tests/plausible.nix+49

This diff is too big to show here.

nixos/tests/pleroma.nix+249

This diff is too big to show here.

nixos/tests/plikd.nix+27

This diff is too big to show here.

nixos/tests/plotinus.nix+3−3

This diff is too big to show here.

nixos/tests/podgrab.nix+34

This diff is too big to show here.

nixos/tests/podman.nix−79

This diff is too big to show here.

nixos/tests/podman/default.nix+144

This diff is too big to show here.

nixos/tests/podman/dnsname.nix+42

This diff is too big to show here.

nixos/tests/podman/tls-ghostunnel.nix+150

This diff is too big to show here.

nixos/tests/pomerium.nix+102

This diff is too big to show here.

nixos/tests/postfix-raise-smtpd-tls-security-level.nix+1−1

This diff is too big to show here.

nixos/tests/postfix.nix+1−1

This diff is too big to show here.

nixos/tests/postfixadmin.nix+31

This diff is too big to show here.

nixos/tests/postgis.nix+1−1

This diff is too big to show here.

nixos/tests/postgresql-wal-receiver.nix+13−5

This diff is too big to show here.

nixos/tests/postgresql.nix+51−4

This diff is too big to show here.

nixos/tests/power-profiles-daemon.nix+45

This diff is too big to show here.

nixos/tests/powerdns-admin.nix+117

This diff is too big to show here.

nixos/tests/powerdns.nix+1

This diff is too big to show here.

nixos/tests/predictable-interface-names.nix+7−3

This diff is too big to show here.

nixos/tests/printing.nix+3−12

This diff is too big to show here.

nixos/tests/privacyidea.nix+12−5

This diff is too big to show here.

nixos/tests/privoxy.nix+113

This diff is too big to show here.

nixos/tests/prometheus-exporters.nix+753−201

This diff is too big to show here.

nixos/tests/prometheus.nix+93−1

This diff is too big to show here.

nixos/tests/prowlarr.nix+18

This diff is too big to show here.

nixos/tests/proxy.nix+1−1

This diff is too big to show here.

nixos/tests/pt2-clone.nix+3−3

This diff is too big to show here.

nixos/tests/pulseaudio.nix+71

This diff is too big to show here.

nixos/tests/qboot.nix+1−1

This diff is too big to show here.

nixos/tests/quagga.nix−96

This diff is too big to show here.

nixos/tests/quorum.nix+33−10

This diff is too big to show here.

nixos/tests/rabbitmq.nix+9−3

This diff is too big to show here.

nixos/tests/radicale.nix+82−127

This diff is too big to show here.

nixos/tests/rasdaemon.nix+34

This diff is too big to show here.

nixos/tests/redis.nix+29−7

This diff is too big to show here.

nixos/tests/redmine.nix+1−1

This diff is too big to show here.

nixos/tests/resolv.nix+1−1

This diff is too big to show here.

nixos/tests/restart-by-activation-script.nix+73

This diff is too big to show here.

nixos/tests/restic.nix+7−1

This diff is too big to show here.

nixos/tests/retroarch.nix+49

This diff is too big to show here.

nixos/tests/riak.nix+1−1

This diff is too big to show here.

nixos/tests/robustirc-bridge.nix+1−1

This diff is too big to show here.

nixos/tests/roundcube.nix+1−1

This diff is too big to show here.

nixos/tests/rspamd.nix+41−32

This diff is too big to show here.

nixos/tests/rss2email.nix+1−1

This diff is too big to show here.

nixos/tests/rstudio-server.nix+24

This diff is too big to show here.

nixos/tests/rsyncd.nix+25−14

This diff is too big to show here.

nixos/tests/rsyslogd.nix+4−4

This diff is too big to show here.

nixos/tests/run-in-machine.nix−23

This diff is too big to show here.

nixos/tests/sabnzbd.nix+22

This diff is too big to show here.

nixos/tests/samba-wsdd.nix+2−2

This diff is too big to show here.

nixos/tests/samba.nix+2−3

This diff is too big to show here.

nixos/tests/sanoid.nix+38−17

This diff is too big to show here.

nixos/tests/sbt-extras.nix−16

This diff is too big to show here.

nixos/tests/sbt.nix−18

This diff is too big to show here.

nixos/tests/scala.nix−33

This diff is too big to show here.

nixos/tests/sddm.nix+3−3

This diff is too big to show here.

nixos/tests/seafile.nix+121

This diff is too big to show here.

nixos/tests/searx.nix+114

This diff is too big to show here.

nixos/tests/service-runner.nix+2−2

This diff is too big to show here.

nixos/tests/sfxr-qt.nix+32

This diff is too big to show here.

nixos/tests/shadow.nix+119

This diff is too big to show here.

nixos/tests/shattered-pixel-dungeon.nix+3−2

This diff is too big to show here.

nixos/tests/shiori.nix+2−3

This diff is too big to show here.

nixos/tests/signal-desktop.nix+33−7

This diff is too big to show here.

nixos/tests/simple.nix+2−2

This diff is too big to show here.

nixos/tests/slurm.nix+10−8

This diff is too big to show here.

nixos/tests/smokeping.nix+2−1

This diff is too big to show here.

nixos/tests/snapcast.nix+33−1

This diff is too big to show here.

nixos/tests/snapper.nix+2−2

This diff is too big to show here.

nixos/tests/soapui.nix+24

This diff is too big to show here.

nixos/tests/sogo.nix+2−2

This diff is too big to show here.

nixos/tests/solanum.nix+97

This diff is too big to show here.

nixos/tests/solr.nix+2−2

This diff is too big to show here.

nixos/tests/sourcehut.nix+212

This diff is too big to show here.

nixos/tests/spacecookie.nix+19−14

This diff is too big to show here.

nixos/tests/spark/default.nix+27

This diff is too big to show here.

nixos/tests/spark/spark_sample.py+40

This diff is too big to show here.

nixos/tests/spike.nix−22

This diff is too big to show here.

nixos/tests/ssh-keys.nix+1−1

This diff is too big to show here.

nixos/tests/sssd-ldap.nix+79−81

This diff is too big to show here.

nixos/tests/sssd.nix+2−2

This diff is too big to show here.

nixos/tests/starship.nix+42

This diff is too big to show here.

nixos/tests/step-ca.nix+77

This diff is too big to show here.

nixos/tests/strongswan-swanctl.nix+1−1

This diff is too big to show here.

nixos/tests/sudo.nix+26−3

This diff is too big to show here.

nixos/tests/sway.nix+138

This diff is too big to show here.

nixos/tests/switch-test.nix+1017−7

This diff is too big to show here.

nixos/tests/sympa.nix+1−2

This diff is too big to show here.

nixos/tests/syncthing-init.nix+10−10

This diff is too big to show here.

nixos/tests/syncthing-relay.nix+2−2

This diff is too big to show here.

nixos/tests/syncthing.nix+3−3

This diff is too big to show here.

nixos/tests/systemd-analyze.nix+2−2

This diff is too big to show here.

nixos/tests/systemd-binfmt.nix+86−20

This diff is too big to show here.

nixos/tests/systemd-boot.nix+172−8

This diff is too big to show here.

nixos/tests/systemd-confinement.nix+46−23

This diff is too big to show here.

nixos/tests/systemd-cryptenroll.nix+54

This diff is too big to show here.

nixos/tests/systemd-escaping.nix+45

This diff is too big to show here.

nixos/tests/systemd-initrd-btrfs-raid.nix+45

This diff is too big to show here.

nixos/tests/systemd-initrd-luks-keyfile.nix+53

This diff is too big to show here.

nixos/tests/systemd-initrd-luks-password.nix+48

This diff is too big to show here.

nixos/tests/systemd-initrd-simple.nix+44

This diff is too big to show here.

nixos/tests/systemd-initrd-swraid.nix+50

This diff is too big to show here.

nixos/tests/systemd-journal.nix+4−2

This diff is too big to show here.

nixos/tests/systemd-machinectl.nix+85

This diff is too big to show here.

nixos/tests/systemd-misc.nix+62

This diff is too big to show here.

nixos/tests/systemd-networkd-dhcpserver-static-leases.nix+81

This diff is too big to show here.

nixos/tests/systemd-networkd-dhcpserver.nix+1−1

This diff is too big to show here.

nixos/tests/systemd-networkd-ipv6-prefix-delegation.nix+14−25

This diff is too big to show here.

nixos/tests/systemd-networkd-vrf.nix+2

This diff is too big to show here.

nixos/tests/systemd-networkd.nix+11−2

This diff is too big to show here.

nixos/tests/systemd-shutdown.nix+26

This diff is too big to show here.

nixos/tests/systemd.nix+42−14

This diff is too big to show here.

nixos/tests/taskserver.nix+1

This diff is too big to show here.

nixos/tests/teeworlds.nix+3−3

This diff is too big to show here.

nixos/tests/telegraf.nix+2−2

This diff is too big to show here.

nixos/tests/teleport.nix+99

This diff is too big to show here.

nixos/tests/terminal-emulators.nix+207

This diff is too big to show here.

nixos/tests/thelounge.nix+29

This diff is too big to show here.

nixos/tests/tigervnc.nix+53

This diff is too big to show here.

nixos/tests/tinc/default.nix+139

This diff is too big to show here.

nixos/tests/tinc/snakeoil-keys.nix+157

This diff is too big to show here.

nixos/tests/tinydns.nix+15−1

This diff is too big to show here.

nixos/tests/tinywl.nix+57

This diff is too big to show here.

nixos/tests/tomcat.nix+21

This diff is too big to show here.

nixos/tests/tor.nix+10−15

This diff is too big to show here.

nixos/tests/trac.nix−19

This diff is too big to show here.

nixos/tests/traefik.nix+5−3

This diff is too big to show here.

nixos/tests/trafficserver.nix+177

This diff is too big to show here.

nixos/tests/transmission.nix+2−2

This diff is too big to show here.

nixos/tests/trezord.nix+1−1

This diff is too big to show here.

nixos/tests/trickster.nix+1−1

This diff is too big to show here.

nixos/tests/tsm-client-gui.nix+57

This diff is too big to show here.

nixos/tests/tuptime.nix+2−2

This diff is too big to show here.

nixos/tests/turbovnc-headless-server.nix+172

This diff is too big to show here.

nixos/tests/tuxguitar.nix+24

This diff is too big to show here.

nixos/tests/txredisapi.nix+29

This diff is too big to show here.

nixos/tests/ucarp.nix+66

This diff is too big to show here.

nixos/tests/udisks2.nix+3−3

This diff is too big to show here.

nixos/tests/unbound.nix+69−32

This diff is too big to show here.

nixos/tests/unifi.nix+36

This diff is too big to show here.

nixos/tests/upnp.nix+1−1

This diff is too big to show here.

nixos/tests/usbguard.nix+62

This diff is too big to show here.

nixos/tests/user-activation-scripts.nix+33

This diff is too big to show here.

nixos/tests/uwsgi.nix+57−14

This diff is too big to show here.

nixos/tests/v2ray.nix+2−2

This diff is too big to show here.

nixos/tests/vault-postgresql.nix+69

This diff is too big to show here.

nixos/tests/vault.nix+5−3

This diff is too big to show here.

nixos/tests/vaultwarden.nix+187

This diff is too big to show here.

nixos/tests/vector.nix+37

This diff is too big to show here.

nixos/tests/vengi-tools.nix+29

This diff is too big to show here.

nixos/tests/victoriametrics.nix+1−1

This diff is too big to show here.

nixos/tests/vikunja.nix+65

This diff is too big to show here.

nixos/tests/virtualbox.nix+10−16

This diff is too big to show here.

nixos/tests/vscodium.nix+78

This diff is too big to show here.

nixos/tests/vsftpd.nix+42

This diff is too big to show here.

nixos/tests/wasabibackend.nix+2−2

This diff is too big to show here.

nixos/tests/web-apps/mastodon.nix+170

This diff is too big to show here.

nixos/tests/web-apps/netbox.nix+30

This diff is too big to show here.

nixos/tests/web-apps/nifi.nix+30

This diff is too big to show here.

nixos/tests/web-apps/peertube.nix+131

This diff is too big to show here.

nixos/tests/web-servers/agate.nix+29

This diff is too big to show here.

nixos/tests/web-servers/unit-php.nix+21−31

This diff is too big to show here.

nixos/tests/wiki-js.nix+152

This diff is too big to show here.

nixos/tests/wine.nix+48

This diff is too big to show here.

nixos/tests/wireguard/basic.nix+4−4

This diff is too big to show here.

nixos/tests/wireguard/generated.nix+1−1

This diff is too big to show here.

nixos/tests/wireguard/namespaces.nix+1−1

This diff is too big to show here.

nixos/tests/wireguard/wg-quick.nix+2−2

This diff is too big to show here.

nixos/tests/without-nix.nix+32

This diff is too big to show here.

nixos/tests/wmderland.nix+54

This diff is too big to show here.

nixos/tests/wordpress.nix+57−24

This diff is too big to show here.

nixos/tests/wpa_supplicant.nix+96

This diff is too big to show here.

nixos/tests/xandikos.nix+4−4

This diff is too big to show here.

nixos/tests/xautolock.nix+1−1

This diff is too big to show here.

nixos/tests/xfce.nix+2−3

This diff is too big to show here.

nixos/tests/xmonad-xdg-autostart.nix+35

This diff is too big to show here.

nixos/tests/xmonad.nix+85−18

This diff is too big to show here.

nixos/tests/xmpp/ejabberd.nix+1−1

This diff is too big to show here.

nixos/tests/xmpp/prosody-mysql.nix+65−33

This diff is too big to show here.

nixos/tests/xmpp/prosody.nix+4−3

This diff is too big to show here.

nixos/tests/xmpp/xmpp-sendmessage.nix+25−6

This diff is too big to show here.

nixos/tests/xrdp.nix+3−3

This diff is too big to show here.

nixos/tests/xss-lock.nix+1−1

This diff is too big to show here.

nixos/tests/xterm.nix+3−3

This diff is too big to show here.

nixos/tests/xxh.nix+67

This diff is too big to show here.

nixos/tests/yabar.nix+3−3

This diff is too big to show here.

nixos/tests/yggdrasil.nix+9−13

This diff is too big to show here.

nixos/tests/zammad.nix+60

This diff is too big to show here.

nixos/tests/zfs.nix+77−4

This diff is too big to show here.

nixos/tests/zigbee2mqtt.nix+6−2

This diff is too big to show here.

nixos/tests/zoneminder.nix+1−1

This diff is too big to show here.

nixos/tests/zookeeper.nix+15−3

This diff is too big to show here.

nixos/tests/zrepl.nix+66

This diff is too big to show here.

nixos/tests/zsh-history.nix+3−3

This diff is too big to show here.

pkgs/applications/accessibility/contrast/default.nix+26−23

This diff is too big to show here.

pkgs/applications/accessibility/dasher/default.nix+34−19

This diff is too big to show here.

pkgs/applications/accessibility/espeakup/default.nix+46

This diff is too big to show here.

pkgs/applications/accessibility/mousetweaks/default.nix+6−6

This diff is too big to show here.

pkgs/applications/accessibility/squeekboard/default.nix+73

This diff is too big to show here.

pkgs/applications/accessibility/svkbd/default.nix+59

This diff is too big to show here.

pkgs/applications/accessibility/wvkbd/default.nix+36

This diff is too big to show here.

pkgs/applications/audio/AMB-plugins/default.nix+5−5

This diff is too big to show here.

pkgs/applications/audio/CHOWTapeModel/default.nix+78

This diff is too big to show here.

pkgs/applications/audio/ChowCentaur/default.nix+53

This diff is too big to show here.

pkgs/applications/audio/ChowKick/default.nix+106

This diff is too big to show here.

pkgs/applications/audio/ChowPhaser/default.nix+76

This diff is too big to show here.

pkgs/applications/audio/FIL-plugins/default.nix+5−5

This diff is too big to show here.

pkgs/applications/audio/LibreArp/default.nix+53

This diff is too big to show here.

pkgs/applications/audio/LibreArp/lv2.nix+53

This diff is too big to show here.

pkgs/applications/audio/MMA/default.nix+13−12

This diff is too big to show here.

pkgs/applications/audio/a2jmidid/default.nix+4−4

This diff is too big to show here.

pkgs/applications/audio/aacgain/default.nix+9−4

This diff is too big to show here.

pkgs/applications/audio/abcde/default.nix+3−3

This diff is too big to show here.

pkgs/applications/audio/adlplug/default.nix+77−15

This diff is too big to show here.

pkgs/applications/audio/aeolus/default.nix+5−5

This diff is too big to show here.

pkgs/applications/audio/aether-lv2/default.nix+33

This diff is too big to show here.

pkgs/applications/audio/airwave/default.nix+5−5

This diff is too big to show here.

pkgs/applications/audio/aj-snapshot/default.nix+9−10

This diff is too big to show here.

pkgs/applications/audio/amarok/default.nix+11−14

This diff is too big to show here.

pkgs/applications/audio/amberol/default.nix+75

This diff is too big to show here.

pkgs/applications/audio/ams-lv2/default.nix+4−4

This diff is too big to show here.

pkgs/applications/audio/ams/default.nix+5−5

This diff is too big to show here.

pkgs/applications/audio/apple-music-electron/default.nix+32

This diff is too big to show here.

pkgs/applications/audio/ardour/5.nix−162

This diff is too big to show here.

pkgs/applications/audio/ardour/default.nix+22−13

This diff is too big to show here.

pkgs/applications/audio/ario/default.nix+30−11

This diff is too big to show here.

pkgs/applications/audio/artyFX/default.nix+5−5

This diff is too big to show here.

pkgs/applications/audio/ashuffle/default.nix+13−5

This diff is too big to show here.

pkgs/applications/audio/asunder/default.nix+3−3

This diff is too big to show here.

pkgs/applications/audio/aucatctl/default.nix+4−4

This diff is too big to show here.

pkgs/applications/audio/audacious/default.nix+12−10

This diff is too big to show here.

pkgs/applications/audio/audacity/default.nix+186−46

This diff is too big to show here.

pkgs/applications/audio/audio-recorder/default.nix+6−6

This diff is too big to show here.

pkgs/applications/audio/aumix/default.nix+28−13

This diff is too big to show here.

pkgs/applications/audio/autotalent/default.nix+2−2

This diff is too big to show here.

pkgs/applications/audio/axoloti/default.nix+2−2

This diff is too big to show here.

pkgs/applications/audio/axoloti/dfu-util.nix+3−3

This diff is too big to show here.

pkgs/applications/audio/axoloti/libusb1.nix+11−10

This diff is too big to show here.

pkgs/applications/audio/bambootracker/default.nix+22−26

This diff is too big to show here.

pkgs/applications/audio/baudline/default.nix+4−4

This diff is too big to show here.

pkgs/applications/audio/bchoppr/default.nix+5−5

This diff is too big to show here.

pkgs/applications/audio/bespokesynth/default.nix+148

This diff is too big to show here.

pkgs/applications/audio/bitmeter/default.nix+3−3

This diff is too big to show here.

pkgs/applications/audio/bitwig-studio/bitwig-studio1.nix+6−6

This diff is too big to show here.

pkgs/applications/audio/bitwig-studio/bitwig-studio2.nix+1−1

This diff is too big to show here.

pkgs/applications/audio/bitwig-studio/bitwig-studio3.nix+71−13

This diff is too big to show here.

pkgs/applications/audio/bitwig-studio/bitwig-studio4.nix+80

This diff is too big to show here.

pkgs/applications/audio/bjumblr/default.nix+7−7

This diff is too big to show here.

pkgs/applications/audio/blanket/default.nix+69

This diff is too big to show here.

pkgs/applications/audio/boops/default.nix+28

This diff is too big to show here.

pkgs/applications/audio/bristol/default.nix+4−4

This diff is too big to show here.

pkgs/applications/audio/bs1770gain/default.nix−22

This diff is too big to show here.

pkgs/applications/audio/bschaffl/default.nix+4−4

This diff is too big to show here.

pkgs/applications/audio/bsequencer/default.nix+7−7

This diff is too big to show here.

pkgs/applications/audio/bshapr/default.nix+7−7

This diff is too big to show here.

pkgs/applications/audio/bslizr/default.nix+7−7

This diff is too big to show here.

pkgs/applications/audio/bucklespring/default.nix+63

This diff is too big to show here.

pkgs/applications/audio/cadence/default.nix+58−44

This diff is too big to show here.

pkgs/applications/audio/calf/default.nix+4−4

This diff is too big to show here.

pkgs/applications/audio/callaudiod/default.nix+45

This diff is too big to show here.

pkgs/applications/audio/cantata/default.nix+74−61

This diff is too big to show here.

pkgs/applications/audio/caps/default.nix+4−4

This diff is too big to show here.

pkgs/applications/audio/cardinal/default.nix+67

This diff is too big to show here.

pkgs/applications/audio/carla/default.nix+21−11

This diff is too big to show here.

pkgs/applications/audio/caudec/default.nix+9−13

This diff is too big to show here.

pkgs/applications/audio/cava/default.nix+5−5

This diff is too big to show here.

pkgs/applications/audio/cd-discid/default.nix+3−4

This diff is too big to show here.

pkgs/applications/audio/cdparanoia/default.nix+20−10

This diff is too big to show here.

pkgs/applications/audio/cheesecutter/default.nix+3−3

This diff is too big to show here.

pkgs/applications/audio/chuck/default.nix+4−4

This diff is too big to show here.

pkgs/applications/audio/cider/default.nix+30

This diff is too big to show here.

pkgs/applications/audio/clementine/default.nix+75−21

This diff is too big to show here.

pkgs/applications/audio/clerk/default.nix+38−12

This diff is too big to show here.

pkgs/applications/audio/cmt/default.nix+4−4

This diff is too big to show here.

pkgs/applications/audio/cmus/default.nix+13−13

This diff is too big to show here.

pkgs/applications/audio/cmusfm/default.nix+19−13

This diff is too big to show here.

pkgs/applications/audio/cozy-audiobooks/default.nix−87

This diff is too big to show here.

pkgs/applications/audio/cozy/default.nix+92

This diff is too big to show here.

pkgs/applications/audio/crip/default.nix+7−6

This diff is too big to show here.

pkgs/applications/audio/csa/default.nix+3−3

This diff is too big to show here.

pkgs/applications/audio/csound/csound-manual/default.nix+4−4

This diff is too big to show here.

pkgs/applications/audio/csound/csound-qt/default.nix+4−2

This diff is too big to show here.

pkgs/applications/audio/csound/default.nix+9−14

This diff is too big to show here.

pkgs/applications/audio/curseradio/default.nix+2−2

This diff is too big to show here.

pkgs/applications/audio/cyanrip/default.nix+34

This diff is too big to show here.

pkgs/applications/audio/deadbeef/default.nix+12−13

This diff is too big to show here.

pkgs/applications/audio/deadbeef/plugins/headerbar-gtk3.nix+3−3

This diff is too big to show here.

pkgs/applications/audio/deadbeef/plugins/infobar.nix+3−3

This diff is too big to show here.

pkgs/applications/audio/deadbeef/plugins/lyricbar.nix+3−3

This diff is too big to show here.

pkgs/applications/audio/deadbeef/plugins/mpris2.nix+3−3

This diff is too big to show here.

pkgs/applications/audio/deadbeef/plugins/statusnotifier.nix+39

This diff is too big to show here.

pkgs/applications/audio/deadbeef/wrapper.nix+1−1

This diff is too big to show here.

pkgs/applications/audio/denemo/default.nix+5−5

This diff is too big to show here.

pkgs/applications/audio/dfasma/default.nix+5−7

This diff is too big to show here.

pkgs/applications/audio/diopser/default.nix+76

This diff is too big to show here.

pkgs/applications/audio/dirt/default.nix+4−3

This diff is too big to show here.

pkgs/applications/audio/distrho/default.nix+78−38

This diff is too big to show here.

pkgs/applications/audio/dr14_tmeter/default.nix+3−3

This diff is too big to show here.

pkgs/applications/audio/dragonfly-reverb/default.nix+9−7

This diff is too big to show here.

pkgs/applications/audio/drumgizmo/default.nix+10−18

This diff is too big to show here.

pkgs/applications/audio/drumkv1/default.nix+5−5

This diff is too big to show here.

pkgs/applications/audio/dsf2flac/default.nix+34

This diff is too big to show here.

pkgs/applications/audio/easyeffects/default.nix+113

This diff is too big to show here.

pkgs/applications/audio/easytag/default.nix+7−7

This diff is too big to show here.

pkgs/applications/audio/ebumeter/default.nix+33

This diff is too big to show here.

pkgs/applications/audio/ecasound/default.nix+50−5

This diff is too big to show here.

pkgs/applications/audio/eflite/default.nix+6−6

This diff is too big to show here.

pkgs/applications/audio/ekho/default.nix+4−4

This diff is too big to show here.

pkgs/applications/audio/ensemble-chorus/default.nix+4−4

This diff is too big to show here.

pkgs/applications/audio/eq10q/default.nix+6−6

This diff is too big to show here.

pkgs/applications/audio/espeak-ng/default.nix+34−9

This diff is too big to show here.

pkgs/applications/audio/espeak-ng/mbrola.patch+22

This diff is too big to show here.

pkgs/applications/audio/espeak/default.nix+7−5

This diff is too big to show here.

pkgs/applications/audio/espeak/edit.nix+8−7

This diff is too big to show here.

pkgs/applications/audio/eteroj.lv2/default.nix−23

This diff is too big to show here.

pkgs/applications/audio/exaile/default.nix+107

This diff is too big to show here.

pkgs/applications/audio/faust/faust1.nix+8−9

This diff is too big to show here.

pkgs/applications/audio/faust/faust2.nix+21−14

This diff is too big to show here.

pkgs/applications/audio/faust/faust2alqt.nix+2−2

This diff is too big to show here.

pkgs/applications/audio/faust/faust2alsa.nix+2−2

This diff is too big to show here.

pkgs/applications/audio/faust/faust2firefox.nix+2−2

This diff is too big to show here.

pkgs/applications/audio/faust/faust2jack.nix+4−4

This diff is too big to show here.

pkgs/applications/audio/faust/faust2jackrust.nix+3−4

This diff is too big to show here.

pkgs/applications/audio/faust/faust2jaqt.nix+4−4

This diff is too big to show here.

pkgs/applications/audio/faust/faustlive.nix+16−16

This diff is too big to show here.

pkgs/applications/audio/faustPhysicalModeling/default.nix+39

This diff is too big to show here.

pkgs/applications/audio/faustStk/default.nix+39

This diff is too big to show here.

pkgs/applications/audio/fdkaac/default.nix+5−5

This diff is too big to show here.

pkgs/applications/audio/flac/default.nix+6−5

This diff is too big to show here.

pkgs/applications/audio/flac123/default.nix+2−2

This diff is too big to show here.

pkgs/applications/audio/flacon/default.nix+5−5

This diff is too big to show here.

pkgs/applications/audio/fluidsynth/default.nix+10−26

This diff is too big to show here.

pkgs/applications/audio/fmit/default.nix+5−7

This diff is too big to show here.

pkgs/applications/audio/fmsynth/default.nix+5−5

This diff is too big to show here.

pkgs/applications/audio/fomp/default.nix+8−8

This diff is too big to show here.

pkgs/applications/audio/foo-yc20/default.nix−29

This diff is too big to show here.

pkgs/applications/audio/freac/default.nix+38

This diff is too big to show here.

pkgs/applications/audio/freewheeling/default.nix+8−8

This diff is too big to show here.

pkgs/applications/audio/freqtweak/default.nix+3−3

This diff is too big to show here.

pkgs/applications/audio/friture/default.nix+21−8

This diff is too big to show here.

pkgs/applications/audio/friture/factorial.patch−13

This diff is too big to show here.

pkgs/applications/audio/friture/unlock_constraints.patch−34

This diff is too big to show here.

pkgs/applications/audio/ft2-clone/default.nix+32−8

This diff is too big to show here.

pkgs/applications/audio/furnace/default.nix+100

This diff is too big to show here.

pkgs/applications/audio/fverb/default.nix+2−2

This diff is too big to show here.

pkgs/applications/audio/game-music-emu/default.nix+8−8

This diff is too big to show here.

pkgs/applications/audio/gbsplay/default.nix+18−14

This diff is too big to show here.

pkgs/applications/audio/geonkick/default.nix+5−6

This diff is too big to show here.

pkgs/applications/audio/giada/default.nix+41−27

This diff is too big to show here.

pkgs/applications/audio/gigedit/default.nix+22−5

This diff is too big to show here.

pkgs/applications/audio/gjay/default.nix+26−9

This diff is too big to show here.

pkgs/applications/audio/gmpc/default.nix+34−8

This diff is too big to show here.

pkgs/applications/audio/gmu/default.nix+23−4

This diff is too big to show here.

pkgs/applications/audio/gnaural/default.nix+33

This diff is too big to show here.

pkgs/applications/audio/gnome-podcasts/default.nix+34−20

This diff is too big to show here.

pkgs/applications/audio/goattracker/default.nix+17−13

This diff is too big to show here.

pkgs/applications/audio/google-musicmanager/default.nix−77

This diff is too big to show here.

pkgs/applications/audio/google-play-music-desktop-player/default.nix+7−7

This diff is too big to show here.

pkgs/applications/audio/gpodder/default.nix+20−10

This diff is too big to show here.

pkgs/applications/audio/gpodder/disable-autoupdate.patch+8−29

This diff is too big to show here.

pkgs/applications/audio/gradio/default.nix+3−4

This diff is too big to show here.

pkgs/applications/audio/grandorgue/default.nix+5−5

This diff is too big to show here.

pkgs/applications/audio/greg/default.nix+6−7

This diff is too big to show here.

pkgs/applications/audio/gspeech/default.nix+2−2

This diff is too big to show here.

pkgs/applications/audio/gtklick/default.nix−34

This diff is too big to show here.

pkgs/applications/audio/gtkpod/default.nix+8−7

This diff is too big to show here.

pkgs/applications/audio/guitarix/default.nix+23−13

This diff is too big to show here.

pkgs/applications/audio/gwc/default.nix+6−6

This diff is too big to show here.

pkgs/applications/audio/gxmatcheq-lv2/default.nix+3−3

This diff is too big to show here.

pkgs/applications/audio/gxplugins-lv2/default.nix+6−6

This diff is too big to show here.

pkgs/applications/audio/helio-workstation/default.nix+13−13

This diff is too big to show here.

pkgs/applications/audio/helm/default.nix+10−15

This diff is too big to show here.

pkgs/applications/audio/helvum/default.nix+60

This diff is too big to show here.

pkgs/applications/audio/hivelytracker/default.nix+89

This diff is too big to show here.

pkgs/applications/audio/hqplayer-desktop/default.nix+92

This diff is too big to show here.

pkgs/applications/audio/hushboard/default.nix+73

This diff is too big to show here.

pkgs/applications/audio/hybridreverb2/default.nix+47−12

This diff is too big to show here.

pkgs/applications/audio/hydrogen/0.nix+30−8

This diff is too big to show here.

pkgs/applications/audio/hydrogen/default.nix+8−8

This diff is too big to show here.

pkgs/applications/audio/i-score/default.nix−85

This diff is too big to show here.

pkgs/applications/audio/iannix/default.nix+13−14

This diff is too big to show here.

pkgs/applications/audio/id3v2/default.nix+2−2

This diff is too big to show here.

pkgs/applications/audio/in-formant/default.nix+45

This diff is too big to show here.

pkgs/applications/audio/indicator-sound-switcher/default.nix+62

This diff is too big to show here.

pkgs/applications/audio/industrializer/default.nix+7−9

This diff is too big to show here.

pkgs/applications/audio/infamousPlugins/default.nix+3−3

This diff is too big to show here.

pkgs/applications/audio/ingen/default.nix+12−15

This diff is too big to show here.

pkgs/applications/audio/ir.lv2/default.nix+3−3

This diff is too big to show here.

pkgs/applications/audio/jaaa/default.nix+3−3

This diff is too big to show here.

pkgs/applications/audio/jack-capture/default.nix+4−4

This diff is too big to show here.

pkgs/applications/audio/jack-oscrolloscope/default.nix+4−4

This diff is too big to show here.

pkgs/applications/audio/jack-rack/default.nix+9−8

This diff is too big to show here.

pkgs/applications/audio/jackmeter/default.nix+9−8

This diff is too big to show here.

pkgs/applications/audio/jackmix/default.nix+3−3

This diff is too big to show here.

pkgs/applications/audio/jacktrip/default.nix+61

This diff is too big to show here.

pkgs/applications/audio/jalv/default.nix+6−6

This diff is too big to show here.

pkgs/applications/audio/jamesdsp/default.nix+95

This diff is too big to show here.

pkgs/applications/audio/jamin/default.nix+6−6

This diff is too big to show here.

pkgs/applications/audio/jamulus/default.nix+8−8

This diff is too big to show here.

pkgs/applications/audio/japa/default.nix+7−7

This diff is too big to show here.

pkgs/applications/audio/jconvolver/default.nix+114

This diff is too big to show here.

pkgs/applications/audio/jellycli/default.nix+33

This diff is too big to show here.

pkgs/applications/audio/jellycli/fix-test-dir.patch+13

This diff is too big to show here.

pkgs/applications/audio/jmusicbot/default.nix+31

This diff is too big to show here.

pkgs/applications/audio/kapitonov-plugins-pack/default.nix+4−4

This diff is too big to show here.

pkgs/applications/audio/keyfinder-cli/default.nix+6−6

This diff is too big to show here.

pkgs/applications/audio/keyfinder/default.nix+7−8

This diff is too big to show here.

pkgs/applications/audio/kid3/default.nix+56−17

This diff is too big to show here.

pkgs/applications/audio/klick/default.nix+4−4

This diff is too big to show here.

pkgs/applications/audio/klystrack/default.nix+4−4

This diff is too big to show here.

pkgs/applications/audio/kmetronome/default.nix+8−6

This diff is too big to show here.

pkgs/applications/audio/ladspa-plugins/default.nix+19−9

This diff is too big to show here.

pkgs/applications/audio/ladspa-sdk/default.nix+4−4

This diff is too big to show here.

pkgs/applications/audio/ladspa-sdk/ladspah.nix+4−4

This diff is too big to show here.

pkgs/applications/audio/lash/default.nix+5−5

This diff is too big to show here.

pkgs/applications/audio/lastfmsubmitd/default.nix−21

This diff is too big to show here.

pkgs/applications/audio/librespot/cargo-lock.patch−137

This diff is too big to show here.

pkgs/applications/audio/librespot/default.nix+16−23

This diff is too big to show here.

pkgs/applications/audio/lingot/default.nix+8−8

This diff is too big to show here.

pkgs/applications/audio/linuxband/default.nix−37

This diff is too big to show here.

pkgs/applications/audio/linuxsampler/default.nix+7−7

This diff is too big to show here.

pkgs/applications/audio/littlegptracker/0002-Set-the-initial-directory-to-the-current-directory.patch−27

This diff is too big to show here.

pkgs/applications/audio/littlegptracker/default.nix+16−14

This diff is too big to show here.

pkgs/applications/audio/lmms/default.nix+7−8

This diff is too big to show here.

pkgs/applications/audio/lollypop/default.nix+5−5

This diff is too big to show here.

pkgs/applications/audio/losslessaudiochecker/default.nix+29

This diff is too big to show here.

pkgs/applications/audio/lsp-plugins/default.nix+16−9

This diff is too big to show here.

pkgs/applications/audio/ltc-tools/default.nix+3−3

This diff is too big to show here.

pkgs/applications/audio/luppp/default.nix+4−4

This diff is too big to show here.

pkgs/applications/audio/lv2-cpp-tools/default.nix+3−3

This diff is too big to show here.

pkgs/applications/audio/lv2bm/default.nix+3−3

This diff is too big to show here.

pkgs/applications/audio/lv2lint/default.nix+22

This diff is too big to show here.

pkgs/applications/audio/lyrebird/default.nix+2−2

This diff is too big to show here.

pkgs/applications/audio/m4acut/default.nix+24

This diff is too big to show here.

pkgs/applications/audio/magnetophonDSP/CharacterCompressor/default.nix+3−3

This diff is too big to show here.

pkgs/applications/audio/magnetophonDSP/CompBus/default.nix+3−3

This diff is too big to show here.

pkgs/applications/audio/magnetophonDSP/ConstantDetuneChorus/default.nix+3−3

This diff is too big to show here.

pkgs/applications/audio/magnetophonDSP/LazyLimiter/default.nix+3−3

This diff is too big to show here.

pkgs/applications/audio/magnetophonDSP/MBdistortion/default.nix+10−3

This diff is too big to show here.

pkgs/applications/audio/magnetophonDSP/RhythmDelay/default.nix+3−3

This diff is too big to show here.

pkgs/applications/audio/magnetophonDSP/VoiceOfFaust/default.nix+3−3

This diff is too big to show here.

pkgs/applications/audio/magnetophonDSP/faustCompressors/default.nix+4−4

This diff is too big to show here.

pkgs/applications/audio/magnetophonDSP/pluginUtils/default.nix+3−3

This diff is too big to show here.

pkgs/applications/audio/magnetophonDSP/shelfMultiBand/default.nix+3−3

This diff is too big to show here.

pkgs/applications/audio/mamba/default.nix+8−7

This diff is too big to show here.

pkgs/applications/audio/mbrola/default.nix+42

This diff is too big to show here.

pkgs/applications/audio/mda-lv2/default.nix+5−5

This diff is too big to show here.

pkgs/applications/audio/mellowplayer/default.nix+4−4

This diff is too big to show here.

pkgs/applications/audio/melmatcheq.lv2/default.nix+28

This diff is too big to show here.

pkgs/applications/audio/meterbridge/default.nix+3−3

This diff is too big to show here.

pkgs/applications/audio/meters_lv2/default.nix+43−36

This diff is too big to show here.

pkgs/applications/audio/mhwaveedit/default.nix+5−5

This diff is too big to show here.

pkgs/applications/audio/mi2ly/default.nix+17−26

This diff is too big to show here.

pkgs/applications/audio/mi2ly/default.upstream−3

This diff is too big to show here.

pkgs/applications/audio/mid2key/default.nix+9−6

This diff is too big to show here.

pkgs/applications/audio/midas/generic.nix+7−8

This diff is too big to show here.

pkgs/applications/audio/midi-visualizer/default.nix+4−4

This diff is too big to show here.

pkgs/applications/audio/midisheetmusic/default.nix+5−5

This diff is too big to show here.

pkgs/applications/audio/mikmod/default.nix+7−6

This diff is too big to show here.

pkgs/applications/audio/milkytracker/default.nix+21−9

This diff is too big to show here.

pkgs/applications/audio/mimic/default.nix+20−12

This diff is too big to show here.

pkgs/applications/audio/mimms/default.nix−31

This diff is too big to show here.

pkgs/applications/audio/miniaudicle/default.nix+59

This diff is too big to show here.

pkgs/applications/audio/mixxx/default.nix+119−35

This diff is too big to show here.

pkgs/applications/audio/mmtc/default.nix+32

This diff is too big to show here.

pkgs/applications/audio/moc/default.nix+14−14

This diff is too big to show here.

pkgs/applications/audio/mod-arpeggiator-lv2/default.nix+26

This diff is too big to show here.

pkgs/applications/audio/mod-distortion/default.nix+4−4

This diff is too big to show here.

pkgs/applications/audio/molot-lite/default.nix+16−19

This diff is too big to show here.

pkgs/applications/audio/monkeys-audio/default.nix+2−2

This diff is too big to show here.

pkgs/applications/audio/mooSpace/default.nix+3−3

This diff is too big to show here.

pkgs/applications/audio/mopidy/default.nix+25−23

This diff is too big to show here.

pkgs/applications/audio/mopidy/gmusic.nix−29

This diff is too big to show here.

pkgs/applications/audio/mopidy/iris.nix+4−4

This diff is too big to show here.

pkgs/applications/audio/mopidy/jellyfin.nix+25

This diff is too big to show here.

pkgs/applications/audio/mopidy/local.nix+2−2

This diff is too big to show here.

pkgs/applications/audio/mopidy/moped.nix+2−2

This diff is too big to show here.

pkgs/applications/audio/mopidy/mopidy.nix+7−11

This diff is too big to show here.

pkgs/applications/audio/mopidy/mopify.nix+2−2

This diff is too big to show here.

pkgs/applications/audio/mopidy/mpd.nix+4−4

This diff is too big to show here.

pkgs/applications/audio/mopidy/mpris.nix+4−4

This diff is too big to show here.

pkgs/applications/audio/mopidy/muse.nix+29

This diff is too big to show here.

pkgs/applications/audio/mopidy/musicbox-webclient.nix+5−4

This diff is too big to show here.

pkgs/applications/audio/mopidy/podcast.nix+31

This diff is too big to show here.

pkgs/applications/audio/mopidy/scrobbler.nix+24

This diff is too big to show here.

pkgs/applications/audio/mopidy/somafm.nix+3−3

This diff is too big to show here.

pkgs/applications/audio/mopidy/soundcloud.nix+4−4

This diff is too big to show here.

pkgs/applications/audio/mopidy/spotify-tunigo.nix+2−2

This diff is too big to show here.

pkgs/applications/audio/mopidy/spotify.nix+10−8

This diff is too big to show here.

pkgs/applications/audio/mopidy/subidy.nix+24

This diff is too big to show here.

pkgs/applications/audio/mopidy/tunein.nix+4−7

This diff is too big to show here.

pkgs/applications/audio/mopidy/youtube.nix+44−16

This diff is too big to show here.

pkgs/applications/audio/mopidy/ytmusic.nix+35

This diff is too big to show here.

pkgs/applications/audio/mousai/default.nix+79

This diff is too big to show here.

pkgs/applications/audio/mousai/paths.patch+13

This diff is too big to show here.

pkgs/applications/audio/mp3blaster/default.nix+14−4

This diff is too big to show here.

pkgs/applications/audio/mp3gain/default.nix+19−9

This diff is too big to show here.

pkgs/applications/audio/mp3info/default.nix+7−6

This diff is too big to show here.

pkgs/applications/audio/mp3splt/default.nix+3−3

This diff is too big to show here.

pkgs/applications/audio/mp3val/default.nix+4−4

This diff is too big to show here.

pkgs/applications/audio/mpc/default.nix+50−13

This diff is too big to show here.

pkgs/applications/audio/mpc123/default.nix+3−3

This diff is too big to show here.

pkgs/applications/audio/mpdevil/default.nix+53

This diff is too big to show here.

pkgs/applications/audio/mpg123/default.nix+44−20

This diff is too big to show here.

pkgs/applications/audio/mpg321/default.nix+4−5

This diff is too big to show here.

pkgs/applications/audio/munt/default.nix−38

This diff is too big to show here.

pkgs/applications/audio/munt/libmt32emu.nix+38

This diff is too big to show here.

pkgs/applications/audio/munt/mt32emu-qt.nix+75

This diff is too big to show here.

pkgs/applications/audio/munt/mt32emu-smf2wav.nix+50

This diff is too big to show here.

pkgs/applications/audio/mup/default.nix+2−2

This diff is too big to show here.

pkgs/applications/audio/muse/default.nix+6−6

This diff is too big to show here.

pkgs/applications/audio/musescore/darwin.nix+2−3

This diff is too big to show here.

pkgs/applications/audio/musescore/default.nix+17−12

This diff is too big to show here.

pkgs/applications/audio/musikcube/default.nix+24−9

This diff is too big to show here.

pkgs/applications/audio/musly/default.nix+3−3

This diff is too big to show here.

pkgs/applications/audio/muso/default.nix+37

This diff is too big to show here.

pkgs/applications/audio/mympd/default.nix+52

This diff is too big to show here.

pkgs/applications/audio/myxer/default.nix+38

This diff is too big to show here.

pkgs/applications/audio/ncmpc/default.nix+18−10

This diff is too big to show here.

pkgs/applications/audio/ncmpcpp/default.nix+20−9

This diff is too big to show here.

pkgs/applications/audio/ncpamixer/default.nix+6−10

This diff is too big to show here.

pkgs/applications/audio/ncspot/default.nix+17−18

This diff is too big to show here.

pkgs/applications/audio/netease-cloud-music-gtk/cargo-lock.patch+2007

This diff is too big to show here.

pkgs/applications/audio/netease-cloud-music-gtk/default.nix+60

This diff is too big to show here.

pkgs/applications/audio/netease-cloud-music-gtk/update-cargo-lock.sh+20

This diff is too big to show here.

pkgs/applications/audio/netease-music-tui/cargo-lock.patch+2655

This diff is too big to show here.

pkgs/applications/audio/netease-music-tui/default.nix+27

This diff is too big to show here.

pkgs/applications/audio/netease-music-tui/update-cargo-lock.sh+20

This diff is too big to show here.

pkgs/applications/audio/new-session-manager/default.nix+27

This diff is too big to show here.

pkgs/applications/audio/ninjas2/default.nix+3−3

This diff is too big to show here.

pkgs/applications/audio/noise-repellent/default.nix+12−10

This diff is too big to show here.

pkgs/applications/audio/noisetorch/default.nix+12−14

This diff is too big to show here.

pkgs/applications/audio/noisetorch/embedlibrnnoise.patch−13

This diff is too big to show here.

pkgs/applications/audio/noisetorch/version.patch−37

This diff is too big to show here.

pkgs/applications/audio/non/default.nix+11−11

This diff is too big to show here.

pkgs/applications/audio/nootka/default.nix+9−6

This diff is too big to show here.

pkgs/applications/audio/nootka/unstable.nix+28−8

This diff is too big to show here.

pkgs/applications/audio/normalize/default.nix+2−2

This diff is too big to show here.

pkgs/applications/audio/nova-filters/default.nix+3−3

This diff is too big to show here.

pkgs/applications/audio/nuclear/default.nix+1−1

This diff is too big to show here.

pkgs/applications/audio/ocenaudio/default.nix+7−7

This diff is too big to show here.

pkgs/applications/audio/odin2/default.nix+79

This diff is too big to show here.

pkgs/applications/audio/open-music-kontrollers/eteroj.nix+10

This diff is too big to show here.

pkgs/applications/audio/open-music-kontrollers/generic.nix+37

This diff is too big to show here.

pkgs/applications/audio/open-music-kontrollers/jit.nix+12

This diff is too big to show here.

pkgs/applications/audio/open-music-kontrollers/mephisto.nix+17

This diff is too big to show here.

pkgs/applications/audio/open-music-kontrollers/midi_matrix.nix+10

This diff is too big to show here.

pkgs/applications/audio/open-music-kontrollers/moony.nix+13

This diff is too big to show here.

pkgs/applications/audio/open-music-kontrollers/orbit.nix+12

This diff is too big to show here.

pkgs/applications/audio/open-music-kontrollers/patchmatrix.nix+13

This diff is too big to show here.

pkgs/applications/audio/open-music-kontrollers/router.nix+11

This diff is too big to show here.

pkgs/applications/audio/open-music-kontrollers/sherlock.nix+12

This diff is too big to show here.

pkgs/applications/audio/open-music-kontrollers/synthpod.nix+13

This diff is too big to show here.

pkgs/applications/audio/open-music-kontrollers/vm.nix+10

This diff is too big to show here.

pkgs/applications/audio/openmpt123/default.nix−31

This diff is too big to show here.

pkgs/applications/audio/opus-tools/default.nix+9−7

This diff is too big to show here.

pkgs/applications/audio/opusfile/default.nix+12−8

This diff is too big to show here.