mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-20 04:19:00 +02:00
bintools-wrapper, cc-wrapper, stdenv: infer propagateDoc automatically
02c09e0171
(NixOS/nixpkgs#44558) was reverted inc981787db9
but, as it turns out, it fixed an issue I didn't know about at the time: the values of `propagateDoc` options were (and now again are) inconsistent with the underlying things those wrappers wrap (see NixOS/nixpkgs#46119), which was (and now is) likely to produce more instances of NixOS/nixpkgs#43547, if not now, then eventually as stdenv changes. This patch (which is a simplified version of the original reverted patch) is the simplest solution to this whole thing: it forces wrappers to directly inspect the outputs of the things they are wrapping instead of making stdenv guess the correct values.
This commit is contained in:
parent
56853dc6d8
commit
b2c7a5a271
|
@ -6,9 +6,10 @@
|
||||||
# compiler and the linker just "work".
|
# compiler and the linker just "work".
|
||||||
|
|
||||||
{ name ? ""
|
{ name ? ""
|
||||||
, stdenvNoCC, nativeTools, propagateDoc ? !nativeTools, noLibc ? false, nativeLibc, nativePrefix ? ""
|
, stdenvNoCC
|
||||||
, bintools ? null, libc ? null
|
, bintools ? null, libc ? null, coreutils ? null, shell ? stdenvNoCC.shell, gnugrep ? null
|
||||||
, coreutils ? null, shell ? stdenvNoCC.shell, gnugrep ? null
|
, nativeTools, noLibc ? false, nativeLibc, nativePrefix ? ""
|
||||||
|
, propagateDoc ? bintools != null && bintools ? man
|
||||||
, extraPackages ? [], extraBuildCommands ? ""
|
, extraPackages ? [], extraBuildCommands ? ""
|
||||||
, buildPackages ? {}
|
, buildPackages ? {}
|
||||||
, useMacosReexportHack ? false
|
, useMacosReexportHack ? false
|
||||||
|
|
|
@ -6,8 +6,10 @@
|
||||||
# compiler and the linker just "work".
|
# compiler and the linker just "work".
|
||||||
|
|
||||||
{ name ? ""
|
{ name ? ""
|
||||||
, stdenvNoCC, nativeTools, propagateDoc ? !nativeTools, noLibc ? false, nativeLibc, nativePrefix ? ""
|
, stdenvNoCC
|
||||||
, cc ? null, libc ? null, bintools, coreutils ? null, shell ? stdenvNoCC.shell
|
, cc ? null, libc ? null, bintools, coreutils ? null, shell ? stdenvNoCC.shell
|
||||||
|
, nativeTools, noLibc ? false, nativeLibc, nativePrefix ? ""
|
||||||
|
, propagateDoc ? cc != null && cc ? man
|
||||||
, extraPackages ? [], extraBuildCommands ? ""
|
, extraPackages ? [], extraBuildCommands ? ""
|
||||||
, isGNU ? false, isClang ? cc.isClang or false, gnugrep ? null
|
, isGNU ? false, isClang ? cc.isClang or false, gnugrep ? null
|
||||||
, buildPackages ? {}
|
, buildPackages ? {}
|
||||||
|
|
|
@ -88,7 +88,6 @@ in rec {
|
||||||
extraPackages = lib.optional (libcxx != null) libcxx;
|
extraPackages = lib.optional (libcxx != null) libcxx;
|
||||||
|
|
||||||
nativeTools = false;
|
nativeTools = false;
|
||||||
propagateDoc = false;
|
|
||||||
nativeLibc = false;
|
nativeLibc = false;
|
||||||
inherit buildPackages coreutils gnugrep bintools;
|
inherit buildPackages coreutils gnugrep bintools;
|
||||||
libc = last.pkgs.darwin.Libsystem;
|
libc = last.pkgs.darwin.Libsystem;
|
||||||
|
|
|
@ -92,7 +92,6 @@ let
|
||||||
else lib.makeOverridable (import ../../build-support/cc-wrapper) {
|
else lib.makeOverridable (import ../../build-support/cc-wrapper) {
|
||||||
name = "${name}-gcc-wrapper";
|
name = "${name}-gcc-wrapper";
|
||||||
nativeTools = false;
|
nativeTools = false;
|
||||||
propagateDoc = false;
|
|
||||||
nativeLibc = false;
|
nativeLibc = false;
|
||||||
buildPackages = lib.optionalAttrs (prevStage ? stdenv) {
|
buildPackages = lib.optionalAttrs (prevStage ? stdenv) {
|
||||||
inherit (prevStage) stdenv;
|
inherit (prevStage) stdenv;
|
||||||
|
|
Loading…
Reference in a new issue