nixvim icon indicating copy to clipboard operation
nixvim copied to clipboard

Running `nix flake show` fails to evaluate on `x86_64-linux`

Open Lehmanator opened this issue 1 year ago • 4 comments

Evaluating flake outputs fails on x86_64-linux. Seems to want to a aarch64-darwin system. nix flake show should successfully evaluate independent of system type.

Seems something is referencing perSystem.aarch64-darwin.packages when evaluating on x86_64-linux.

$ nix flake show github:nix-community/nixvim`

error:
       … while calling anonymous lambda

         at /nix/store/gzf4zwcakda1nykn6h0avh45xhjhvsz4-source/lib/types.nix:593:29:

          592|       merge = loc: defs:
          593|         zipAttrsWith (name: defs:
             |                             ^
          594|           let merged = mergeDefinitions (loc ++ [name]) elemType defs;

       … while calling anonymous lambda

         at /nix/store/gzf4zwcakda1nykn6h0avh45xhjhvsz4-source/lib/modules.nix:824:28:

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

       … while evaluating definitions from `/nix/store/5yhqhsl8x9xmhsy3ql8hi05c3zbnxx2x-source/modules/transposition.nix':

       … from call site

         at /nix/store/gzf4zwcakda1nykn6h0avh45xhjhvsz4-source/lib/modules.nix:825:137:

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

       … while calling 'dischargeProperties'

         at /nix/store/gzf4zwcakda1nykn6h0avh45xhjhvsz4-source/lib/modules.nix:896:25:

          895|   */
          896|   dischargeProperties = def:
             |                         ^
          897|     if def._type or "" == "merge" then

       … while calling anonymous lambda

         at /nix/store/5yhqhsl8x9xmhsy3ql8hi05c3zbnxx2x-source/modules/transposition.nix:104:22:

          103|           mapAttrs
          104|             (system: v: v.${attrName} or (
             |                      ^
          105|               abort ''

       … while calling 'g'

         at /nix/store/gzf4zwcakda1nykn6h0avh45xhjhvsz4-source/lib/attrsets.nix:739:19:

          738|           g =
          739|             name: value:
             |                   ^
          740|             if isAttrs value && cond value

       … from call site

         at /nix/store/gzf4zwcakda1nykn6h0avh45xhjhvsz4-source/lib/attrsets.nix:742:20:

          741|               then recurse (path ++ [name]) value
          742|               else f (path ++ [name]) value;
             |                    ^
          743|         in mapAttrs g;

       … while calling anonymous lambda

         at /nix/store/gzf4zwcakda1nykn6h0avh45xhjhvsz4-source/lib/modules.nix:242:72:

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

       … while evaluating the option `perSystem.aarch64-darwin.checks':

       … while calling anonymous lambda

         at /nix/store/gzf4zwcakda1nykn6h0avh45xhjhvsz4-source/lib/modules.nix:824:28:

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

       … while evaluating definitions from `/nix/store/by7vnhmzbs67gb7pm0hazl8s9qgiviqb-source/flake-modules/packages.nix, via option perSystem':

       … from call site

         at /nix/store/gzf4zwcakda1nykn6h0avh45xhjhvsz4-source/lib/modules.nix:825:137:

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

       … while calling 'dischargeProperties'

         at /nix/store/gzf4zwcakda1nykn6h0avh45xhjhvsz4-source/lib/modules.nix:896:25:

          895|   */
          896|   dischargeProperties = def:
             |                         ^
          897|     if def._type or "" == "merge" then

       … while calling 'g'

         at /nix/store/gzf4zwcakda1nykn6h0avh45xhjhvsz4-source/lib/attrsets.nix:739:19:

          738|           g =
          739|             name: value:
             |                   ^
          740|             if isAttrs value && cond value

       … from call site

         at /nix/store/gzf4zwcakda1nykn6h0avh45xhjhvsz4-source/lib/attrsets.nix:742:20:

          741|               then recurse (path ++ [name]) value
          742|               else f (path ++ [name]) value;
             |                    ^
          743|         in mapAttrs g;

       … while calling anonymous lambda

         at /nix/store/gzf4zwcakda1nykn6h0avh45xhjhvsz4-source/lib/modules.nix:242:72:

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

       … while evaluating the option `perSystem.aarch64-darwin.packages':

       … while calling anonymous lambda

         at /nix/store/gzf4zwcakda1nykn6h0avh45xhjhvsz4-source/lib/modules.nix:824:28:

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

       … while evaluating definitions from `/nix/store/by7vnhmzbs67gb7pm0hazl8s9qgiviqb-source/flake-modules/packages.nix, via option perSystem':

       … from call site

         at /nix/store/gzf4zwcakda1nykn6h0avh45xhjhvsz4-source/lib/modules.nix:825:137:

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

       … while calling 'dischargeProperties'

         at /nix/store/gzf4zwcakda1nykn6h0avh45xhjhvsz4-source/lib/modules.nix:896:25:

          895|   */
          896|   dischargeProperties = def:
             |                         ^
          897|     if def._type or "" == "merge" then

       … from call site

         at /nix/store/by7vnhmzbs67gb7pm0hazl8s9qgiviqb-source/flake-modules/packages.nix:9:16:

            8|   }: {
            9|     packages = import ../docs {
             |                ^
           10|       inherit rawModules pkgs helpers;

       … while calling anonymous lambda

         at /nix/store/by7vnhmzbs67gb7pm0hazl8s9qgiviqb-source/docs/default.nix:1:1:

            1| {
             | ^
            2|   rawModules,

       error: a 'aarch64-darwin' with features {} is required to build '/nix/store/z88kmrcswk7j13lxnkydld1xnifprvsm-nixpkgs-nixvim-doc.drv', but I am a 'x86_64-linux' with features {benchmark, big-parallel, ca-derivations, kvm, nixos-test, recursive-nix, uid-range}

Lehmanator avatar Feb 23 '24 15:02 Lehmanator