nixpkgs/pkgs/stdenv
Graham Christensen b80c9ce4a9
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.
2018-09-18 10:38:44 -04:00
..
cross treewide: Remove usage of remaining redundant platform compatability stuff 2018-08-30 17:20:32 -04:00
custom top-level: {build,host,target}Platform are defined in the stdenv instead 2017-07-07 12:55:02 -04:00
cygwin Fix invalid Baseaddress must be > 0x200000000 on cygwin 2018-04-14 14:06:09 +02:00
darwin treewide: Remove usage of remaining redundant platform compatability stuff 2018-08-30 17:20:32 -04:00
freebsd fetchurl: cleanup, better errors 2018-02-18 14:24:53 +00:00
generic stdenv: Validate meta.outputsToInstall 2018-09-18 10:38:44 -04:00
linux stdenv: linux: cleanup a bit 2018-09-04 22:04:56 +00:00
native [bot] treewide: remove unused 'inherit' in let blocks 2018-07-20 19:38:19 +00:00
nix cc-wrapper: Use stdenvNoCC to build 2017-09-26 14:08:21 -04:00
adapters.nix stdenv adapter: Keep configureFlags a list 2018-08-03 17:06:03 -04:00
booter.nix treewide: Depend on targetPackages.stdenv.cc.bintools instead of binutils directly 2017-11-05 17:10:53 -05:00
common-path.nix bzip2: split into multiple outputs, refactor 2015-04-18 19:32:52 +02:00
default.nix [RFC] ppc64le enablement (#45340) 2018-08-21 15:31:34 -04:00