Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error running flakes-based quick start on Darwin #720

Open
joaothallis opened this issue Jul 25, 2024 · 0 comments
Open

Error running flakes-based quick start on Darwin #720

joaothallis opened this issue Jul 25, 2024 · 0 comments

Comments

@joaothallis
Copy link

Looks like MacOS QEMU was fixed NixOS/nixpkgs#108984

$ nix-shell
$ nix run github:fort-nix/nix-bitcoin/release
error: flake 'github:fort-nix/nix-bitcoin/release' does not provide attribute 'apps.aarch64-darwin.default', 'defaultApp.aarch64-darwin', 'packages.aarch64-darwin.default' or 'defaultPackage.aarch64-darwin'

Adding "aarch64-darwin" to supportedSystems I have this error:

$ nix run -L -v ./
error:
       … while calling the 'toString' builtin

         at /nix/store/9ik4ikw0zz1imcidsf0wkx0cdbd9kdpc-source/flake.nix:123:23:

          122|             type = "app";
          123|             program = toString packages.runVM;
             |                       ^
          124|           };while evaluating the attribute 'runVM'

         at /nix/store/9ik4ikw0zz1imcidsf0wkx0cdbd9kdpc-source/flake.nix:100:78:

           99|         ]) // {
          100|           inherit (import ./examples/qemu-vm/minimal-vm.nix self pkgs system)
             |                                                                              ^
          101|             # A simple demo VM.

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: assertion '(stdenv).isLinux' failed

       at /nix/store/sj9yrq21wbbfr5715hys3laa2qd6x471-source/pkgs/os-specific/linux/kernel/generic.nix:87:1:

           86|
           87| assert stdenv.isLinux;
             | ^
           88|

With trace:

$ nix run --show-trace ./
error:
       … while calling the 'toString' builtin

         at /nix/store/9ik4ikw0zz1imcidsf0wkx0cdbd9kdpc-source/flake.nix:123:23:

          122|             type = "app";
          123|             program = toString packages.runVM;
             |                       ^
          124|           };while evaluating the attribute 'runVM'

         at /nix/store/9ik4ikw0zz1imcidsf0wkx0cdbd9kdpc-source/flake.nix:100:78:

           99|         ]) // {
          100|           inherit (import ./examples/qemu-vm/minimal-vm.nix self pkgs system)
             |                                                                              ^
          101|             # A simple demo VM.while evaluating the attribute 'runVM'

         at /nix/store/9ik4ikw0zz1imcidsf0wkx0cdbd9kdpc-source/examples/qemu-vm/minimal-vm.nix:65:3:

           64|
           65|   runVM = mkVMScript vm;
             |   ^
           66| }

       … from call site

         at /nix/store/9ik4ikw0zz1imcidsf0wkx0cdbd9kdpc-source/examples/qemu-vm/minimal-vm.nix:65:11:

           64|
           65|   runVM = mkVMScript vm;
             |           ^
           66| }

       … while calling 'mkVMScript'

         at /nix/store/9ik4ikw0zz1imcidsf0wkx0cdbd9kdpc-source/examples/qemu-vm/minimal-vm.nix:6:16:

            5|
            6|   mkVMScript = vm: pkgs.writers.writeBash "run-vm" ''
             |                ^
            7|     set -euo pipefail

       … from call site

         at /nix/store/9ik4ikw0zz1imcidsf0wkx0cdbd9kdpc-source/examples/qemu-vm/minimal-vm.nix:6:20:

            5|
            6|   mkVMScript = vm: pkgs.writers.writeBash "run-vm" ''
             |                    ^
            7|     set -euo pipefail

       … while calling 'writeBash'

         at /nix/store/sj9yrq21wbbfr5715hys3laa2qd6x471-source/pkgs/build-support/writers/scripts.nix:187:21:

          186|   #     ''
          187|   writeBash = name: argsOrScript:
             |                     ^
          188|     if lib.isAttrs argsOrScript && ! lib.isDerivation argsOrScript

       … while evaluating derivation 'nixos-vm'
         whose name attribute is located at /nix/store/sj9yrq21wbbfr5715hys3laa2qd6x471-source/pkgs/stdenv/generic/make-derivation.nix:333:7

       … while evaluating attribute 'buildCommand' of derivation 'nixos-vm'

         at /nix/store/sj9yrq21wbbfr5715hys3laa2qd6x471-source/pkgs/build-support/trivial-builders/default.nix:68:16:

           67|         enableParallelBuilding = true;
           68|         inherit buildCommand name;
             |                ^
           69|         passAsFile = [ "buildCommand" ]

       … while calling anonymous lambda

         at /nix/store/sj9yrq21wbbfr5715hys3laa2qd6x471-source/lib/attrsets.nix:1571:24:

         1570|     let f = attrPath:
         1571|       zipAttrsWith (n: values:
             |                        ^
         1572|         let here = attrPath ++ [n]; inwhile calling anonymous lambda

         at /nix/store/sj9yrq21wbbfr5715hys3laa2qd6x471-source/lib/attrsets.nix:1205:18:

         1204|         mapAttrs
         1205|           (name: value:
             |                  ^
         1206|             if isAttrs value && cond value

       … from call site

         at /nix/store/sj9yrq21wbbfr5715hys3laa2qd6x471-source/lib/attrsets.nix:1208:18:

         1207|             then recurse (path ++ [ name ]) value
         1208|             else f (path ++ [ name ]) value);
             |                  ^
         1209|     inwhile calling anonymous lambda

         at /nix/store/sj9yrq21wbbfr5715hys3laa2qd6x471-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 `system.build.toplevel':

       … while calling anonymous lambda

         at /nix/store/sj9yrq21wbbfr5715hys3laa2qd6x471-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/sj9yrq21wbbfr5715hys3laa2qd6x471-source/nixos/modules/system/activation/top-level.nix':

       … from call site

         at /nix/store/sj9yrq21wbbfr5715hys3laa2qd6x471-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/sj9yrq21wbbfr5715hys3laa2qd6x471-source/lib/modules.nix:896:25:

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

       … from call site

         at /nix/store/sj9yrq21wbbfr5715hys3laa2qd6x471-source/nixos/modules/system/activation/top-level.nix:71:12:

           70|   # Replace runtime dependencies
           71|   system = foldr ({ oldDependency, newDependency }: drv:
             |            ^
           72|       pkgs.replaceDependency { inherit oldDependency newDependency drv; }

       … while calling 'foldr'

         at /nix/store/sj9yrq21wbbfr5715hys3laa2qd6x471-source/lib/lists.nix:121:20:

          120|   */
          121|   foldr = op: nul: list:
             |                    ^
          122|     let

       … from call site

         at /nix/store/sj9yrq21wbbfr5715hys3laa2qd6x471-source/lib/lists.nix:128:8:

          127|         else op (elemAt list n) (fold' (n + 1));
          128|     in fold' 0;
             |        ^
          129|

       … while calling 'fold''

         at /nix/store/sj9yrq21wbbfr5715hys3laa2qd6x471-source/lib/lists.nix:124:15:

          123|       len = length list;
          124|       fold' = n:
             |               ^
          125|         if n == len

       … while calling anonymous lambda

         at /nix/store/sj9yrq21wbbfr5715hys3laa2qd6x471-source/lib/attrsets.nix:1205:18:

         1204|         mapAttrs
         1205|           (name: value:
             |                  ^
         1206|             if isAttrs value && cond value

       … from call site

         at /nix/store/sj9yrq21wbbfr5715hys3laa2qd6x471-source/lib/attrsets.nix:1208:18:

         1207|             then recurse (path ++ [ name ]) value
         1208|             else f (path ++ [ name ]) value);
             |                  ^
         1209|     in

       … while calling anonymous lambda

         at /nix/store/sj9yrq21wbbfr5715hys3laa2qd6x471-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 `assertions':

       … while calling anonymous lambda

         at /nix/store/sj9yrq21wbbfr5715hys3laa2qd6x471-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/sj9yrq21wbbfr5715hys3laa2qd6x471-source/nixos/modules/system/boot/kernel.nix':

       … from call site

         at /nix/store/sj9yrq21wbbfr5715hys3laa2qd6x471-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/sj9yrq21wbbfr5715hys3laa2qd6x471-source/lib/modules.nix:896:25:

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

       … from call site

         at /nix/store/sj9yrq21wbbfr5715hys3laa2qd6x471-source/lib/modules.nix:902:11:

          901|         if def.condition then
          902|           dischargeProperties def.content
             |           ^
          903|         else

       … while calling 'dischargeProperties'

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

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

       … from call site

         at /nix/store/sj9yrq21wbbfr5715hys3laa2qd6x471-source/pkgs/top-level/linux-kernels.nix:172:17:

          171|
          172|     linux_6_6 = callPackage ../os-specific/linux/kernel/mainline.nix {
             |                 ^
          173|       branch = "6.6";

       … while calling 'callPackageWith'

         at /nix/store/sj9yrq21wbbfr5715hys3laa2qd6x471-source/lib/customisation.nix:212:35:

          211|   */
          212|   callPackageWith = autoArgs: fn: args:
             |                                   ^
          213|     let

       … from call site

         at /nix/store/sj9yrq21wbbfr5715hys3laa2qd6x471-source/lib/trivial.nix:895:7:

          894|     { # TODO: Should we add call-time "type" checking like built in?
          895|       __functor = self: f;
             |       ^
          896|       __functionArgs = args;

       … while calling anonymous lambda

         at /nix/store/sj9yrq21wbbfr5715hys3laa2qd6x471-source/lib/customisation.nix:136:17:

          135|     in
          136|     mirrorArgs (origArgs:
             |                 ^
          137|     let

       … from call site

         at /nix/store/sj9yrq21wbbfr5715hys3laa2qd6x471-source/lib/customisation.nix:138:16:

          137|     let
          138|       result = f origArgs;
             |                ^
          139|

       … while calling anonymous lambda

         at /nix/store/sj9yrq21wbbfr5715hys3laa2qd6x471-source/pkgs/os-specific/linux/kernel/mainline.nix:1:1:

            1| { branch, lib, fetchurl, fetchzip, buildLinux, ... } @ args:
             | ^
            2|

       … from call site

         at /nix/store/sj9yrq21wbbfr5715hys3laa2qd6x471-source/lib/trivial.nix:895:7:

          894|     { # TODO: Should we add call-time "type" checking like built in?
          895|       __functor = self: f;
             |       ^
          896|       __functionArgs = args;

       … while calling anonymous lambda

         at /nix/store/sj9yrq21wbbfr5715hys3laa2qd6x471-source/lib/customisation.nix:136:17:

          135|     in
          136|     mirrorArgs (origArgs:
             |                 ^
          137|     let

       … from call site

         at /nix/store/sj9yrq21wbbfr5715hys3laa2qd6x471-source/lib/customisation.nix:138:16:

          137|     let
          138|       result = f origArgs;
             |                ^
          139|

       … while calling anonymous lambda

         at /nix/store/sj9yrq21wbbfr5715hys3laa2qd6x471-source/pkgs/os-specific/linux/kernel/generic.nix:22:22:

           21| let overridableKernel =
           22| lib.makeOverridable ({ # The kernel source tarball.
             |                      ^
           23|   src

       error: assertion '(stdenv).isLinux' failed

       at /nix/store/sj9yrq21wbbfr5715hys3laa2qd6x471-source/pkgs/os-specific/linux/kernel/generic.nix:87:1:

           86|
           87| assert stdenv.isLinux;
             | ^
           88|
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant