Merge pull request #47233 from oxij/tree/mass-rebuild-noop-cleanups

treewide: mass rebuild noop cleanups
This commit is contained in:
John Ericson 2018-09-25 00:04:52 -04:00 committed by GitHub
commit 2b4b7d4ef3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 21 additions and 37 deletions

View File

@ -6,9 +6,10 @@
# compiler and the linker just "work".
{ name ? ""
, stdenvNoCC, nativeTools, propagateDoc ? !nativeTools, noLibc ? false, nativeLibc, nativePrefix ? ""
, bintools ? null, libc ? null
, coreutils ? null, shell ? stdenvNoCC.shell, gnugrep ? null
, stdenvNoCC
, bintools ? null, libc ? null, coreutils ? null, shell ? stdenvNoCC.shell, gnugrep ? null
, nativeTools, noLibc ? false, nativeLibc, nativePrefix ? ""
, propagateDoc ? bintools != null && bintools ? man
, extraPackages ? [], extraBuildCommands ? ""
, buildPackages ? {}
, useMacosReexportHack ? false

View File

@ -6,8 +6,10 @@
# compiler and the linker just "work".
{ name ? ""
, stdenvNoCC, nativeTools, propagateDoc ? !nativeTools, noLibc ? false, nativeLibc, nativePrefix ? ""
, stdenvNoCC
, cc ? null, libc ? null, bintools, coreutils ? null, shell ? stdenvNoCC.shell
, nativeTools, noLibc ? false, nativeLibc, nativePrefix ? ""
, propagateDoc ? cc != null && cc ? man
, extraPackages ? [], extraBuildCommands ? ""
, isGNU ? false, isClang ? cc.isClang or false, gnugrep ? null
, buildPackages ? {}

View File

@ -217,9 +217,7 @@ stdenv.mkDerivation ({
++ (optional hostPlatform.isDarwin targetPackages.stdenv.cc.bintools)
;
# TODO: Use optionalString with next rebuild.
${if (stdenv.cc.isClang && langFortran) then "NIX_CFLAGS_COMPILE" else null} = "-Wno-unused-command-line-argument";
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString (stdenv.cc.isClang && langFortran) "-Wno-unused-command-line-argument";
NIX_LDFLAGS = stdenv.lib.optionalString hostPlatform.isSunOS "-lm -ldl";
preConfigure = stdenv.lib.optionalString (hostPlatform.isSunOS && hostPlatform.is64bit) ''

View File

@ -10,11 +10,9 @@ stdenv.mkDerivation rec {
export LIBCXXABI_INCLUDE_DIR="$PWD/$(ls -d libcxxabi-${version}*)/include"
'';
# on next rebuild, this can be replaced with optionals; for now set to null to avoid
# patches = stdenv.lib.optionals stdenv.hostPlatform.isMusl [
patches = if stdenv.hostPlatform.isMusl then [
patches = stdenv.lib.optionals stdenv.hostPlatform.isMusl [
../../libcxx-0001-musl-hacks.patch
] else null;
];
prePatch = ''
substituteInPlace lib/CMakeLists.txt --replace "/usr/lib/libc++" "\''${LIBCXX_LIBCXXABI_LIB_PATH}/libc++"

View File

@ -10,11 +10,9 @@ stdenv.mkDerivation rec {
export LIBCXXABI_INCLUDE_DIR="$PWD/$(ls -d libcxxabi-${version}*)/include"
'';
# on next rebuild, this can be replaced with optionals; for now set to null to avoid
# patches = stdenv.lib.optionals stdenv.hostPlatform.isMusl [
patches = if stdenv.hostPlatform.isMusl then [
patches = stdenv.lib.optionals stdenv.hostPlatform.isMusl [
../../libcxx-0001-musl-hacks.patch
] else null;
];
prePatch = ''
substituteInPlace lib/CMakeLists.txt --replace "/usr/lib/libc++" "\''${LIBCXX_LIBCXXABI_LIB_PATH}/libc++"

View File

@ -1,6 +1,6 @@
{stdenv, fetchurl}:
stdenv.mkDerivation (rec {
stdenv.mkDerivation rec {
name = "libdaemon-0.14";
src = fetchurl {
@ -8,6 +8,8 @@ stdenv.mkDerivation (rec {
sha256 = "0d5qlq5ab95wh1xc87rqrh1vx6i8lddka1w3f1zcqvcqdxgyn8zx";
};
patches = [ ./fix-includes.patch ];
configureFlags = [ "--disable-lynx" ]
++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform)
[ # Can't run this test while cross-compiling
@ -16,16 +18,8 @@ stdenv.mkDerivation (rec {
meta = {
description = "Lightweight C library that eases the writing of UNIX daemons";
homepage = http://0pointer.de/lennart/projects/libdaemon/;
license = stdenv.lib.licenses.lgpl2Plus;
platforms = stdenv.lib.platforms.unix;
maintainers = [ ];
};
} // stdenv.lib.optionalAttrs stdenv.hostPlatform.isMusl {
# This patch should be applied unconditionally, but doing so will cause mass rebuild.
patches = ./fix-includes.patch;
})
}

View File

@ -22,10 +22,9 @@ stdenv.mkDerivation rec {
unset CPP
'';
# Use `lib.optionalString` next mass rebuild.
makeFlags = if stdenv.buildPlatform == stdenv.hostPlatform
then null
else "CROSS_COMPILE=${stdenv.cc.targetPrefix}";
makeFlags = stdenv.lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
"CROSS_COMPILE=${stdenv.cc.targetPrefix}"
];
meta = with stdenv.lib; {
homepage = https://fedorahosted.org/newt/;

View File

@ -19,7 +19,6 @@ stdenv.mkDerivation rec {
patches = optional (!vanilla) ./requires-private.patch
++ optional stdenv.isCygwin ./2.36.3-not-win32.patch;
preConfigure = ""; # TODO(@Ericson2314): Remove next mass rebuild
buildInputs = optional (stdenv.isCygwin || stdenv.isDarwin || stdenv.isSunOS) libiconv;
configureFlags = [ "--with-internal-glib" ]

View File

@ -17,8 +17,7 @@ stdenv.mkDerivation rec {
inherit sha256;
};
# TODO: fix on mass rebuild
${if interactive then "patches" else null} = optional (version == "6.5") ./perl.patch;
patches = optional (version == "6.5") ./perl.patch;
# We need a native compiler to build perl XS extensions
# when cross-compiling.

View File

@ -3,7 +3,7 @@
}:
let
common = { version, sha256, patches ? null }: stdenvNoCC.mkDerivation {
common = { version, sha256, patches ? [] }: stdenvNoCC.mkDerivation {
name = "linux-headers-${version}";
src = fetchurl {
@ -20,8 +20,6 @@ let
extraIncludeDirs = lib.optional stdenvNoCC.hostPlatform.isPowerPC ["ppc"];
# "patches" array defaults to 'null' to avoid changing hash
# and causing mass rebuild
inherit patches;
buildPhase = ''

View File

@ -88,7 +88,6 @@ in rec {
extraPackages = lib.optional (libcxx != null) libcxx;
nativeTools = false;
propagateDoc = false;
nativeLibc = false;
inherit buildPackages coreutils gnugrep bintools;
libc = last.pkgs.darwin.Libsystem;

View File

@ -92,7 +92,6 @@ let
else lib.makeOverridable (import ../../build-support/cc-wrapper) {
name = "${name}-gcc-wrapper";
nativeTools = false;
propagateDoc = false;
nativeLibc = false;
buildPackages = lib.optionalAttrs (prevStage ? stdenv) {
inherit (prevStage) stdenv;