Merge pull request #47233 from oxij/tree/mass-rebuild-noop-cleanups
treewide: mass rebuild noop cleanups
This commit is contained in:
commit
2b4b7d4ef3
@ -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 ? {}
|
||||||
|
@ -217,9 +217,7 @@ stdenv.mkDerivation ({
|
|||||||
++ (optional hostPlatform.isDarwin targetPackages.stdenv.cc.bintools)
|
++ (optional hostPlatform.isDarwin targetPackages.stdenv.cc.bintools)
|
||||||
;
|
;
|
||||||
|
|
||||||
# TODO: Use optionalString with next rebuild.
|
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString (stdenv.cc.isClang && langFortran) "-Wno-unused-command-line-argument";
|
||||||
${if (stdenv.cc.isClang && langFortran) then "NIX_CFLAGS_COMPILE" else null} = "-Wno-unused-command-line-argument";
|
|
||||||
|
|
||||||
NIX_LDFLAGS = stdenv.lib.optionalString hostPlatform.isSunOS "-lm -ldl";
|
NIX_LDFLAGS = stdenv.lib.optionalString hostPlatform.isSunOS "-lm -ldl";
|
||||||
|
|
||||||
preConfigure = stdenv.lib.optionalString (hostPlatform.isSunOS && hostPlatform.is64bit) ''
|
preConfigure = stdenv.lib.optionalString (hostPlatform.isSunOS && hostPlatform.is64bit) ''
|
||||||
|
@ -10,11 +10,9 @@ stdenv.mkDerivation rec {
|
|||||||
export LIBCXXABI_INCLUDE_DIR="$PWD/$(ls -d libcxxabi-${version}*)/include"
|
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 = stdenv.lib.optionals stdenv.hostPlatform.isMusl [
|
|
||||||
patches = if stdenv.hostPlatform.isMusl then [
|
|
||||||
../../libcxx-0001-musl-hacks.patch
|
../../libcxx-0001-musl-hacks.patch
|
||||||
] else null;
|
];
|
||||||
|
|
||||||
prePatch = ''
|
prePatch = ''
|
||||||
substituteInPlace lib/CMakeLists.txt --replace "/usr/lib/libc++" "\''${LIBCXX_LIBCXXABI_LIB_PATH}/libc++"
|
substituteInPlace lib/CMakeLists.txt --replace "/usr/lib/libc++" "\''${LIBCXX_LIBCXXABI_LIB_PATH}/libc++"
|
||||||
|
@ -10,11 +10,9 @@ stdenv.mkDerivation rec {
|
|||||||
export LIBCXXABI_INCLUDE_DIR="$PWD/$(ls -d libcxxabi-${version}*)/include"
|
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 = stdenv.lib.optionals stdenv.hostPlatform.isMusl [
|
|
||||||
patches = if stdenv.hostPlatform.isMusl then [
|
|
||||||
../../libcxx-0001-musl-hacks.patch
|
../../libcxx-0001-musl-hacks.patch
|
||||||
] else null;
|
];
|
||||||
|
|
||||||
prePatch = ''
|
prePatch = ''
|
||||||
substituteInPlace lib/CMakeLists.txt --replace "/usr/lib/libc++" "\''${LIBCXX_LIBCXXABI_LIB_PATH}/libc++"
|
substituteInPlace lib/CMakeLists.txt --replace "/usr/lib/libc++" "\''${LIBCXX_LIBCXXABI_LIB_PATH}/libc++"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{stdenv, fetchurl}:
|
{stdenv, fetchurl}:
|
||||||
|
|
||||||
stdenv.mkDerivation (rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "libdaemon-0.14";
|
name = "libdaemon-0.14";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
@ -8,6 +8,8 @@ stdenv.mkDerivation (rec {
|
|||||||
sha256 = "0d5qlq5ab95wh1xc87rqrh1vx6i8lddka1w3f1zcqvcqdxgyn8zx";
|
sha256 = "0d5qlq5ab95wh1xc87rqrh1vx6i8lddka1w3f1zcqvcqdxgyn8zx";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = [ ./fix-includes.patch ];
|
||||||
|
|
||||||
configureFlags = [ "--disable-lynx" ]
|
configureFlags = [ "--disable-lynx" ]
|
||||||
++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform)
|
++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform)
|
||||||
[ # Can't run this test while cross-compiling
|
[ # Can't run this test while cross-compiling
|
||||||
@ -16,16 +18,8 @@ stdenv.mkDerivation (rec {
|
|||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "Lightweight C library that eases the writing of UNIX daemons";
|
description = "Lightweight C library that eases the writing of UNIX daemons";
|
||||||
|
|
||||||
homepage = http://0pointer.de/lennart/projects/libdaemon/;
|
homepage = http://0pointer.de/lennart/projects/libdaemon/;
|
||||||
|
|
||||||
license = stdenv.lib.licenses.lgpl2Plus;
|
license = stdenv.lib.licenses.lgpl2Plus;
|
||||||
|
|
||||||
platforms = stdenv.lib.platforms.unix;
|
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;
|
|
||||||
})
|
|
||||||
|
|
||||||
|
@ -22,10 +22,9 @@ stdenv.mkDerivation rec {
|
|||||||
unset CPP
|
unset CPP
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Use `lib.optionalString` next mass rebuild.
|
makeFlags = stdenv.lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
|
||||||
makeFlags = if stdenv.buildPlatform == stdenv.hostPlatform
|
"CROSS_COMPILE=${stdenv.cc.targetPrefix}"
|
||||||
then null
|
];
|
||||||
else "CROSS_COMPILE=${stdenv.cc.targetPrefix}";
|
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
homepage = https://fedorahosted.org/newt/;
|
homepage = https://fedorahosted.org/newt/;
|
||||||
|
@ -19,7 +19,6 @@ stdenv.mkDerivation rec {
|
|||||||
patches = optional (!vanilla) ./requires-private.patch
|
patches = optional (!vanilla) ./requires-private.patch
|
||||||
++ optional stdenv.isCygwin ./2.36.3-not-win32.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;
|
buildInputs = optional (stdenv.isCygwin || stdenv.isDarwin || stdenv.isSunOS) libiconv;
|
||||||
|
|
||||||
configureFlags = [ "--with-internal-glib" ]
|
configureFlags = [ "--with-internal-glib" ]
|
||||||
|
@ -17,8 +17,7 @@ stdenv.mkDerivation rec {
|
|||||||
inherit sha256;
|
inherit sha256;
|
||||||
};
|
};
|
||||||
|
|
||||||
# TODO: fix on mass rebuild
|
patches = optional (version == "6.5") ./perl.patch;
|
||||||
${if interactive then "patches" else null} = optional (version == "6.5") ./perl.patch;
|
|
||||||
|
|
||||||
# We need a native compiler to build perl XS extensions
|
# We need a native compiler to build perl XS extensions
|
||||||
# when cross-compiling.
|
# when cross-compiling.
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
common = { version, sha256, patches ? null }: stdenvNoCC.mkDerivation {
|
common = { version, sha256, patches ? [] }: stdenvNoCC.mkDerivation {
|
||||||
name = "linux-headers-${version}";
|
name = "linux-headers-${version}";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
@ -20,8 +20,6 @@ let
|
|||||||
|
|
||||||
extraIncludeDirs = lib.optional stdenvNoCC.hostPlatform.isPowerPC ["ppc"];
|
extraIncludeDirs = lib.optional stdenvNoCC.hostPlatform.isPowerPC ["ppc"];
|
||||||
|
|
||||||
# "patches" array defaults to 'null' to avoid changing hash
|
|
||||||
# and causing mass rebuild
|
|
||||||
inherit patches;
|
inherit patches;
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
|
@ -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…
x
Reference in New Issue
Block a user