From 205c1696b839bad98d3d82903b9a1ff62a879140 Mon Sep 17 00:00:00 2001 From: Emily Date: Sat, 5 Oct 2024 22:36:59 +0100 Subject: [PATCH] treewide: remove obsolete aligned allocation workarounds --- .../networking/ids/zeek/broker/default.nix | 2 -- .../networking/ids/zeek/default.nix | 2 -- pkgs/by-name/ca/caf/package.nix | 2 -- pkgs/by-name/ci/cinny-unwrapped/package.nix | 5 --- pkgs/by-name/lu/luaformatter/package.nix | 4 --- .../matrix-authentication-service/package.nix | 3 -- pkgs/by-name/mo/mold/package.nix | 4 --- pkgs/by-name/na/naja/package.nix | 12 +++---- pkgs/by-name/p2/p2pool/package.nix | 8 ----- pkgs/by-name/re/renovate/package.nix | 9 ++---- pkgs/by-name/ro/rocksdb/package.nix | 6 ---- pkgs/by-name/ro/root/package.nix | 5 --- pkgs/by-name/so/sonic-server/package.nix | 2 -- pkgs/by-name/sp/spades/package.nix | 2 -- pkgs/by-name/tr/tracy/package.nix | 3 -- pkgs/by-name/ue/ueberzugpp/package.nix | 8 ----- pkgs/development/compilers/clasp/default.nix | 3 -- pkgs/development/compilers/halide/default.nix | 32 +++++-------------- .../development/libraries/libfive/default.nix | 13 ++------ pkgs/development/libraries/lief/default.nix | 2 -- .../development/libraries/openvdb/default.nix | 12 ------- .../hacl-star/aligned-alloc.patch | 14 -------- .../ocaml-modules/hacl-star/raw.nix | 4 --- .../python-modules/torch/default.nix | 12 +------ pkgs/servers/mail/mailpit/default.nix | 6 ---- pkgs/servers/monitoring/grafana/default.nix | 12 ++----- pkgs/servers/search/qdrant/default.nix | 12 +++---- pkgs/servers/sql/postgresql/ext/lantern.nix | 3 -- 28 files changed, 25 insertions(+), 177 deletions(-) delete mode 100644 pkgs/development/ocaml-modules/hacl-star/aligned-alloc.patch diff --git a/pkgs/applications/networking/ids/zeek/broker/default.nix b/pkgs/applications/networking/ids/zeek/broker/default.nix index f187f8ef682ca..bd25910195820 100644 --- a/pkgs/applications/networking/ids/zeek/broker/default.nix +++ b/pkgs/applications/networking/ids/zeek/broker/default.nix @@ -86,8 +86,6 @@ stdenv.mkDerivation rec { "-DPY_MOD_INSTALL_DIR=${placeholder "py"}/${python3.sitePackages}/" ]; - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-faligned-allocation"; - meta = with lib; { description = "Zeek's Messaging Library"; mainProgram = "broker-benchmark"; diff --git a/pkgs/applications/networking/ids/zeek/default.nix b/pkgs/applications/networking/ids/zeek/default.nix index 54e8e7022493d..67bf7bbb9b1f0 100644 --- a/pkgs/applications/networking/ids/zeek/default.nix +++ b/pkgs/applications/networking/ids/zeek/default.nix @@ -91,8 +91,6 @@ stdenv.mkDerivation rec { "-DLIBKQUEUE_ROOT_DIR=${libkqueue}" ]; - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-faligned-allocation"; - postInstall = '' for file in $out/share/zeek/base/frameworks/notice/actions/pp-alarms.zeek $out/share/zeek/base/frameworks/notice/main.zeek; do substituteInPlace $file \ diff --git a/pkgs/by-name/ca/caf/package.nix b/pkgs/by-name/ca/caf/package.nix index 4cd5937d2486e..3731792b8b486 100644 --- a/pkgs/by-name/ca/caf/package.nix +++ b/pkgs/by-name/ca/caf/package.nix @@ -25,8 +25,6 @@ stdenv.mkDerivation rec { "-DCAF_ENABLE_EXAMPLES:BOOL=OFF" ]; - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-faligned-allocation"; - doCheck = !stdenv.hostPlatform.isDarwin; checkTarget = "test"; diff --git a/pkgs/by-name/ci/cinny-unwrapped/package.nix b/pkgs/by-name/ci/cinny-unwrapped/package.nix index 35166edf8de65..7705885f36993 100644 --- a/pkgs/by-name/ci/cinny-unwrapped/package.nix +++ b/pkgs/by-name/ci/cinny-unwrapped/package.nix @@ -30,11 +30,6 @@ buildNpmPackage rec { npmDepsHash = "sha256-fDoia6evCmXZgeIKL0coRo3yunX1dfud31ROgmop2Sc="; - # Fix error: no member named 'aligned_alloc' in the global namespace - env.NIX_CFLAGS_COMPILE = lib.optionalString ( - stdenv.hostPlatform.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinSdkVersion "11.0" - ) "-D_LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION=1"; - nativeBuildInputs = [ python3 pkg-config diff --git a/pkgs/by-name/lu/luaformatter/package.nix b/pkgs/by-name/lu/luaformatter/package.nix index ca98f83dc7348..06bded91452f2 100644 --- a/pkgs/by-name/lu/luaformatter/package.nix +++ b/pkgs/by-name/lu/luaformatter/package.nix @@ -38,10 +38,6 @@ stdenv.mkDerivation rec { yaml-cpp ]; - env.NIX_CFLAGS_COMPILE = lib.optionalString ( - stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64 - ) "-D_LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION=1"; - meta = with lib; { description = "Code formatter for Lua"; homepage = "https://github.com/Koihik/LuaFormatter"; diff --git a/pkgs/by-name/ma/matrix-authentication-service/package.nix b/pkgs/by-name/ma/matrix-authentication-service/package.nix index d8eee746d796f..233303caa62a3 100644 --- a/pkgs/by-name/ma/matrix-authentication-service/package.nix +++ b/pkgs/by-name/ma/matrix-authentication-service/package.nix @@ -99,8 +99,5 @@ rustPlatform.buildRustPackage rec { license = lib.licenses.agpl3Only; maintainers = with lib.maintainers; [ teutat3s ]; mainProgram = "mas-cli"; - # Note: broken on x86_64-darwin because of aligned_alloc, can be revisited after - # https://github.com/NixOS/nixpkgs/pull/346043 is merged - badPlatforms = [ "x86_64-darwin" ]; }; } diff --git a/pkgs/by-name/mo/mold/package.nix b/pkgs/by-name/mo/mold/package.nix index 02260e0823ec5..3c134de7ab90c 100644 --- a/pkgs/by-name/mo/mold/package.nix +++ b/pkgs/by-name/mo/mold/package.nix @@ -50,10 +50,6 @@ stdenv.mkDerivation rec { "-DMOLD_USE_SYSTEM_TBB:BOOL=ON" ]; - env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.hostPlatform.isDarwin [ - "-faligned-allocation" - ]); - passthru = { updateScript = nix-update-script { }; tests = diff --git a/pkgs/by-name/na/naja/package.nix b/pkgs/by-name/na/naja/package.nix index 261de178ff20e..a64b60b251309 100644 --- a/pkgs/by-name/na/naja/package.nix +++ b/pkgs/by-name/na/naja/package.nix @@ -51,14 +51,10 @@ stdenv.mkDerivation { tbb_2021_11 ]; - cmakeFlags = - [ - (lib.cmakeBool "CPPTRACE_USE_EXTERNAL_LIBDWARF" true) - (lib.cmakeBool "CPPTRACE_USE_EXTERNAL_ZSTD" true) - ] - ++ lib.optionals stdenv.hostPlatform.isDarwin [ - (lib.cmakeFeature "CMAKE_OSX_DEPLOYMENT_TARGET" "10.14") # For aligned allocation - ]; + cmakeFlags = [ + (lib.cmakeBool "CPPTRACE_USE_EXTERNAL_LIBDWARF" true) + (lib.cmakeBool "CPPTRACE_USE_EXTERNAL_ZSTD" true) + ]; doCheck = true; diff --git a/pkgs/by-name/p2/p2pool/package.nix b/pkgs/by-name/p2/p2pool/package.nix index 489e708cf77b1..3a957b7e0a3d4 100644 --- a/pkgs/by-name/p2/p2pool/package.nix +++ b/pkgs/by-name/p2/p2pool/package.nix @@ -46,14 +46,6 @@ stdenv.mkDerivation rec { cmakeFlags = [ "-DWITH_LTO=OFF" ]; - env.NIX_CFLAGS_COMPILE = toString ( - lib.optionals - (stdenv.hostPlatform.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "10.13") - [ - "-faligned-allocation" - ] - ); - installPhase = '' runHook preInstall diff --git a/pkgs/by-name/re/renovate/package.nix b/pkgs/by-name/re/renovate/package.nix index 81540d0920451..464c1a254cf0f 100644 --- a/pkgs/by-name/re/renovate/package.nix +++ b/pkgs/by-name/re/renovate/package.nix @@ -14,12 +14,7 @@ yq-go, }: -let - # fix build error, `no member named 'aligned_alloc'` on x86_64-darwin - # https://github.com/NixOS/nixpkgs/issues/272156#issuecomment-1839904283 - stdenv' = if stdenv.hostPlatform.isDarwin then overrideSDK stdenv "11.0" else stdenv; -in -stdenv'.mkDerivation (finalAttrs: { +stdenv.mkDerivation (finalAttrs: { pname = "renovate"; version = "39.90.2"; @@ -41,7 +36,7 @@ stdenv'.mkDerivation (finalAttrs: { pnpm_9.configHook python3 yq-go - ] ++ lib.optional stdenv'.hostPlatform.isDarwin xcbuild; + ] ++ lib.optional stdenv.hostPlatform.isDarwin xcbuild; pnpmDeps = pnpm_9.fetchDeps { inherit (finalAttrs) pname version src; diff --git a/pkgs/by-name/ro/rocksdb/package.nix b/pkgs/by-name/ro/rocksdb/package.nix index 70de68530e82c..a6d1d4cc55fe2 100644 --- a/pkgs/by-name/ro/rocksdb/package.nix +++ b/pkgs/by-name/ro/rocksdb/package.nix @@ -56,12 +56,6 @@ stdenv.mkDerivation (finalAttrs: { "tools" ]; - env.NIX_CFLAGS_COMPILE = toString ( - lib.optionals stdenv.cc.isClang [ - "-faligned-allocation" - ] - ); - cmakeFlags = [ "-DPORTABLE=1" "-DWITH_JEMALLOC=${if enableJemalloc then "1" else "0"}" diff --git a/pkgs/by-name/ro/root/package.nix b/pkgs/by-name/ro/root/package.nix index eeac613659951..a1948927f76a8 100644 --- a/pkgs/by-name/ro/root/package.nix +++ b/pkgs/by-name/ro/root/package.nix @@ -236,11 +236,6 @@ stdenv.mkDerivation rec { }" ''; - # error: aligned allocation function of type 'void *(std::size_t, std::align_val_t)' is only available on macOS 10.13 or newer - env.CXXFLAGS = lib.optionalString ( - stdenv.hostPlatform.system == "x86_64-darwin" - ) "-faligned-allocation"; - # workaround for # https://github.com/root-project/root/issues/14778 env.NIX_LDFLAGS = lib.optionalString ( diff --git a/pkgs/by-name/so/sonic-server/package.nix b/pkgs/by-name/so/sonic-server/package.nix index 77de757649560..53270dbd87280 100644 --- a/pkgs/by-name/so/sonic-server/package.nix +++ b/pkgs/by-name/so/sonic-server/package.nix @@ -26,8 +26,6 @@ rustPlatform.buildRustPackage rec { rustPlatform.bindgenHook ]; - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-faligned-allocation"; - postPatch = '' substituteInPlace src/main.rs \ --replace-fail "./config.cfg" "$out/etc/sonic/config.cfg" diff --git a/pkgs/by-name/sp/spades/package.nix b/pkgs/by-name/sp/spades/package.nix index 2270ba33909d7..f17d0f6d0ebd2 100644 --- a/pkgs/by-name/sp/spades/package.nix +++ b/pkgs/by-name/sp/spades/package.nix @@ -53,8 +53,6 @@ stdenv.mkDerivation (finalAttrs: { readline ]; - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-faligned-allocation"; - doCheck = true; strictDeps = true; diff --git a/pkgs/by-name/tr/tracy/package.nix b/pkgs/by-name/tr/tracy/package.nix index ab8f06031a93b..71e3378ab9dfe 100644 --- a/pkgs/by-name/tr/tracy/package.nix +++ b/pkgs/by-name/tr/tracy/package.nix @@ -85,9 +85,6 @@ stdenv.mkDerivation rec { env.NIX_CFLAGS_COMPILE = toString ( [ ] ++ lib.optional stdenv.hostPlatform.isLinux "-ltbb" - ++ lib.optional ( - stdenv.hostPlatform.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "10.13" - ) "-fno-aligned-allocation" # Workaround for https://github.com/NixOS/nixpkgs/issues/19098 ++ lib.optional (stdenv.cc.isClang && stdenv.hostPlatform.isDarwin) "-fno-lto" ); diff --git a/pkgs/by-name/ue/ueberzugpp/package.nix b/pkgs/by-name/ue/ueberzugpp/package.nix index 7fcfb6099a40a..6d44c5905b938 100644 --- a/pkgs/by-name/ue/ueberzugpp/package.nix +++ b/pkgs/by-name/ue/ueberzugpp/package.nix @@ -94,14 +94,6 @@ stdenv.mkDerivation rec { "-DENABLE_X11=OFF" ]; - # error: aligned deallocation function of type 'void (void *, std::align_val_t) noexcept' is only available on macOS 10.14 or newer - preBuild = - lib.optionalString - (stdenv.hostPlatform.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "11.0") - '' - export MACOSX_DEPLOYMENT_TARGET=10.14 - ''; - meta = with lib; { description = "Drop in replacement for ueberzug written in C++"; homepage = "https://github.com/jstkdng/ueberzugpp"; diff --git a/pkgs/development/compilers/clasp/default.nix b/pkgs/development/compilers/clasp/default.nix index abf1083cc1c3f..cae4fa08e4e77 100644 --- a/pkgs/development/compilers/clasp/default.nix +++ b/pkgs/development/compilers/clasp/default.nix @@ -75,9 +75,6 @@ stdenv.mkDerivation rec { "x86_64-linux" "x86_64-darwin" ]; - # Upstream claims support, but breaks with: - # error: use of undeclared identifier 'aligned_alloc' - broken = stdenv.hostPlatform.isDarwin; homepage = "https://github.com/clasp-developers/clasp"; mainProgram = "clasp"; }; diff --git a/pkgs/development/compilers/halide/default.nix b/pkgs/development/compilers/halide/default.nix index bcd97a5becb80..a21fdd937d4d6 100644 --- a/pkgs/development/compilers/halide/default.nix +++ b/pkgs/development/compilers/halide/default.nix @@ -31,30 +31,14 @@ stdenv.mkDerivation rec { hash = "sha256-BPalUh9EgdCqVaWC1HoreyyRcPQc4QMIYnLrRoNDDCI="; }; - postPatch = - '' - # See https://github.com/halide/Halide/issues/7785 - substituteInPlace 'src/runtime/HalideRuntime.h' \ - --replace '#if defined(__x86_64__) || defined(__i386__) || defined(__arm__) || defined(__aarch64__) - #define HALIDE_CPP_COMPILER_HAS_FLOAT16' \ - '#if defined(__x86_64__) || defined(__i386__) - #define HALIDE_CPP_COMPILER_HAS_FLOAT16' - '' - # Note: on x86_64-darwin, clang fails to find AvailabilityVersions.h, so we remove it. - # Halide uses AvailabilityVersions.h and TargetConditionals.h to determine whether - # ::aligned_alloc is available. For us, it isn't. - + lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) '' - substituteInPlace 'src/runtime/HalideBuffer.h' \ - --replace '#ifdef __APPLE__ - #include - #include - #endif' \ - ' ' \ - --replace 'TARGET_OS_OSX && (__MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_15)' \ - '1' \ - --replace 'TARGET_OS_IPHONE && (__IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_14_0)' \ - '0' - ''; + postPatch = '' + # See https://github.com/halide/Halide/issues/7785 + substituteInPlace 'src/runtime/HalideRuntime.h' \ + --replace '#if defined(__x86_64__) || defined(__i386__) || defined(__arm__) || defined(__aarch64__) + #define HALIDE_CPP_COMPILER_HAS_FLOAT16' \ + '#if defined(__x86_64__) || defined(__i386__) + #define HALIDE_CPP_COMPILER_HAS_FLOAT16' + ''; cmakeFlags = [ "-DWARNINGS_AS_ERRORS=OFF" diff --git a/pkgs/development/libraries/libfive/default.nix b/pkgs/development/libraries/libfive/default.nix index 143a4b4c88736..a6d7304524dba 100644 --- a/pkgs/development/libraries/libfive/default.nix +++ b/pkgs/development/libraries/libfive/default.nix @@ -69,16 +69,9 @@ stdenv.mkDerivation { export XDG_CACHE_HOME=$(mktemp -d)/.cache ''; - cmakeFlags = - [ - "-DGUILE_CCACHE_DIR=${placeholder "out"}/${guile.siteCcacheDir}" - ] - ++ lib.optionals - (stdenv.hostPlatform.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "11") - [ - # warning: 'aligned_alloc' is only available on macOS 10.15 or newer - "-DCMAKE_OSX_DEPLOYMENT_TARGET=10.15" - ]; + cmakeFlags = [ + "-DGUILE_CCACHE_DIR=${placeholder "out"}/${guile.siteCcacheDir}" + ]; env = lib.optionalAttrs stdenv.cc.isClang { NIX_CFLAGS_COMPILE = "-Wno-error=enum-constexpr-conversion"; diff --git a/pkgs/development/libraries/lief/default.nix b/pkgs/development/libraries/lief/default.nix index ef7b160cdd1a9..9825b14896a5b 100644 --- a/pkgs/development/libraries/lief/default.nix +++ b/pkgs/development/libraries/lief/default.nix @@ -38,8 +38,6 @@ stdenv.mkDerivation rec { scikit-build-core ]; - env.CXXFLAGS = toString (lib.optional stdenv.hostPlatform.isDarwin [ "-faligned-allocation" "-fno-aligned-new" "-fvisibility=hidden" ]); - postBuild = '' pushd ../api/python ${pyEnv.interpreter} -m build --no-isolation --wheel --skip-dependency-check --config-setting=--parallel=$NIX_BUILD_CORES diff --git a/pkgs/development/libraries/openvdb/default.nix b/pkgs/development/libraries/openvdb/default.nix index b92a0601a8be3..ff662ed440d71 100644 --- a/pkgs/development/libraries/openvdb/default.nix +++ b/pkgs/development/libraries/openvdb/default.nix @@ -41,18 +41,6 @@ stdenv.mkDerivation rec { "-DOPENVDB_BUILD_NANOVDB=ON" ]; - # error: aligned deallocation function of type 'void (void *, std::align_val_t) noexcept' is only available on macOS 10.13 or newer - env = - lib.optionalAttrs - ( - stdenv.hostPlatform.isDarwin - && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "10.13" - && lib.versionAtLeast tbb.version "2021.8.0" - ) - { - NIX_CFLAGS_COMPILE = "-faligned-allocation"; - }; - postFixup = '' substituteInPlace $dev/lib/cmake/OpenVDB/FindOpenVDB.cmake \ --replace \''${OPENVDB_LIBRARYDIR} $out/lib \ diff --git a/pkgs/development/ocaml-modules/hacl-star/aligned-alloc.patch b/pkgs/development/ocaml-modules/hacl-star/aligned-alloc.patch deleted file mode 100644 index a5c0b6720699b..0000000000000 --- a/pkgs/development/ocaml-modules/hacl-star/aligned-alloc.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/hacl-star-raw/karamel/include/krml/internal/target.h b/hacl-star-raw/karamel/include/krml/internal/target.h -index 695873a..c0aed18 100644 ---- a/hacl-star-raw/karamel/include/krml/internal/target.h -+++ b/hacl-star-raw/karamel/include/krml/internal/target.h -@@ -82,6 +82,9 @@ - # endif - # if (defined(_MSC_VER) || (defined(__MINGW32__) && defined(__MINGW64_VERSION_MAJOR))) - # define KRML_ALIGNED_MALLOC(X, Y) _aligned_malloc(Y, X) -+# elif defined(__APPLE__) -+# include -+# define KRML_ALIGNED_MALLOC(X, Y) _mm_malloc(Y, X) - # else - # define KRML_ALIGNED_MALLOC(X, Y) aligned_alloc(X, Y) - # endif diff --git a/pkgs/development/ocaml-modules/hacl-star/raw.nix b/pkgs/development/ocaml-modules/hacl-star/raw.nix index 535da5b1a1ee9..5bbfec668c333 100644 --- a/pkgs/development/ocaml-modules/hacl-star/raw.nix +++ b/pkgs/development/ocaml-modules/hacl-star/raw.nix @@ -19,10 +19,6 @@ stdenv.mkDerivation rec { stripRoot = false; }; - patches = [ - ./aligned-alloc.patch - ]; - # strictoverflow is disabled because it breaks aarch64-darwin hardeningDisable = [ "strictoverflow" ]; diff --git a/pkgs/development/python-modules/torch/default.nix b/pkgs/development/python-modules/torch/default.nix index 961bccd18389a..ddf5bf3ae98a6 100644 --- a/pkgs/development/python-modules/torch/default.nix +++ b/pkgs/development/python-modules/torch/default.nix @@ -342,17 +342,7 @@ buildPythonPackage rec { # until https://github.com/pytorch/pytorch/issues/76082 is addressed + lib.optionalString cudaSupport '' rm cmake/Modules/FindCUDAToolkit.cmake - '' - # error: no member named 'aligned_alloc' in the global namespace; did you mean simply 'aligned_alloc' - # This lib overrided aligned_alloc hence the error message. Tltr: his function is linkable but not in header. - + - lib.optionalString - (stdenv.hostPlatform.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinSdkVersion "11.0") - '' - substituteInPlace third_party/pocketfft/pocketfft_hdronly.h --replace-fail '#if (__cplusplus >= 201703L) && (!defined(__MINGW32__)) && (!defined(_MSC_VER)) - inline void *aligned_alloc(size_t align, size_t size)' '#if 0 - inline void *aligned_alloc(size_t align, size_t size)' - ''; + ''; # NOTE(@connorbaker): Though we do not disable Gloo or MPI when building with CUDA support, caution should be taken # when using the different backends. Gloo's GPU support isn't great, and MPI and CUDA can't be used at the same time diff --git a/pkgs/servers/mail/mailpit/default.nix b/pkgs/servers/mail/mailpit/default.nix index 2ef2f2aa8cab5..473df8ed243a1 100644 --- a/pkgs/servers/mail/mailpit/default.nix +++ b/pkgs/servers/mail/mailpit/default.nix @@ -40,12 +40,6 @@ let hash = source.npmDepsHash; }; - env = lib.optionalAttrs (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) { - # Make sure libc++ uses `posix_memalign` instead of `aligned_alloc` on x86_64-darwin. - # Otherwise, nodejs would require the 11.0 SDK and macOS 10.15+. - NIX_CFLAGS_COMPILE = "-D__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__=101300"; - }; - nativeBuildInputs = [ nodejs python3 diff --git a/pkgs/servers/monitoring/grafana/default.nix b/pkgs/servers/monitoring/grafana/default.nix index 91888297cd0db..0757122ca1f5e 100644 --- a/pkgs/servers/monitoring/grafana/default.nix +++ b/pkgs/servers/monitoring/grafana/default.nix @@ -36,15 +36,9 @@ buildGoModule rec { }; # borrowed from: https://github.com/NixOS/nixpkgs/blob/d70d9425f49f9aba3c49e2c389fe6d42bac8c5b0/pkgs/development/tools/analysis/snyk/default.nix#L20-L22 - env = - { - CYPRESS_INSTALL_BINARY = 0; - } - // lib.optionalAttrs (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) { - # Fix error: no member named 'aligned_alloc' in the global namespace. - # Occurs while building @esfx/equatable@npm:1.0.2 on x86_64-darwin - NIX_CFLAGS_COMPILE = "-D_LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION=1"; - }; + env = { + CYPRESS_INSTALL_BINARY = 0; + }; offlineCache = stdenv.mkDerivation { name = "${pname}-${version}-yarn-offline-cache"; diff --git a/pkgs/servers/search/qdrant/default.nix b/pkgs/servers/search/qdrant/default.nix index ac614b4130992..e86b1d85ac726 100644 --- a/pkgs/servers/search/qdrant/default.nix +++ b/pkgs/servers/search/qdrant/default.nix @@ -47,14 +47,10 @@ rustPlatform.buildRustPackage rec { pkg-config ]; - env = - { - # Needed to get openssl-sys to use pkg-config. - OPENSSL_NO_VENDOR = 1; - } - // lib.optionalAttrs stdenv.cc.isClang { - NIX_CFLAGS_COMPILE = "-faligned-allocation"; - }; + env = { + # Needed to get openssl-sys to use pkg-config. + OPENSSL_NO_VENDOR = 1; + }; passthru = { updateScript = nix-update-script { }; diff --git a/pkgs/servers/sql/postgresql/ext/lantern.nix b/pkgs/servers/sql/postgresql/ext/lantern.nix index 75f653607e4e0..fcfd82e613458 100644 --- a/pkgs/servers/sql/postgresql/ext/lantern.nix +++ b/pkgs/servers/sql/postgresql/ext/lantern.nix @@ -58,8 +58,5 @@ buildPostgresqlExtension (finalAttrs: { license = licenses.agpl3Only; maintainers = [ ]; platforms = postgresql.meta.platforms; - # error: use of undeclared identifier 'aligned_alloc' - broken = - stdenv.hostPlatform.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "10.13"; }; })