Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stdenv: Validate meta.outputsToInstall #46834

Merged
merged 2 commits into from
Sep 18, 2018

Commits on Sep 18, 2018

  1. stdenv: Validate meta.outputsToInstall

    If meta.outputsToInstall is set to include absent outputs, various
    tools break including channel updates and nix-env.
    
        grahamc@Morbo> nix-env -i -f . -A elf-header-real
        installing 'elf-header'
        error: this derivation has bad 'meta.outputsToInstall'
    
    This patch verifies each value in meta.outputsToInstall is a valid
    output. It validates this condition only if checkMeta is true.
    
        grahamc@Morbo> nix-build . -A elf-header-real
        error: Package ‘elf-header’ in /home/grahamc/projects/nixpkgs/pkgs/development/libraries/elf-header/default.nix:36 has invalid meta.outputsToInstall, refusing to evaluate.
    
        The package elf-header has set meta.outputsToInstall to: bin
    
        however elf-header only has the outputs: out
    
        and is missing the following ouputs:
    
          - bin
    
        (use '--show-trace' to show detailed location information)
    
    Note, now the nix-env experience is decidedly worse for users who have
    checkMeta set to true:
    
        grahamc@Morbo> nix-env -i -f . -A elf-header-real; echo $?
        0
    
    though since this is already an issue for unfree, broken, unsupported,
    and insecure validity problems I'm not sure we should do something
    different here.
    grahamc committed Sep 18, 2018
    Configuration menu
    Copy the full SHA
    b80c9ce View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    301109a View commit details
    Browse the repository at this point in the history