···7Compared to plain Nix, it adds documentation, type checking and composition or extensibility.
89::: {.note}
10-This chapter is new and not complete yet. For a gentle introduction to the module system, in the context of NixOS, see [Writing NixOS Modules](https://nixos.org/manual/nixos/unstable/index.html#sec-writing-modules) in the NixOS manual.
000011:::
12-1314## `lib.evalModules` {#module-system-lib-evalModules}
15
···7Compared to plain Nix, it adds documentation, type checking and composition or extensibility.
89::: {.note}
10+This chapter is new and not complete yet.
11+12+See also:
13+- Introduction to the module system, in the context of NixOS, see [Writing NixOS Modules](https://nixos.org/manual/nixos/unstable/index.html#sec-writing-modules) in the NixOS manual.
14+- Generic guide to the module system on [nix.dev](https://nix.dev/tutorials/module-system/index.html).
15:::
01617## `lib.evalModules` {#module-system-lib-evalModules}
18
···5152- [networking.modemmanager](options.html#opt-networking.modemmanager) has been split out of [networking.networkmanager](options.html#opt-networking.networkmanager). NetworkManager still enables ModemManager by default, but options exist now to run NetworkManager without ModemManager.
530054- [Conduwuit](https://conduwuit.puppyirl.gay/), a federated chat server implementing the Matrix protocol, forked from Conduit. Available as [services.conduwuit](#opt-services.conduwuit.enable).
5556- [Traccar](https://www.traccar.org/), a modern GPS Tracking Platform. Available as [services.traccar](#opt-services.traccar.enable).
···305- `services.avahi.ipv6` now defaults to true.
306307- For matrix homeserver Synapse we are now following the upstream recommendation to enable jemalloc as the memory allocator by default.
00308309- `bind.cacheNetworks` now only controls access for recursive queries, where it previously controlled access for all queries.
310
···5152- [networking.modemmanager](options.html#opt-networking.modemmanager) has been split out of [networking.networkmanager](options.html#opt-networking.networkmanager). NetworkManager still enables ModemManager by default, but options exist now to run NetworkManager without ModemManager.
5354+- [ncps](https://github.com/kalbasit/ncps), a Nix binary cache proxy service implemented in Go using [go-nix](https://github.com/nix-community/go-nix). Available as [services.ncps](options.html#opt-services.ncps.enable).
55+56- [Conduwuit](https://conduwuit.puppyirl.gay/), a federated chat server implementing the Matrix protocol, forked from Conduit. Available as [services.conduwuit](#opt-services.conduwuit.enable).
5758- [Traccar](https://www.traccar.org/), a modern GPS Tracking Platform. Available as [services.traccar](#opt-services.traccar.enable).
···307- `services.avahi.ipv6` now defaults to true.
308309- For matrix homeserver Synapse we are now following the upstream recommendation to enable jemalloc as the memory allocator by default.
310+311+- `services.kmonad` now creates a determinate symlink (in `/dev/input/by-id/`) to each of KMonad virtual devices.
312313- `bind.cacheNetworks` now only controls access for recursive queries, where it previously controlled access for all queries.
314
···89 environment.HOME = "/var/lib/tsm-backup";
90 serviceConfig = {
91 # for exit status description see
92- # https://www.ibm.com/docs/en/storage-protect/8.1.24?topic=clients-client-return-codes
93 SuccessExitStatus = "4 8";
94 # The `-se` option must come after the command.
95 # The `-optfile` option suppresses a `dsm.opt`-not-found warning.
···89 environment.HOME = "/var/lib/tsm-backup";
90 serviceConfig = {
91 # for exit status description see
92+ # https://www.ibm.com/docs/en/storage-protect/8.1.25?topic=clients-client-return-codes
93 SuccessExitStatus = "4 8";
94 # The `-se` option must come after the command.
95 # The `-optfile` option suppresses a `dsm.opt`-not-found warning.
···3536stdenv.mkDerivation {
37 pname = "tdlib";
38- version = "1.8.41";
3940 src = fetchFromGitHub {
41 owner = "tdlib";
···44 # The tdlib authors do not set tags for minor versions, but
45 # external programs depending on tdlib constrain the minor
46 # version, hence we set a specific commit with a known version.
47- rev = "5b974c298d4ed551d3ad2c061ad7b8280d137c7e";
48- hash = "sha256-1TyGv2yMjX75+ccZSox/2m6SMmwEZAkShIhLfCeNmZg=";
49 };
5051 buildInputs = [
···3536stdenv.mkDerivation {
37 pname = "tdlib";
38+ version = "1.8.42";
3940 src = fetchFromGitHub {
41 owner = "tdlib";
···44 # The tdlib authors do not set tags for minor versions, but
45 # external programs depending on tdlib constrain the minor
46 # version, hence we set a specific commit with a known version.
47+ rev = "ef580cd3dd0e5223c2be503342dc29e128be866e";
48+ hash = "sha256-k1YQpQXYmEdoiyWeAcj2KRU+BcWuWbHpd4etxLspEoo=";
49 };
5051 buildInputs = [
···2324# For an explanation of optional packages
25# (features provided by them, version limits), see
26-# https://www.ibm.com/support/pages/node/660813#Version%208.1
2728# IBM Tivoli Storage Manager Client uses a system-wide
29# client system-options file `dsm.sys` and expects it
···44# point to this derivations `/dsmi_dir` directory symlink.
45# Other environment variables might be necessary,
46# depending on local configuration or usage; see:
47-# https://www.ibm.com/docs/en/storage-protect/8.1.24?topic=solaris-set-api-environment-variables
48-49-# The newest version of TSM client should be discoverable by
50-# going to the `downloadPage` (see `meta` below).
51-# Find the "Backup-archive client" table on that page.
52-# Look for "Download Documents" of the latest release.
53-# Follow the "Download Information" link.
54-# Look for the "Linux x86_64 ..." rows in the table at
55-# the bottom of the page and follow their "HTTPS" links (one
56-# link per row -- each link might point to the latest release).
57-# In the directory listings to show up,
58-# check the big `.tar` file.
59-#
60-# (as of 2023-07-01)
6162let
6364 meta = {
65 homepage = "https://www.ibm.com/products/storage-protect";
66- downloadPage = "https://www.ibm.com/support/pages/ibm-storage-protect-downloads-latest-fix-packs-and-interim-fixes";
67 platforms = [ "x86_64-linux" ];
68 mainProgram = "dsmc";
69 sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
···104105 unwrapped = stdenv.mkDerivation (finalAttrs: {
106 name = "tsm-client-${finalAttrs.version}-unwrapped";
107- version = "8.1.24.0";
108 src = fetchurl {
109 url = mkSrcUrl finalAttrs.version;
110- hash = "sha512-TqTDE2oJK/Wu/MNYUCqxmOE6asAqDLz4GtdcFZuKqvfT8pJUCYKz9yjRPIrM3u2XfLH0wDq+Q8ER4ui680mswA==";
111 };
112 inherit meta passthru;
113
···2324# For an explanation of optional packages
25# (features provided by them, version limits), see
26+# https://web.archive.org/web/20240118051918/https://www.ibm.com/support/pages/node/660813#Version%208.1
2728# IBM Tivoli Storage Manager Client uses a system-wide
29# client system-options file `dsm.sys` and expects it
···44# point to this derivations `/dsmi_dir` directory symlink.
45# Other environment variables might be necessary,
46# depending on local configuration or usage; see:
47+# https://www.ibm.com/docs/en/storage-protect/8.1.25?topic=solaris-set-api-environment-variables
00000000000004849let
5051 meta = {
52 homepage = "https://www.ibm.com/products/storage-protect";
53+ downloadPage = "https://www.ibm.com/support/fixcentral/swg/selectFixes?product=ibm/StorageSoftware/IBM+Spectrum+Protect";
54 platforms = [ "x86_64-linux" ];
55 mainProgram = "dsmc";
56 sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
···9192 unwrapped = stdenv.mkDerivation (finalAttrs: {
93 name = "tsm-client-${finalAttrs.version}-unwrapped";
94+ version = "8.1.25.0";
95 src = fetchurl {
96 url = mkSrcUrl finalAttrs.version;
97+ hash = "sha512-OPNjSMnWJ/8Ogy9O0wG0H4cEbYiOwyCVzkWhpG00v/Vm0LDxLzPteMnMOyH8L1egIDhy7lmQYSzI/EC4WWUDDA==";
98 };
99 inherit meta passthru;
100
···454455 env =
456 {
457- # Suppress a weird warning in mkl-dnn, part of ideep in pytorch
458- # (upstream seems to have fixed this in the wrong place?)
459- # https://github.com/intel/mkl-dnn/commit/8134d346cdb7fe1695a2aa55771071d455fae0bc
460- # https://github.com/pytorch/pytorch/issues/22346
461- #
462 # Also of interest: pytorch ignores CXXFLAGS uses CFLAGS for both C and C++:
463 # https://github.com/pytorch/pytorch/blob/v1.11.0/setup.py#L17
464- NIX_CFLAGS_COMPILE = toString (
465- (
466- lib.optionals (blas.implementation == "mkl") [ "-Wno-error=array-bounds" ]
467- # Suppress gcc regression: avx512 math function raises uninitialized variable warning
468- # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105593
469- # See also: Fails to compile with GCC 12.1.0 https://github.com/pytorch/pytorch/issues/77939
470- ++ lib.optionals (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "12.0.0") [
471- "-Wno-error=maybe-uninitialized"
472- "-Wno-error=uninitialized"
473- ]
474- # Since pytorch 2.0:
475- # gcc-12.2.0/include/c++/12.2.0/bits/new_allocator.h:158:33: error: ‘void operator delete(void*, std::size_t)’
476- # ... called on pointer ‘<unknown>’ with nonzero offset [1, 9223372036854775800] [-Werror=free-nonheap-object]
477- ++ lib.optionals (stdenv.cc.isGNU && lib.versions.major stdenv.cc.version == "12") [
478- "-Wno-error=free-nonheap-object"
479- ]
480- # .../source/torch/csrc/autograd/generated/python_functions_0.cpp:85:3:
481- # error: cast from ... to ... converts to incompatible function type [-Werror,-Wcast-function-type-strict]
482- ++ lib.optionals (stdenv.cc.isClang && lib.versionAtLeast stdenv.cc.version "16") [
483- "-Wno-error=cast-function-type-strict"
484- # Suppresses the most spammy warnings.
485- # This is mainly to fix https://github.com/NixOS/nixpkgs/issues/266895.
486- ]
487- ++ lib.optionals rocmSupport [
488- "-Wno-#warnings"
489- "-Wno-cpp"
490- "-Wno-unknown-warning-option"
491- "-Wno-ignored-attributes"
492- "-Wno-deprecated-declarations"
493- "-Wno-defaulted-function-deleted"
494- "-Wno-pass-failed"
495- ]
496- ++ [
497- "-Wno-unused-command-line-argument"
498- "-Wno-uninitialized"
499- "-Wno-array-bounds"
500- "-Wno-free-nonheap-object"
501- "-Wno-unused-result"
502- ]
503- ++ lib.optionals stdenv.cc.isGNU [
504- "-Wno-maybe-uninitialized"
505- "-Wno-stringop-overflow"
506- ]
507- )
508- );
509-510 USE_VULKAN = setBool vulkanSupport;
511 }
512 // lib.optionalAttrs vulkanSupport {
···454455 env =
456 {
457+ # disable warnings as errors as they break the build on every compiler
458+ # bump, among other things.
000459 # Also of interest: pytorch ignores CXXFLAGS uses CFLAGS for both C and C++:
460 # https://github.com/pytorch/pytorch/blob/v1.11.0/setup.py#L17
461+ NIX_CFLAGS_COMPILE = "-Wno-error";
000000000000000000000000000000000000000000000462 USE_VULKAN = setBool vulkanSupport;
463 }
464 // lib.optionalAttrs vulkanSupport {