WilliamHsieh / dotfiles

Personal dotfiles setup with nix and home-manager.
8 stars 0 forks source link

glibc: darwin build failed #44

Closed WilliamHsieh closed 1 month ago

WilliamHsieh commented 3 months ago
error: Package ‘glibc-nolibgcc-2.39-52’ in /nix/store/mcwr2j04fikfsrsaq76f4bviinvl6zql-source/pkgs/development/libraries/glibc/default.nix:185 is not available on the requested hostPlatform:
         hostPlatform.config = "aarch64-apple-darwin"
         package.meta.platforms = [
           "aarch64-linux"
           "armv5tel-linux"
           "armv6l-linux"
           "armv7a-linux"
           "armv7l-linux"
           "i686-linux"
           "loongarch64-linux"
           "m68k-linux"
           "microblaze-linux"
           "microblazeel-linux"
           "mips-linux"
           "mips64-linux"
           "mips64el-linux"
           "mipsel-linux"
           "powerpc64-linux"
           "powerpc64le-linux"
           "riscv32-linux"
           "riscv64-linux"
           "s390-linux"
           "s390x-linux"
           "x86_64-linux"
         ]
         package.meta.badPlatforms = [ ]
       , refusing to evaluate.

       a) To temporarily allow packages that are unsupported for this system, you can use an environment variable
          for a single invocation of the nix tools.

            $ export NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM=1

          Note: When using `nix shell`, `nix build`, `nix develop`, etc with a flake,
                then pass `--impure` in order to allow use of environment variables.

       b) For `nixos-rebuild` you can set
         { nixpkgs.config.allowUnsupportedSystem = true; }
       in configuration.nix to override this.

       c) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
         { allowUnsupportedSystem = true; }
       to ~/.config/nixpkgs/config.nix.
error:
       … while calling the 'derivationStrict' builtin

         at /derivation-internal.nix:9:12:

            8|

            9|   strict = derivationStrict drvAttrs;
             |            ^
           10|

       … while evaluating derivation 'home-manager-generation'
         whose name attribute is located at /nix/store/mcwr2j04fikfsrsaq76f4bviinvl6zql-source/pkgs/stdenv/generic/make-derivation.nix:331:7

       … while evaluating attribute 'buildCommand' of derivation 'home-manager-generation'

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

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

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

       error: Package ‘netcat-openbsd-1.219-1’ in /nix/store/mcwr2j04fikfsrsaq76f4bviinvl6zql-source/pkgs/tools/networking/netcat-openbsd/default.nix:41 is marked as broken, refusing to evaluate.

       a) To temporarily allow broken packages, you can use an environment variable
          for a single invocation of the nix tools.

            $ export NIXPKGS_ALLOW_BROKEN=1

          Note: When using `nix shell`, `nix build`, `nix develop`, etc with a flake,
                then pass `--impure` in order to allow use of environment variables.

       b) For `nixos-rebuild` you can set
         { nixpkgs.config.allowBroken = true; }
       in configuration.nix to override this.

       c) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
         { allowBroken = true; }
       to ~/.config/nixpkgs/config.nix.
error: builder for '/nix/store/bzg6jv0adhnb780y5s3d6q5l4k4gbc85-glibc-nolibgcc-2.39-52.drv' failed with exit code 1;
       last 10 log lines:
       > checking for egrep... /nix/store/kp35gjhszl722f6mi2889y1b8m96j5h9-gnugrep-3.11/bin/grep -E
       > mips nios2 or1k powerpc riscv s390 sh checking for grep that handles long lines and -e... (cached) /nix/store/kp35gjhszl722f6mi2889y1b8m96j5h9-gnugrep-3.11/bin/grep
       > checking for egrep... (cached) /nix/store/kp35gjhszl722f6mi2889y1b8m96j5h9-gnugrep-3.11/bin/grep -E
       > sparc x86_64
       > configure: error:
       > *** The GNU C library is currently unavailable for this platform.
       > *** If you are interested in seeing glibc on this platform visit
       > *** the "How to submit a new port" in the wiki:
       > ***   https://sourceware.org/glibc/wiki/#Development
       > *** and join the community!
       For full logs, run 'nix-store -l /nix/store/bzg6jv0adhnb780y5s3d6q5l4k4gbc85-glibc-nolibgcc-2.39-52.drv'.
error: 1 dependencies of derivation '/nix/store/vzl7dgsjidky82g03wm0rahklrdvkj7c-home-manager-applications.drv' failed to build
error: 1 dependencies of derivation '/nix/store/cn9gg3yqpj9izv41mljidyik8r24mjjz-home-manager-fonts.drv' failed to build
error: 1 dependencies of derivation '/nix/store/589992ffwjqyf4qf8xmlazhf5wifiq5f-home-manager-path.drv' failed to build
error: 1 dependencies of derivation '/nix/store/ki29cn2n61jzhgi87gkna1mbdj2m1vqs-man-paths.drv' failed to build
error: 1 dependencies of derivation '/nix/store/zg4xlklbw2n2sh51d3ayzifcn9fqyv75-home-manager-generation.drv' failed to build
johnson@Johnsons-MacBook-Air dotfiles %

https://github.com/dustinlyons/nixos-config/issues/30 https://github.com/NixOS/nixpkgs/issues/267685

WilliamHsieh commented 3 months ago

seems like a bug from nix == 2.18.0

https://github.com/NixOS/nix/issues/9052#issuecomment-1740111801