nixpkgs icon indicating copy to clipboard operation
nixpkgs copied to clipboard

nvtop fails to build on x86_64

Open siflfran opened this issue 2 years ago • 0 comments

Describe the bug

nvtop fails to build/install with the following error:

building the system configuration...
error:
       … while calling the 'head' builtin
         at /nix/store/y9a7ddwphv3vc9rz3h2qhq21nl0z6r57-source/lib/attrsets.nix:1574:11:
         1573|         || pred here (elemAt values 1) (head values) then
         1574|           head values
             |           ^
         1575|         else

       … while evaluating the attribute 'value'
         at /nix/store/y9a7ddwphv3vc9rz3h2qhq21nl0z6r57-source/lib/modules.nix:816:9:
          815|     in warnDeprecation opt //
          816|       { value = addErrorContext "while evaluating the option `${showOption loc}':" value;
             |         ^
          817|         inherit (res.defsFinal') highestPrio;

       … while evaluating the option `system.build.toplevel':

       … while evaluating definitions from `/nix/store/y9a7ddwphv3vc9rz3h2qhq21nl0z6r57-source/nixos/modules/system/activation/top-level.nix':

       … while evaluating the option `system.systemBuilderArgs':

       … while evaluating definitions from `/nix/store/y9a7ddwphv3vc9rz3h2qhq21nl0z6r57-source/nixos/modules/system/activation/activatable-system.nix':

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

       … while evaluating definitions from `/nix/store/y9a7ddwphv3vc9rz3h2qhq21nl0z6r57-source/nixos/modules/system/etc/etc-activation.nix':

       … while evaluating definitions from `/nix/store/y9a7ddwphv3vc9rz3h2qhq21nl0z6r57-source/nixos/modules/system/etc/etc.nix':

       … while evaluating the option `environment.etc.dbus-1.source':

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

       error: Package ‘nvtop-3.1.0’ in /nix/store/y9a7ddwphv3vc9rz3h2qhq21nl0z6r57-source/pkgs/tools/system/nvtop/build-nvtop.nix:93 is not available on the requested hostPlatform:
         hostPlatform.config = "x86_64-unknown-linux-gnu"
         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.

Steps To Reproduce

  1. Add the following snippet to configuration.nix
  environment.systemPackages = with pkgs; [
    nvtopPackages.amd
  ];
  1. nixos-rebuild switch …

Expected behavior

nixos-rebuild switch does not abort with an error when I add nvtopPackages.amd to systemPackages.

Metadata

 - system: `"x86_64-linux"`
 - host os: `Linux 6.12.0, NixOS, 25.05 (Warbler), 25.05.20241122.a25e476`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.24.10`
 - channels(…): `"home-manager, nixgl, nixpkgs"`
 - channels(root): `"nixos"`
 - nixpkgs: `/home/…/.nix-defexpr/channels/nixpkgs`

Notify maintainers

@WilliButz @anthonyroussel @gbtb


Note for maintainers: Please tag this issue in your PR.


Add a :+1: reaction to issues you find important.

siflfran avatar Nov 23 '24 09:11 siflfran