Merge pull request #230548 from panicgh/remove-old-boost

boost: remove unused pkgs and cleanup
This commit is contained in:
Weijia Wang 2023-05-08 11:35:59 +03:00 committed by GitHub
commit f7b1497128
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 7 additions and 96 deletions

View file

@ -1,23 +0,0 @@
{ callPackage, fetchurl, fetchpatch, ... } @ args:
callPackage ./generic.nix (args // rec {
version = "1.59.0";
boostBuildPatches = [
# Fixes a segfault on aarch64-darwin from an implicitly defined varargs function.
# https://github.com/boostorg/build/pull/238
(fetchpatch {
url = "https://github.com/boostorg/build/commit/48e9017139dd94446633480661e5447c7e0d8b1b.diff";
excludes = [
# Doesn't apply, isn't critical.
"src/engine/filesys.h"
];
sha256 = "sha256-/HLOJKBcGqcK9yBYKSRCSMmTNhCH3sSpK1s3OzkIqx8";
})
];
src = fetchurl {
url = "mirror://sourceforge/boost/boost_${builtins.replaceStrings ["."] ["_"] version}.tar.bz2";
sha256 = "1jj1aai5rdmd72g90a3pd8sw9vi32zad46xv5av8fhnr48ir6ykj";
};
})

View file

@ -1,11 +0,0 @@
{ callPackage, fetchurl, ... } @ args:
callPackage ./generic.nix (args // rec {
version = "1.60.0";
src = fetchurl {
url = "mirror://sourceforge/boost/boost_${builtins.replaceStrings ["."] ["_"] version}.tar.bz2";
sha256 = "0fzx6dwqbrkd4bcd8pjv0fpapwmrxxwr8yx9g67lihlsk3zzysk8";
};
})

View file

@ -1,12 +0,0 @@
{ callPackage, fetchurl, ... } @ args:
callPackage ./generic.nix (args // rec {
version = "1.65.1";
src = fetchurl {
url = "mirror://sourceforge/boost/boost_${builtins.replaceStrings ["."] ["_"] version}.tar.bz2";
# SHA256 from http://www.boost.org/users/history/version_1_65_1.html
sha256 = "9807a5d16566c57fd74fb522764e0b134a8bbe6b6e8967b83afefd30dcd3be81";
};
})

View file

@ -1,11 +0,0 @@
{ callPackage, fetchurl, ... } @ args:
callPackage ./generic.nix (args // rec {
version = "1.66.0";
src = fetchurl {
url = "mirror://sourceforge/boost/boost_${builtins.replaceStrings ["."] ["_"] version}.tar.bz2";
# SHA256 from http://www.boost.org/users/history/version_1_66_0.html
sha256 = "5721818253e6a0989583192f96782c4a98eb6204965316df9f5ad75819225ca9";
};
})

View file

@ -16,13 +16,9 @@ let
} }
); );
in { in {
boost165 = makeBoost ./1.65.nix;
boost166 = makeBoost ./1.66.nix;
boost167 = makeBoost ./1.67.nix;
boost168 = makeBoost ./1.68.nix; boost168 = makeBoost ./1.68.nix;
boost169 = makeBoost ./1.69.nix; boost169 = makeBoost ./1.69.nix;
boost170 = makeBoost ./1.70.nix; boost170 = makeBoost ./1.70.nix;
boost171 = makeBoost ./1.71.nix;
boost172 = makeBoost ./1.72.nix; boost172 = makeBoost ./1.72.nix;
boost173 = makeBoost ./1.73.nix; boost173 = makeBoost ./1.73.nix;
boost174 = makeBoost ./1.74.nix; boost174 = makeBoost ./1.74.nix;

View file

@ -53,26 +53,12 @@ let
# To avoid library name collisions # To avoid library name collisions
layout = if taggedLayout then "tagged" else "system"; layout = if taggedLayout then "tagged" else "system";
# Versions of b2 before 1.65 have job limits; specifically:
# - Versions before 1.58 support up to 64 jobs[0]
# - Versions before 1.65 support up to 256 jobs[1]
#
# [0]: https://github.com/boostorg/build/commit/0ef40cb86728f1cd804830fef89a6d39153ff632
# [1]: https://github.com/boostorg/build/commit/316e26ca718afc65d6170029284521392524e4f8
jobs =
if lib.versionOlder version "1.58" then
"$(($NIX_BUILD_CORES<=64 ? $NIX_BUILD_CORES : 64))"
else if lib.versionOlder version "1.65" then
"$(($NIX_BUILD_CORES<=256 ? $NIX_BUILD_CORES : 256))"
else
"$NIX_BUILD_CORES";
needUserConfig = stdenv.hostPlatform != stdenv.buildPlatform || useMpi || (stdenv.isDarwin && enableShared); needUserConfig = stdenv.hostPlatform != stdenv.buildPlatform || useMpi || (stdenv.isDarwin && enableShared);
b2Args = lib.concatStringsSep " " ([ b2Args = lib.concatStringsSep " " ([
"--includedir=$dev/include" "--includedir=$dev/include"
"--libdir=$out/lib" "--libdir=$out/lib"
"-j${jobs}" "-j$NIX_BUILD_CORES"
"--layout=${layout}" "--layout=${layout}"
"variant=${variant}" "variant=${variant}"
"threading=${threading}" "threading=${threading}"
@ -122,22 +108,14 @@ stdenv.mkDerivation {
patches = patches patches = patches
++ lib.optional stdenv.isDarwin ./darwin-no-system-python.patch ++ lib.optional stdenv.isDarwin ./darwin-no-system-python.patch
# Fix boost-context segmentation faults on ppc64 due to ABI violation # Fix boost-context segmentation faults on ppc64 due to ABI violation
++ lib.optional (lib.versionAtLeast version "1.61" && ++ lib.optional (lib.versionOlder version "1.71") (fetchpatch {
lib.versionOlder version "1.71") (fetchpatch {
url = "https://github.com/boostorg/context/commit/2354eca9b776a6739112833f64754108cc0d1dc5.patch"; url = "https://github.com/boostorg/context/commit/2354eca9b776a6739112833f64754108cc0d1dc5.patch";
sha256 = "067m4bjpmcanqvg28djax9a10avmdwhlpfx6gn73kbqqq70dnz29"; sha256 = "067m4bjpmcanqvg28djax9a10avmdwhlpfx6gn73kbqqq70dnz29";
stripLen = 1; stripLen = 1;
extraPrefix = "libs/context/"; extraPrefix = "libs/context/";
}) })
# Fix compiler warning with GCC >= 8; TODO: patch may apply to older versions ++ lib.optional (lib.versionOlder version "1.70") (fetchpatch {
++ lib.optional (lib.versionAtLeast version "1.65" && lib.versionOlder version "1.67") # support for Mips64n64 appeared in boost-context 1.70
(fetchpatch {
url = "https://github.com/boostorg/mpl/commit/f48fd09d021db9a28bd7b8452c175897e1af4485.patch";
sha256 = "15d2a636hhsb1xdyp44x25dyqfcaws997vnp9kl1mhzvxjzz7hb0";
stripLen = 1;
})
++ lib.optional (lib.versionAtLeast version "1.65" && lib.versionOlder version "1.70") (fetchpatch {
# support for Mips64n64 appeared in boost-context 1.70; this patch won't apply to pre-1.65 cleanly
url = "https://github.com/boostorg/context/commit/e3f744a1862164062d579d1972272d67bdaa9c39.patch"; url = "https://github.com/boostorg/context/commit/e3f744a1862164062d579d1972272d67bdaa9c39.patch";
sha256 = "sha256-qjQy1b4jDsIRrI+UYtcguhvChrMbGWO0UlEzEJHYzRI="; sha256 = "sha256-qjQy1b4jDsIRrI+UYtcguhvChrMbGWO0UlEzEJHYzRI=";
stripLen = 1; stripLen = 1;
@ -156,18 +134,14 @@ stdenv.mkDerivation {
description = "Collection of C++ libraries"; description = "Collection of C++ libraries";
license = licenses.boost; license = licenses.boost;
platforms = platforms.unix ++ platforms.windows; platforms = platforms.unix ++ platforms.windows;
badPlatforms = optional (versionOlder version "1.59") "aarch64-linux" badPlatforms = optionals (versionOlder version "1.73") platforms.riscv;
++ optional ((versionOlder version "1.57") || version == "1.58") "x86_64-darwin"
++ optionals (versionOlder version "1.73") platforms.riscv;
maintainers = with maintainers; [ hjones2199 ]; maintainers = with maintainers; [ hjones2199 ];
broken = broken =
# boost-context lacks support for the N32 ABI on mips64. The build # boost-context lacks support for the N32 ABI on mips64. The build
# will succeed, but packages depending on boost-context will fail with # will succeed, but packages depending on boost-context will fail with
# a very cryptic error message. # a very cryptic error message.
stdenv.hostPlatform.isMips64n32 || stdenv.hostPlatform.isMips64n32;
# the patch above does not apply cleanly to pre-1.65 boost
(stdenv.hostPlatform.isMips64n64 && (versionOlder version "1.65"));
}; };
passthru = { passthru = {
@ -227,7 +201,7 @@ stdenv.mkDerivation {
++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
buildInputs = [ expat zlib bzip2 libiconv ] buildInputs = [ expat zlib bzip2 libiconv ]
++ lib.optional (lib.versionAtLeast version "1.69") zstd ++ lib.optional (lib.versionAtLeast version "1.69") zstd
++ lib.optional (lib.versionAtLeast version "1.65") xz ++ [ xz ]
++ lib.optional enableIcu icu ++ lib.optional enableIcu icu
++ lib.optionals enablePython [ libxcrypt python ] ++ lib.optionals enablePython [ libxcrypt python ]
++ lib.optional enableNumpy python.pkgs.numpy; ++ lib.optional enableNumpy python.pkgs.numpy;

View file

@ -19586,8 +19586,6 @@ with pkgs;
boolstuff = callPackage ../development/libraries/boolstuff { }; boolstuff = callPackage ../development/libraries/boolstuff { };
inherit (callPackage ../development/libraries/boost { inherit (buildPackages) boost-build; }) inherit (callPackage ../development/libraries/boost { inherit (buildPackages) boost-build; })
boost165
boost166
boost168 boost168
boost169 boost169
boost170 boost170