Skip to content

nixVersions.nix_2_26: cross-compiled nix fails to evaluate #381952

@jmbaur

Description

@jmbaur

Nixpkgs version

  • Unstable (25.05)

Describe the bug

Cross-compiled nix fails to evaluate

Steps to reproduce

sh-5.2$ nix eval github:nixos/nixpkgs/451b0d33a79cfa63b5c4ca76b5dfe6d9d546d7a6#nixVersions.nix_2_26
«derivation /nix/store/138iqr1slvczk3y790ppxvizw8412yfq-nix-2.26.1.drv»
sh-5.2$ nix eval github:nixos/nixpkgs/451b0d33a79cfa63b5c4ca76b5dfe6d9d546d7a6#pkgsCross.aarch64-multiplatform.nixVersions.nix_2_26
error:
       … while calling a functor (an attribute set with a '__functor' attribute)
         at /nix/store/5ci04l7ljffh6pimh2pxwqz83q8845gh-source/lib/customisation.nix:306:7:
          305|     if missingArgs == { } then
          306|       makeOverridable f allArgs
             |       ^
          307|     # This needs to be an abort so it can't be caught with `builtins.tryEval`,

       … while evaluating a branch condition
         at /nix/store/5ci04l7ljffh6pimh2pxwqz83q8845gh-source/lib/customisation.nix:173:7:
          172|       in
          173|       if isAttrs result then
             |       ^
          174|         result

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

       error: attribute should be found

Expected behaviour

Eval succeeds

System metadata

sh-5.2$ nix-shell -p nix-info --run "nix-info -m"
unpacking 'https://github.com/nixos/nixpkgs/archive/nixos-unstable.tar.gz' into the Git cache...
 - system: `"x86_64-linux"`
 - host os: `Linux 6.12.12, NixOS, 25.05 (Warbler), 25.05.20250214.2699d76`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.25.5`
 - nixpkgs: `/nix/store/brjzz8wv5k09bq0yrvhc1j4hd8677k21-source`

Notify maintainers

@roberth

Note for maintainers: Please tag this issue in your pull request description. (i.e. Resolves #ISSUE.)

I assert that this issue is relevant for Nixpkgs

Is this issue important to you?

Add a 👍 reaction to issues you find important.

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: bugSomething is broken6.topic: cross-compilationBuilding packages on a different platform than they will be used on

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions