Skip to content

OUT_PATHS in post-build-hook no longer populated for successful rebuilds #14287

@raboof

Description

@raboof

Describe the bug

As part of https://github.com/JulienMalka/lila, we have a post-build-hook that posts an attestation of the build to the hash collection service. Since a recent nixpkgs update, this doesn't work for me anymore. I haven't properly bisected yet, but it seems it still worked on nix 2.29.2 and fails on nix 2.30.3

Steps To Reproduce

  • register a post-build-hook that prints the OUT_PATHS environment variable
  • nix-build '<nixpkgs>' -A nethogs --no-out-link; nix-build '<nixpkgs>' -A nethogs --check --no-out-link or nix build nixpkgs#nethogs; nix build nixpkgs#nethogs --rebuild.

The post-build-hook is called for the rebuild, but OUT_PATHS appears to be unset

Expected behavior

The post-build-hook should be called for the rebuild with OUT_PATHS pointing to the out paths

Metadata

nix-env (Nix) 2.31.2

Also verified it exists on Nix 2.32pre20250919_07b96c1d

Additional context

This is on nixos. Issue in lila is JulienMalka/lila#66 .

#13802 looks potentially related but isn't in 2.31.2 yet so that's unlikely to be it.

Maybe #13769?

Checklist


Add 👍 to issues you find important.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions