···16161717## New modules {#reviewing-contributions-new-modules}
18181919-This section has been moved to [nixos/README.md](https://github.com/NixOS/nixpkgs/blob/master/nixos/README.md).
1919+This section has been moved to [nixos/README.md](https://github.com/NixOS/nixpkgs/blob/master/nixos/README.md#new-modules).
20202121## Individual maintainer list {#reviewing-contributions-individual-maintainer-list}
2222
···11+22+# Writing and Reviewing Modular Services
33+44+## Status
55+66+Modular Services are, as of writing, a new feature with support in NixOS.
77+It is in development, and be considerate of the fact that the intermediate outcome of RFC 163 is that we should try a module-based approach to portable services; it is not yet a widely agreed upon solution.
88+99+## Relation to NixOS Modules
1010+1111+- A modular service is not a replacement for a NixOS module, but may be in the future.
1212+- Using a modular service to implement a NixOS module is an expected use case, but exposes the NixOS module to a degree of uncertainty that is not acceptable for widely used modules yet.
1313+1414+## Maintainership
1515+1616+If you contribute a modular service, you must mark yourself as maintainer of the modular service.
1717+The maintainership of a modular service does not need to be the same as the maintainership of a NixOS module.
1818+If you are not a maintainer of the NixOS module, you should offer to join the NixOS module's `meta.maintainers` team, so that you are included in reviews and discussions, most of which also affect the modular service.
1919+The NixOS module maintainers have no obligation towards the modular service, except perhaps to notify you if they notice that the modular service breaks.
2020+2121+## Minimum Standard
2222+2323+Modular services **MUST** be accompanied by a **NixOS VM test** that exercises the modular service.
2424+2525+Modular services **MUST** have a `meta.maintainers` module attribute that lists the maintainers of the modular service.
2626+2727+## Reviewing Modular Services
2828+2929+When reviewing a modular service, you should check the following. Details and rationale are provided below.
3030+3131+```markdown
3232+- [ ] Has a NixOS VM test
3333+- [ ] Has a `meta.maintainers` attribute
3434+- [ ] Systemd-specific definitions are behind `optionalAttrs (options ? systemd)` to promote portability.
3535+- [ ] `_class = "service"`
3636+- [ ] Modular services provided through `passthru.services` must override the default of the package option using `finalAttrs.finalPackage`
3737+- [ ] Is the modular services infrastructure sufficient for this service? If one or more features are not covered, comment in https://github.com/NixOS/nixpkgs/issues/428084
3838+```
3939+4040+## Details
4141+4242+### NixOS VM test
4343+4444+See the initial [Modular Services PR](https://github.com/NixOS/nixpkgs/pull/372170) for an [example](https://github.com/NixOS/nixpkgs/pull/372170/files#diff-e7fe16489cf3cd08ecc22b2c7896039d407a329b75691c046c95447423b3153f) of a NixOS VM test.
4545+TBD: describe best practices here.
4646+4747+### `_class = "service"`
4848+4949+A [`_class`](https://nixos.org/manual/nixpkgs/unstable/#module-system-lib-evalModules-param-class) declaration ensures a clear error when the module is accidentally imported into a configuration that isn't a modular service, such as a NixOS configuration.
5050+5151+Provide it as the first attribute in the module:
5252+5353+```nix
5454+{ lib, config, ... }:
5555+{
5656+ _class = "service";
5757+5858+ options = {
5959+ # ...
6060+ };
6161+ config = {
6262+ # ...
6363+ };
6464+}
6565+```
6666+6767+### Overriding the package default
6868+6969+When a modular service is provided through `passthru.services`, it must override the default of the package option using [`finalAttrs.finalPackage`](https://nixos.org/manual/nixpkgs/unstable/#mkderivation-recursive-attributes).
7070+If this is not possible, or if the module is not represented by a single package, consider exposing the modular service directly by file path only.
7171+7272+Otherwise, since some packages are *defined* by an override, the modular service would launch a wrong package, if it builds at all.
7373+7474+Example:
7575+7676+`package.nix`
7777+```nix
7878+{
7979+ stdenv,
8080+ nixosTests,
8181+# ...
8282+}:
8383+stdenv.mkDerivation (finalAttrs: {
8484+ pname = "example";
8585+ # ...
8686+8787+ passthru = {
8888+ services = {
8989+ default = {
9090+ imports = [ ./service.nix ];
9191+ example.package = finalAttrs.finalPackage;
9292+ # ...
9393+ };
9494+ };
9595+ };
9696+})
9797+```
+2
nixos/README.md
···116116117117##### Comments
118118```
119119+120120+See also [./README-modular-services.md](./README-modular-services.md).
+4
nixos/doc/manual/development/modular-services.md
···83838484<!-- TODO example of a single-instance service -->
85858686+## Writing and Reviewing a Modular Service {#modular-service-review}
8787+8888+Refer to the contributor documentation in [`nixos/README-modular-services.md`](https://github.com/NixOS/nixpkgs/blob/master/nixos/README-modular-services.md).
8989+8690## Portable Service Options {#modular-service-options-portable}
87918892```{=include=} options
···4444 '';
4545 };
4646 };
4747+ # TODO: use https://github.com/NixOS/nixpkgs/pull/431450
4848+ meta = lib.mkOption {
4949+ description = "The maintainers of this module. This is currently a placeholder option whose value may not evaluate to anything useful until https://github.com/NixOS/nixpkgs/pull/431450 is available and used here.";
5050+ };
4751 };
4852}
···18181919buildNpmPackage rec {
2020 pname = "igir";
2121- version = "4.1.2";
2121+ version = "4.2.0";
22222323 src = fetchFromGitHub {
2424 owner = "emmercm";
2525 repo = "igir";
2626 rev = "v${version}";
2727- hash = "sha256-L9bY3ep0HqRimYTqfW1yqbnnas4gjsD2emtJnWxGQaQ=";
2727+ hash = "sha256-t0iGQC3U95707n4iVLbWynh3CadOPFKBEoXPg4rNjVo=";
2828 };
29293030- npmDepsHash = "sha256-56pTJ1VZcoqDb56qzvfxEZUubu82n55O5R0JFRNy5HE=";
3030+ npmDepsHash = "sha256-qFgyqh3e2A6D+MaEUoV1jGRp1wJKvB8Dcr5XPrezlSk=";
31313232 # I have no clue why I have to do this
3333 postPatch = ''
+40-9
pkgs/by-name/md/mdsf/package.nix
···77}:
88let
99 pname = "mdsf";
1010- version = "0.5.1";
1010+ version = "0.10.4";
1111in
1212rustPlatform.buildRustPackage {
1313 inherit pname version;
···1616 owner = "hougesen";
1717 repo = "mdsf";
1818 tag = "v${version}";
1919- hash = "sha256-KHTWE3ENRc/VHrgwAag6DsnEU3c8Nqw15jR5jWlNrk4=";
1919+ hash = "sha256-NH3DE6ef1HuS5ADVFros+iDQMZVVgG8V9OuFzzkig8g=";
2020 };
21212222- cargoHash = "sha256-kgqRwYjDc/eV9wv1G6aAhfrGpoYDPCFfqaTm+T2p7uw=";
2222+ cargoHash = "sha256-dGqFRXezzqOpHA74fnLUGQAI8KgbPmWIL46UP0wza40=";
23232424 checkFlags = [
2525- "--skip=tests::it_should_add_go_package_if_missing"
2626- "--skip=tests::it_should_format_the_code"
2727- "--skip=tests::it_should_format_the_codeblocks_that_start_with_whitespace"
2828- "--skip=tests::it_should_not_care_if_go_package_is_set"
2929- "--skip=tests::it_should_not_modify_outside_blocks"
2525+ # Failing due to the method under test trying to create a directory & write to the filesystem
2626+ "--skip=caching::test_cache_entry::it_should_work"
2727+ # Permissions denied due to the test trying to remove a directory
2828+ "--skip=commands::prune_cache::test_run::it_should_remove_cache_directory"
2929+ # Permissions denied due to the test trying to write to a file
3030+ "--skip=config::test_config::it_should_error_on_broken_config"
3131+ # The following tests try to create tmp files
3232+ "--skip=format::accepts_multiple_file_paths"
3333+ "--skip=format::accepts_multiple_file_paths_with_thread_argument"
3434+ "--skip=format::accepts_multiple_file_paths_with_thread_argument_zero"
3535+ "--skip=format::format_with_cache_arg"
3636+ "--skip=format::formats_broken_input"
3737+ "--skip=format::formats_broken_input_stdin"
3838+ "--skip=format::formats_broken_input_with_debug_arg"
3939+ "--skip=format::on_missing_tool_binary_fail_cli"
4040+ "--skip=format::on_missing_tool_binary_fail_config"
4141+ "--skip=format::on_missing_tool_binary_fail_fast_cli"
4242+ "--skip=format::on_missing_tool_binary_fail_fast_config"
4343+ "--skip=format::on_missing_tool_binary_ignore_cli"
4444+ "--skip=format::on_missing_tool_binary_ignore_config"
4545+ "--skip=format::on_missing_tool_binary_prioritize_cli"
4646+ "--skip=format::supports_config_path_argument"
4747+ # Depends on one of gofumpt, gofmt, or crlfmt being available
4848+ "--skip=test_lib::it_should_add_go_package_if_missing"
4949+ # The following tests depend on rustfmt being available
5050+ "--skip=test_lib::it_should_format_the_code"
5151+ "--skip=test_lib::it_should_format_the_codeblocks_that_start_with_whitespace"
5252+ "--skip=test_lib::it_should_not_care_if_go_package_is_set"
5353+ "--skip=test_lib::it_should_not_modify_outside_blocks"
5454+ # The following tests try to interact with the file system
5555+ "--skip=verify::accepts_multiple_file_paths_broken"
5656+ "--skip=verify::accepts_multiple_file_paths_mixed"
5757+ "--skip=verify::fails_with_broken_input"
5858+ # The following tests try to interact with stdin
5959+ "--skip=verify::success_with_formatted_input_stdin"
6060+ "--skip=verify::supports_log_level_argument"
3061 ];
31623263 nativeInstallCheckInputs = [ versionCheckHook ];
···3465 passthru.updateScript = nix-update-script { };
35663667 meta = {
3737- description = "Tool for formatting a linting markdown code snippets using language specific tools";
6868+ description = "Format markdown code blocks using your favorite tools";
3869 homepage = "https://github.com/hougesen/mdsf";
3970 changelog = "https://github.com/hougesen/mdsf/releases";
4071 license = lib.licenses.mit;
···1313 gsl,
1414 man,
1515 pkg-config,
1616+ writableTmpDirAsHomeHook,
16171718 unstableGitUpdater,
1819 writeScript,
···183184 nativeInstallCheckInputs = [
184185 man
185186 pkg-config
187187+ writableTmpDirAsHomeHook
186188 ];
187189188190 installCheckInputs = [
···190192 ];
191193192194 /*
193193- XXX: The upstream assumes that `$HOME` is `/home/$USER`, and the source files
194194- lie in `$HOME/cl` . The script presented here uses a fake `$USER` and a
195195- symbolic linked `$HOME/cl` , which make the test suite work but do not meet
196196- the conditions completely.
195195+ The test suite assumes that "there are two subdirectories of the home directory referred to: cl and test",
196196+ where `cl` is "the s7 source directory" and `test` is "a safe place to write temp files".
197197 */
198198 installCheckPhase = ''
199199 runHook preInstallCheck
200200201201+ ln -sr . $HOME/cl
202202+ mkdir $HOME/test
203203+201204 $CC s7.c -c -o s7.o
202205 $CC ffitest.c s7.o -o ffitest
203206 mv ffitest $dst_bin
204204- mkdir -p nix-build/home
205205- ln -sr . nix-build/home/cl
206207207208 ${lib.optionalString withArb ''
208209 substituteInPlace s7test.scm \
···211212 cp $out/lib/libarb_s7.so .
212213 ''}
213214214214- USER=nix-s7-builder PATH="$dst_bin:$PATH" HOME=$PWD/nix-build/home \
215215+ PATH="$dst_bin:$PATH" \
215216 s7-repl s7test.scm
216217217218 rm $dst_bin/ffitest
+21
pkgs/by-name/sp/spacetimedb/fetchers.nix
···11+# not a stable interface, do not reference outside the deno package but make a
22+# copy if you need
33+{
44+ lib,
55+ stdenv,
66+ fetchurl,
77+}:
88+99+{
1010+ fetchLibrustyV8 =
1111+ args:
1212+ fetchurl {
1313+ name = "librusty_v8-${args.version}";
1414+ url = "https://github.com/denoland/rusty_v8/releases/download/v${args.version}/librusty_v8_release_${stdenv.hostPlatform.rust.rustcTarget}.a.gz";
1515+ sha256 = args.shas.${stdenv.hostPlatform.system};
1616+ meta = {
1717+ inherit (args) version;
1818+ sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
1919+ };
2020+ };
2121+}
···11+{
22+ lib,
33+ stdenv,
44+ curl,
55+ expat,
66+ fetchFromGitHub,
77+ gspell,
88+ gst_all_1,
99+ gtk3,
1010+ libGL,
1111+ libGLU,
1212+ libSM,
1313+ libXinerama,
1414+ libXtst,
1515+ libXxf86vm,
1616+ libnotify,
1717+ libpng,
1818+ libsecret,
1919+ libtiff,
2020+ libjpeg_turbo,
2121+ libxkbcommon,
2222+ zlib,
2323+ pcre2,
2424+ pkg-config,
2525+ xorgproto,
2626+ compat30 ? false,
2727+ compat32 ? true,
2828+ withMesa ? !stdenv.hostPlatform.isDarwin,
2929+ withWebKit ? true,
3030+ webkitgtk_4_1,
3131+}:
3232+3333+stdenv.mkDerivation (finalAttrs: {
3434+ pname = "wxwidgets";
3535+ version = "3.3.1";
3636+3737+ src = fetchFromGitHub {
3838+ owner = "wxWidgets";
3939+ repo = "wxWidgets";
4040+ tag = "v${finalAttrs.version}";
4141+ fetchSubmodules = true;
4242+ hash = "sha256-eYmZrh9lvDnJ3VAS+TllT21emtKBPAOhqIULw1dTPhk=";
4343+ };
4444+4545+ nativeBuildInputs = [ pkg-config ];
4646+4747+ buildInputs = [
4848+ gst_all_1.gst-plugins-base
4949+ gst_all_1.gstreamer
5050+ libpng
5151+ libtiff
5252+ libjpeg_turbo
5353+ zlib
5454+ pcre2
5555+ ]
5656+ ++ lib.optionals stdenv.hostPlatform.isLinux [
5757+ curl
5858+ gspell # wxTextCtrl spell checking
5959+ gtk3
6060+ libSM
6161+ libXinerama
6262+ libXtst
6363+ libXxf86vm
6464+ libnotify # wxNotificationMessage backend
6565+ libsecret # wxSecretStore backend
6666+ libxkbcommon # proper key codes in key events
6767+ xorgproto
6868+ ]
6969+ ++ lib.optional withMesa libGLU
7070+ ++ lib.optional (withWebKit && stdenv.hostPlatform.isLinux) webkitgtk_4_1
7171+ ++ lib.optionals stdenv.hostPlatform.isDarwin [
7272+ expat
7373+ ];
7474+7575+ configureFlags = [
7676+ "--disable-precomp-headers"
7777+ # This is the default option, but be explicit
7878+ "--disable-monolithic"
7979+ "--enable-mediactrl"
8080+ "--with-nanosvg"
8181+ "--disable-rpath"
8282+ "--enable-repro-build"
8383+ "--enable-webrequest"
8484+ (if compat30 then "--enable-compat30" else "--disable-compat30")
8585+ (if compat32 then "--enable-compat32" else "--disable-compat32")
8686+ ]
8787+ ++ lib.optional withMesa "--with-opengl"
8888+ ++ lib.optionals stdenv.hostPlatform.isDarwin [
8989+ "--with-osx_cocoa"
9090+ "--with-libiconv"
9191+ "--with-urlsession" # for wxWebRequest
9292+ ]
9393+ ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [
9494+ "--with-libcurl" # for wxWebRequest
9595+ ]
9696+ ++ lib.optionals withWebKit [
9797+ "--enable-webview"
9898+ "--enable-webviewwebkit"
9999+ ];
100100+101101+ SEARCH_LIB = lib.optionalString (
102102+ !stdenv.hostPlatform.isDarwin
103103+ ) "${libGLU.out}/lib ${libGL.out}/lib";
104104+105105+ postInstall = "
106106+ pushd $out/include
107107+ ln -s wx-*/* .
108108+ popd
109109+ ";
110110+111111+ enableParallelBuilding = true;
112112+113113+ passthru = {
114114+ inherit compat30 compat32;
115115+ };
116116+117117+ meta = {
118118+ homepage = "https://www.wxwidgets.org/";
119119+ description = "Cross-Platform C++ GUI Library";
120120+ longDescription = ''
121121+ wxWidgets gives you a single, easy-to-use API for writing GUI applications
122122+ on multiple platforms that still utilize the native platform's controls
123123+ and utilities. Link with the appropriate library for your platform and
124124+ compiler, and your application will adopt the look and feel appropriate to
125125+ that platform. On top of great GUI functionality, wxWidgets gives you:
126126+ online help, network programming, streams, clipboard and drag and drop,
127127+ multithreading, image loading and saving in a variety of popular formats,
128128+ database support, HTML viewing and printing, and much more.
129129+ '';
130130+ license = lib.licenses.wxWindows;
131131+ maintainers = with lib.maintainers; [
132132+ tfmoraes
133133+ fliegendewurst
134134+ wegank
135135+ ];
136136+ platforms = lib.platforms.unix;
137137+ };
138138+})
+7-6
pkgs/by-name/zo/zoom-us/package.nix
···5858 # Zoom versions are released at different times per platform and often with different versions.
5959 # We write them on three lines like this (rather than using {}) so that the updater script can
6060 # find where to edit them.
6161- versions.aarch64-darwin = "6.5.9.61929";
6262- versions.x86_64-darwin = "6.5.9.61929";
6161+ versions.aarch64-darwin = "6.5.10.62715";
6262+ versions.x86_64-darwin = "6.5.10.62715";
63636464 # This is the fallback version so that evaluation can produce a meaningful result.
6565- versions.x86_64-linux = "6.5.9.3723";
6565+ versions.x86_64-linux = "6.5.10.3973";
66666767 srcs = {
6868 aarch64-darwin = fetchurl {
6969 url = "https://zoom.us/client/${versions.aarch64-darwin}/zoomusInstallerFull.pkg?archType=arm64";
7070 name = "zoomusInstallerFull.pkg";
7171- hash = "sha256-2V4Cad7/YcI5rSuUu8GI1GCEgio/rG/ZRpedNKqoGvc=";
7171+ hash = "sha256-O7h+4mfoUSoFd8c7K+C9W6L46PgJvDKj1qb+DG0leco=";
7272 };
7373 x86_64-darwin = fetchurl {
7474 url = "https://zoom.us/client/${versions.x86_64-darwin}/zoomusInstallerFull.pkg";
7575- hash = "sha256-RO+kIHvmvCj9bun2BeCzAm9XMYQOobYyVKqA5ruG0I8=";
7575+ hash = "sha256-S1pyrguOjEGW87HM+K1B/FI55WJp7Xu8cXvdpRA0sJ8=";
7676 };
7777 x86_64-linux = fetchurl {
7878 url = "https://zoom.us/client/${versions.x86_64-linux}/zoom_x86_64.pkg.tar.xz";
7979- hash = "sha256-OOa4zRRekXEWLl+BH3bPtCQzRaQAo742C9EqPTZnDR8=";
7979+ hash = "sha256-OXuhVpWAyfQYdEnjF7I6gOJeDCS1GlSonN5cdvvtJL0=";
8080 };
8181 };
8282···209209 pkgs.xorg.libXtst
210210 pkgs.xorg.libxcb
211211 pkgs.xorg.libxshmfence
212212+ pkgs.xorg.xcbutilcursor
212213 pkgs.xorg.xcbutilimage
213214 pkgs.xorg.xcbutilkeysyms
214215 pkgs.xorg.xcbutilrenderutil