Skip to content

Conversation

@xokdvium
Copy link
Contributor

@xokdvium xokdvium commented Dec 1, 2025

Motivation

25.11 is out and we should follow suit.

Context


Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

@xokdvium xokdvium requested a review from edolstra as a code owner December 1, 2025 23:32
@github-actions github-actions bot added the with-tests Issues related to testing. PRs with tests have some priority label Dec 1, 2025
@Radvendii Radvendii self-assigned this Dec 2, 2025
@Radvendii
Copy link
Contributor

Nixpkgs changed so that separateDebugInfo = true; and setting {dis,}allowed{References,Requisites} now requires __structuredAttrs = true;

When I tried to fix that by setting __structuredAttrs, we get an error about nix not being allowed to refer to store paths. I tracked this down to tests/nixos/functional/common.nix

      system.extraDependencies = [
        (inputDerivation config.nix.package)
      ];

The inputDerivation function is meant to strip disallowedReferences

  # FIXME (roberth) reference issue
  inputDerivation =
    pkg:
    (pkg.overrideAttrs (o: {
      disallowedReferences = [ ];
    })).inputDerivation;

It seems like this is no longer working. I am also seeing

structuredAttrs is incompatible with {dis,}allowed{References,Requisites} which seems possibly related, but doesn't seem to be triggering, as I'm not seeing those warnings.

Things I haven't been able to figure out:

  1. Why are we adding this to extraDependencies?
  2. Where does disallowedReferences get set to non-empty value to begin with?

@Radvendii
Copy link
Contributor

This update also seems to make clangd dysfunctional. Still investingating...

@Radvendii
Copy link
Contributor

I can reproduce the __structuredAttrs allowedReferences error with the following:

(pkgs.hello.overrideAttrs {
  __structuredAttrs = true;
}).inputDerivation

This complains about the output not being allowed to refer to output paths.

I was suspicious of allowedReferences = null; in the implementation of inputDerivation, so I tried

let 
  __structuredAttrs = true;
in
  derivation ({
    inherit __structuredAttrs;
    system = "x86_64-linux";

    name = "test";
    outputs = [ "out" ];
    builder = pkgs.stdenv.shell;
    args = [
      "-c"
      ''
        out="${placeholder "out"}"
        echo "$out" > $out
      ''
    ];
  } // (
      let
        sharedOutputChecks = {
          allowedReferences = null;
        };
      in
      if __structuredAttrs then
        {
          outputChecks.out = sharedOutputChecks;
        }
      else
        sharedOutputChecks
    )
  )

And it does give the same error!

...But also it gives the same error when __structuredAttrs = false;, which hello.inputDerivation does not.

@edolstra
Copy link
Member

edolstra commented Dec 3, 2025

Created a Hydra jobset for this: https://hydra.nixos.org/jobset/nix/pr-14688

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

with-tests Issues related to testing. PRs with tests have some priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants