Nixos-rebuild shows "error: boto-2.49.0 not supported for interpreter python3.10"

Running nixos-rebuild switch shows error: boto-2.49.0 not supported for interpreter python3.10.

It worked fine before, i don’t know why this is happening.

Running nixos-rebuild switch --show-trace yields

building Nix...
building the system configuration...
error: boto-2.49.0 not supported for interpreter python3.10

       … while evaluating anonymous lambda

       at /nix/store/gjmj42s0if0fpd3y5p9jkxcpkfvgkd9v-nixos/nixos/pkgs/development/interpreters/python/mk-python-derivation.nix:30:1:

           29|
           30| { name ? "${attrs.pname}-${attrs.version}"
             | ^
           31|

       … from call site

       at /nix/store/gjmj42s0if0fpd3y5p9jkxcpkfvgkd9v-nixos/nixos/lib/customisation.nix:69:16:

           68|     let
           69|       result = f origArgs;
             |                ^
           70|

       … while evaluating 'makeOverridable'

       at /nix/store/gjmj42s0if0fpd3y5p9jkxcpkfvgkd9v-nixos/nixos/lib/customisation.nix:67:24:

           66|   */
           67|   makeOverridable = f: origArgs:
             |                        ^
           68|     let

       … from call site

       at /nix/store/gjmj42s0if0fpd3y5p9jkxcpkfvgkd9v-nixos/nixos/pkgs/top-level/python-packages.nix:29:12:

           28|     let
           29|       ff = f origArgs;
             |            ^
           30|       overrideWith = newArgs: origArgs // (if pkgs.lib.isFunction newArgs then newArgs origArgs else newArgs);

       … while evaluating 'makeOverridablePythonPackage'

       at /nix/store/gjmj42s0if0fpd3y5p9jkxcpkfvgkd9v-nixos/nixos/pkgs/top-level/python-packages.nix:27:37:

           26|   # This function introduces `overridePythonAttrs` and it overrides the call to `buildPythonPackage`.
           27|   makeOverridablePythonPackage = f: origArgs:
             |                                     ^
           28|     let

       … from call site

       at /nix/store/gjmj42s0if0fpd3y5p9jkxcpkfvgkd9v-nixos/nixos/pkgs/development/python-modules/boto/default.nix:12:1:

           11|
           12| buildPythonPackage rec {
             | ^
           13|   pname = "boto";

       … while evaluating anonymous lambda

       at /nix/store/gjmj42s0if0fpd3y5p9jkxcpkfvgkd9v-nixos/nixos/pkgs/development/python-modules/boto/default.nix:1:1:

            1| { lib
             | ^
            2| , buildPythonPackage

       … from call site

       at /nix/store/gjmj42s0if0fpd3y5p9jkxcpkfvgkd9v-nixos/nixos/lib/customisation.nix:69:16:

           68|     let
           69|       result = f origArgs;
             |                ^
           70|

       … while evaluating 'makeOverridable'

       at /nix/store/gjmj42s0if0fpd3y5p9jkxcpkfvgkd9v-nixos/nixos/lib/customisation.nix:67:24:

           66|   */
           67|   makeOverridable = f: origArgs:
             |                        ^
           68|     let

       … from call site

       at /nix/store/gjmj42s0if0fpd3y5p9jkxcpkfvgkd9v-nixos/nixos/lib/customisation.nix:168:34:

          167|
          168|     in if missingArgs == [] then makeOverridable f allArgs else throw error;
             |                                  ^
          169|

       … while evaluating 'callPackageWith'

       at /nix/store/gjmj42s0if0fpd3y5p9jkxcpkfvgkd9v-nixos/nixos/lib/customisation.nix:117:35:

          116|   */
          117|   callPackageWith = autoArgs: fn: args:
             |                                   ^
          118|     let

       … from call site

       at /nix/store/gjmj42s0if0fpd3y5p9jkxcpkfvgkd9v-nixos/nixos/pkgs/top-level/python-packages.nix:1372:10:

         1371|
         1372|   boto = callPackage ../development/python-modules/boto { };
             |          ^
         1373|

       … while evaluating 'isDerivation'

       at /nix/store/gjmj42s0if0fpd3y5p9jkxcpkfvgkd9v-nixos/nixos/lib/attrsets.nix:427:18:

          426|   */
          427|   isDerivation = x: x.type or null == "derivation";
             |                  ^
          428|

       … from call site

       at /nix/store/gjmj42s0if0fpd3y5p9jkxcpkfvgkd9v-nixos/nixos/pkgs/stdenv/generic/make-derivation.nix:193:8:

          192|   checkDependencyList' = positions: name: deps: lib.flip lib.imap1 deps (index: dep:
          193|     if lib.isDerivation dep || isNull dep || builtins.typeOf dep == "string" || builtins.typeOf dep == "path" then dep
             |        ^
          194|     else if lib.isList dep then checkDependencyList' ([index] ++ positions) name dep

       … while evaluating anonymous lambda

       at /nix/store/gjmj42s0if0fpd3y5p9jkxcpkfvgkd9v-nixos/nixos/pkgs/stdenv/generic/make-derivation.nix:192:81:

          191|   checkDependencyList = checkDependencyList' [];
          192|   checkDependencyList' = positions: name: deps: lib.flip lib.imap1 deps (index: dep:
             |                                                                                 ^
          193|     if lib.isDerivation dep || isNull dep || builtins.typeOf dep == "string" || builtins.typeOf dep == "path" then dep

       … from call site

       at /nix/store/gjmj42s0if0fpd3y5p9jkxcpkfvgkd9v-nixos/nixos/lib/lists.nix:117:32:

          116|   */
          117|   imap1 = f: list: genList (n: f (n + 1) (elemAt list n)) (length list);
             |                                ^
          118|

       … while evaluating anonymous lambda

       at /nix/store/gjmj42s0if0fpd3y5p9jkxcpkfvgkd9v-nixos/nixos/lib/lists.nix:117:29:

          116|   */
          117|   imap1 = f: list: genList (n: f (n + 1) (elemAt list n)) (length list);
             |                             ^
          118|

       … from call site

       … while evaluating anonymous lambda

       at /nix/store/gjmj42s0if0fpd3y5p9jkxcpkfvgkd9v-nixos/nixos/pkgs/stdenv/generic/make-derivation.nix:221:13:

          220|       (map (drv: drv.__spliced.hostHost or drv) (checkDependencyList "depsHostHost" depsHostHost))
          221|       (map (drv: drv.crossDrv or drv) (checkDependencyList "buildInputs" buildInputs))
             |             ^
          222|     ]

       … from call site

       … while evaluating 'getOutput'

       at /nix/store/gjmj42s0if0fpd3y5p9jkxcpkfvgkd9v-nixos/nixos/lib/attrsets.nix:598:23:

          597|   */
          598|   getOutput = output: pkg:
             |                       ^
          599|     if ! pkg ? outputSpecified || ! pkg.outputSpecified

       … from call site

       … while evaluating the attribute 'buildInputs' of the derivation 'duplicity-0.8.20'

       at /nix/store/gjmj42s0if0fpd3y5p9jkxcpkfvgkd9v-nixos/nixos/pkgs/stdenv/generic/make-derivation.nix:270:7:

          269|     // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
          270|       name =
             |       ^
          271|         let

       … while evaluating the attribute 'outPath'

       at /nix/store/gjmj42s0if0fpd3y5p9jkxcpkfvgkd9v-nixos/nixos/lib/customisation.nix:211:7:

          210|       drvPath = assert condition; drv.drvPath;
          211|       outPath = assert condition; drv.outPath;
             |       ^
          212|     };

       … while evaluating the attribute 'mesonFlags' of the derivation 'deja-dup-43.3'

       at /nix/store/gjmj42s0if0fpd3y5p9jkxcpkfvgkd9v-nixos/nixos/pkgs/stdenv/generic/make-derivation.nix:270:7:

          269|     // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
          270|       name =
             |       ^
          271|         let

       … while evaluating the attribute 'passAsFile'

       at /nix/store/gjmj42s0if0fpd3y5p9jkxcpkfvgkd9v-nixos/nixos/pkgs/build-support/buildenv/default.nix:77:5:

           76|     # XXX: The size is somewhat arbitrary
           77|     passAsFile = if builtins.stringLength pkgs >= 128*1024 then [ "pkgs" ] else [ ];
             |     ^
           78|   }

       … while evaluating the attribute 'passAsFile' of the derivation 'system-path'

       at /nix/store/gjmj42s0if0fpd3y5p9jkxcpkfvgkd9v-nixos/nixos/pkgs/stdenv/generic/make-derivation.nix:270:7:

          269|     // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
          270|       name =
             |       ^
          271|         let

       … while evaluating the attribute 'text' of the derivation 'system-crontab'

       at /nix/store/gjmj42s0if0fpd3y5p9jkxcpkfvgkd9v-nixos/nixos/pkgs/stdenv/generic/make-derivation.nix:270:7:

          269|     // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
          270|       name =
             |       ^
          271|         let

       … while evaluating the attribute 'allFiles' of the derivation 'crontabs'

       at /nix/store/gjmj42s0if0fpd3y5p9jkxcpkfvgkd9v-nixos/nixos/pkgs/stdenv/generic/make-derivation.nix:270:7:

          269|     // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
          270|       name =
             |       ^
          271|         let

       … while evaluating 'check'

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/types.nix:394:15:

          393|       name = "path";
          394|       check = x: isCoercibleToString x && builtins.substring 0 1 (toString x) == "/";
             |               ^
          395|       merge = mergeEqualOption;

       … from call site

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:777:22:

          776|       if isDefined then
          777|         if all (def: type.check def.value) defsFinal then type.merge loc defsFinal
             |                      ^
          778|         else let allInvalid = filter (def: ! type.check def.value) defsFinal;

       … while evaluating anonymous lambda

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:777:17:

          776|       if isDefined then
          777|         if all (def: type.check def.value) defsFinal then type.merge loc defsFinal
             |                 ^
          778|         else let allInvalid = filter (def: ! type.check def.value) defsFinal;

       … from call site

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:777:12:

          776|       if isDefined then
          777|         if all (def: type.check def.value) defsFinal then type.merge loc defsFinal
             |            ^
          778|         else let allInvalid = filter (def: ! type.check def.value) defsFinal;

       … while evaluating the attribute 'mergedValue'

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:775:5:

          774|     # Type-check the remaining definitions, and merge them. Or throw if no definitions.
          775|     mergedValue =
             |     ^
          776|       if isDefined then

       … while evaluating the option `environment.etc.crontab.source':

       … while evaluating the attribute 'value'

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:741:9:

          740|     in warnDeprecation opt //
          741|       { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value;
             |         ^
          742|         inherit (res.defsFinal') highestPrio;

       … while evaluating anonymous lambda

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:292:72:

          291|           # For definitions that have an associated option
          292|           declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options;
             |                                                                        ^
          293|

       … from call site

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/attrsets.nix:401:20:

          400|               then recurse (path ++ [name]) value
          401|               else f (path ++ [name]) value;
             |                    ^
          402|         in mapAttrs g;

       … while evaluating 'g'

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/attrsets.nix:398:19:

          397|           g =
          398|             name: value:
             |                   ^
          399|             if isAttrs value && cond value

       … from call site

       … while evaluating 'escapeShellArg'

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/strings.nix:316:20:

          315|   */
          316|   escapeShellArg = arg: "'${replaceStrings ["'"] ["'\\''"] (toString arg)}'";
             |                    ^
          317|

       … from call site

       … while evaluating 'concatMapStringsSep'

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/strings.nix:111:5:

          110|     # List of input strings
          111|     list: concatStringsSep sep (map f list);
             |     ^
          112|

       … from call site

       at /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/etc/etc.nix:54:43:

           53|     mkdir -p "$out/etc"
           54|     ${concatMapStringsSep "\n" (etcEntry: escapeShellArgs [
             |                                           ^
           55|       "makeEtcEntry"

       … while evaluating anonymous lambda

       at /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/etc/etc.nix:54:33:

           53|     mkdir -p "$out/etc"
           54|     ${concatMapStringsSep "\n" (etcEntry: escapeShellArgs [
             |                                 ^
           55|       "makeEtcEntry"

       … from call site

       … while evaluating 'concatMapStringsSep'

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/strings.nix:111:5:

          110|     # List of input strings
          111|     list: concatStringsSep sep (map f list);
             |     ^
          112|

       … from call site

       at /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/etc/etc.nix:54:7:

           53|     mkdir -p "$out/etc"
           54|     ${concatMapStringsSep "\n" (etcEntry: escapeShellArgs [
             |       ^
           55|       "makeEtcEntry"

       … while evaluating the attribute 'buildCommand' of the derivation 'etc'

       at /nix/store/gjmj42s0if0fpd3y5p9jkxcpkfvgkd9v-nixos/nixos/pkgs/stdenv/generic/make-derivation.nix:270:7:

          269|     // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
          270|       name =
             |       ^
          271|         let

       … while evaluating the attribute 'value'

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:576:44:

          575|       defnsByName' = byName "config" (module: value:
          576|           [{ inherit (module) file; inherit value; }]
             |                                            ^
          577|         ) configs;

       … while evaluating 'atDepth'

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/attrsets.nix:60:17:

           59|       len = length attrPath;
           60|       atDepth = n:
             |                 ^
           61|         if n == len

       … from call site

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/attrsets.nix:63:39:

           62|         then value
           63|         else { ${elemAt attrPath n} = atDepth (n + 1); };
             |                                       ^
           64|     in atDepth 0;

       … while evaluating the attribute 'value'

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/types.nix:461:58:

          460|         # Push down position info.
          461|         (map (def: mapAttrs (n: v: { inherit (def) file; value = v; }) def.value) defs);
             |                                                          ^
          462|       emptyValue = { value = {}; };

       … while evaluating 'dischargeProperties'

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:827:25:

          826|   */
          827|   dischargeProperties = def:
             |                         ^
          828|     if def._type or "" == "merge" then

       … from call site

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:756:137:

          755|         defs' = concatMap (m:
          756|           map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
             |                                                                                                                                         ^
          757|         ) defs;

       … while evaluating definitions from `/nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/etc/etc.nix':

       … while evaluating anonymous lambda

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:755:28:

          754|         # Process mkMerge and mkIf properties.
          755|         defs' = concatMap (m:
             |                            ^
          756|           map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))

       … from call site

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:755:17:

          754|         # Process mkMerge and mkIf properties.
          755|         defs' = concatMap (m:
             |                 ^
          756|           map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))

       … while evaluating the attribute 'values'

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:868:7:

          867|     in {
          868|       values = concatMap (def: if getPrio def == highestPrio then [(strip def)] else []) defs;
             |       ^
          869|       inherit highestPrio;

       … while evaluating the attribute 'values'

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:769:9:

          768|       in {
          769|         values = defs''';
             |         ^
          770|         inherit (defs'') highestPrio;

       … while evaluating the attribute 'optionalValue.value'

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:787:5:

          786|
          787|     optionalValue =
             |     ^
          788|       if isDefined then { value = mergedValue; }

       … while evaluating anonymous lambda

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/types.nix:455:29:

          454|       merge = loc: defs:
          455|         zipAttrsWith (name: defs:
             |                             ^
          456|           let merged = mergeDefinitions (loc ++ [name]) elemType defs;

       … from call site

       … while evaluating anonymous lambda

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/attrsets.nix:518:24:

          517|     let f = attrPath:
          518|       zipAttrsWith (n: values:
             |                        ^
          519|         let here = attrPath ++ [n]; in

       … from call site

       … while evaluating the attribute 'value'

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:576:44:

          575|       defnsByName' = byName "config" (module: value:
          576|           [{ inherit (module) file; inherit value; }]
             |                                            ^
          577|         ) configs;

       … while evaluating 'dischargeProperties'

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:827:25:

          826|   */
          827|   dischargeProperties = def:
             |                         ^
          828|     if def._type or "" == "merge" then

       … from call site

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:756:137:

          755|         defs' = concatMap (m:
          756|           map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
             |                                                                                                                                         ^
          757|         ) defs;

       … while evaluating definitions from `/nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/etc/etc-activation.nix':

       … while evaluating anonymous lambda

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:755:28:

          754|         # Process mkMerge and mkIf properties.
          755|         defs' = concatMap (m:
             |                            ^
          756|           map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))

       … from call site

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:755:17:

          754|         # Process mkMerge and mkIf properties.
          755|         defs' = concatMap (m:
             |                 ^
          756|           map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))

       … while evaluating the attribute 'values'

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:868:7:

          867|     in {
          868|       values = concatMap (def: if getPrio def == highestPrio then [(strip def)] else []) defs;
             |       ^
          869|       inherit highestPrio;

       … while evaluating the attribute 'values'

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:769:9:

          768|       in {
          769|         values = defs''';
             |         ^
          770|         inherit (defs'') highestPrio;

       … while evaluating the attribute 'mergedValue'

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:775:5:

          774|     # Type-check the remaining definitions, and merge them. Or throw if no definitions.
          775|     mergedValue =
             |     ^
          776|       if isDefined then

       … while evaluating the option `system.activationScripts.etc.text':

       … while evaluating the attribute 'value'

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:741:9:

          740|     in warnDeprecation opt //
          741|       { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value;
             |         ^
          742|         inherit (res.defsFinal') highestPrio;

       … while evaluating anonymous lambda

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:292:72:

          291|           # For definitions that have an associated option
          292|           declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options;
             |                                                                        ^
          293|

       … from call site

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/attrsets.nix:401:20:

          400|               then recurse (path ++ [name]) value
          401|               else f (path ++ [name]) value;
             |                    ^
          402|         in mapAttrs g;

       … while evaluating 'g'

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/attrsets.nix:398:19:

          397|           g =
          398|             name: value:
             |                   ^
          399|             if isAttrs value && cond value

       … from call site

       … while evaluating the attribute 'text'

       at /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/activation/activation-script.nix:9:5:

            8|   addAttributeName = mapAttrs (a: v: v // {
            9|     text = ''
             |     ^
           10|       #### Activation script snippet ${a}:

       … while evaluating 'id'

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/trivial.nix:14:5:

           13|     # The value to return
           14|     x: x;
             |     ^
           15|

       … from call site

       … while evaluating 'textClosureMap'

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/strings-with-deps.nix:75:35:

           74|
           75|   textClosureMap = f: predefined: names:
             |                                   ^
           76|     concatStringsSep "\n" (map f (textClosureList predefined names));

       … from call site

       at /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/activation/activation-script.nix:49:9:

           48|
           49|       ${textClosureMap id (withDrySnippets) (attrNames withDrySnippets)}
             |         ^
           50|

       … while evaluating 'systemActivationScript'

       at /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/activation/activation-script.nix:20:33:

           19|
           20|   systemActivationScript = set: onlyDry: let
             |                                 ^
           21|     set' = mapAttrs (_: v: if isString v then (noDepEntry v) // { supportsDryActivation = false; } else v) set;

       … from call site

       at /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/activation/activation-script.nix:137:18:

          136|       apply = set: set // {
          137|         script = systemActivationScript set false;
             |                  ^
          138|       };

       … while evaluating the attribute 'system.activationScripts.script'

       at /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/activation/activation-script.nix:137:9:

          136|       apply = set: set // {
          137|         script = systemActivationScript set false;
             |         ^
          138|       };

       … while evaluating the attribute 'activationScript' of the derivation 'nixos-system-nixos-22.11pre387075.e1e08fe28bf'

       at /nix/store/gjmj42s0if0fpd3y5p9jkxcpkfvgkd9v-nixos/nixos/pkgs/stdenv/generic/make-derivation.nix:270:7:

          269|     // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
          270|       name =
             |       ^
          271|         let

How can i solve this issue?

You reference deja-dup/duplicity in your crontabs which requires boto which does not support python 3.10 which is the new default python3. You can fix it by removing that crontab or changing the packages involved to no longer depend on boto.

1 Like

Thank you for your quick reply.

I don’t see deja-dup/duplicity in my user and root crontab. However, deja-dup is running automatically so i think it makes some kind of entry somewhere.

How can i change the packages to no longer depend on boto and still have deja-dup working?

See also Revert "duplicity: S3 backups fail with "boto" not being found." by jtojnar · Pull Request #178658 · NixOS/nixpkgs · GitHub.

Sorry, noob question: Where do i put this? If i put it in configuration.nix, nixfmt shows an error. If i put it under environment.systemPackages = with pkgs; [ the same error referencing boto is shown when i run nixos-rebuild switch.

(final: prev: {
  python3 = prev.python3.override (prevArgs: {
    packageOverrides =
      let
        ourOverrides = finalPp: prevPp: {
          # Remove boto Python package since it breaks duplicity eval.
          # https://github.com/NixOS/nixpkgs/pull/178658
          boto = null;
        };
      in
      lib.composeExtensions
        prevArgs.packageOverrides or (finalPp: prevPp: {})
        ourOverrides;
  });
})

It is an overlay, so it goes either to nixpkgs.overlays option or the overlays argument passed to imported Nixpkgs.

1 Like

Got it, thank you all!

Does this affect my other programs in a negative way? nixos-rebuild switch built 739 derivations with these 2496 paths will be fetched (3162.37 MiB download, 12621.91 MiB unpacked):, so basically most of my programs?

It affects everything that somehow depends on python3, directly or indirectly.

Will there be a situation in the future in which i can drop the overlay? Only if deja-dup/duplicity gets updated to no longer rely on boto? Or can i enable the overlay just for deja-dup?

The duplicity module sadly doesn’t support setting the package used, so you have to override “globally”.

There might be a way to just override duplicity, by dpoing something like this:

(_: _: let pkgs' = import <nixpkgs> {
  overlays = [
    # The overlay from above in this thread
  ];
}; in {
  inherit (pkgs') deja-dup; # and maybe other stuff that fails for the same reason
})
1 Like

Sorry again: If i put

    (_: _: let pkgs' = import <nixpkgs> {
                 overlays = [
                   nixpkgs.overlays = [
                     (final: prev: {
                       python3 = prev.python3.override (prevArgs: {
                         packageOverrides = let
                           ourOverrides = finalPp: prevPp: {
                             # Remove boto Python package since it breaks duplicity eval.
                             # https://github.com/NixOS/nixpkgs/pull/178658
                             boto = null;
                           };
                         in lib.composeExtensions
                           prevArgs.packageOverrides or (finalPp: prevPp: { }) ourOverrides;
                       });
                     })
                   ];
                 ];
             }; in {
               inherit (pkgs') deja-dup; # and maybe other stuff that fails for the same reason
             })

in configuration.nix instead of only the overlay itself, i get the following error:

(_: _: let pkgs' = import <nixpkgs> {
^
unexpected '('
expecting expression

Do i have to add or remove a semicolon somewhere?

What I wrote is still an overlay, so it has to be added to the nixpkgs.overlays list.

1 Like

I see, thank you.

It is working (didn’t throw an error), but also didn’t lead to a rebuild of all python dependent programs excluding deja-dup/duplicity. I was expecting that, as the global override led to a rebuild of all python dependent programs. But then again, my understanding of Nixos is minimal as i’ve freshly migrated from Arch.

Solved by updated duplicity package in the meantime. Thank you all!