mirror of
https://github.com/NixOS/nix
synced 2025-06-25 02:21:16 +02:00
Revert "remove obsolete stdenv darwinMinVersion override"
This reverts commitd91310bb32
. > Some packages require setting a non-default deployment target > (or minimum version) to gain access to certain APIs. You do > that using the darwinMinVersionHook, which takes the deployment > target version as a parameter. --60b54c7aee/doc/stdenv/platform-notes.chapter.md (what-is-a-deployment-target-or-minimum-version-sec-darwin-troubleshooting-using-deployment-targets)
This will again solve error: ../nix_api_expr.cc:38:18: error: aligned allocation function of type 'void *(std::size_t, std::align_val_t)' is only available on macOS 10.13 or newer -- https://hydra.nixos.org/build/294088946 (cherry picked from commit5c4a4aeed7
)
This commit is contained in:
parent
cd31a8ca84
commit
36ce86dfb6
2 changed files with 20 additions and 1 deletions
|
@ -171,7 +171,7 @@
|
||||||
{
|
{
|
||||||
otherSplices = final.generateSplicesForMkScope "nixDependencies";
|
otherSplices = final.generateSplicesForMkScope "nixDependencies";
|
||||||
f = import ./packaging/dependencies.nix {
|
f = import ./packaging/dependencies.nix {
|
||||||
inherit stdenv;
|
inherit inputs stdenv;
|
||||||
pkgs = final;
|
pkgs = final;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,14 +1,33 @@
|
||||||
# These overrides are applied to the dependencies of the Nix components.
|
# These overrides are applied to the dependencies of the Nix components.
|
||||||
|
|
||||||
{
|
{
|
||||||
|
# Flake inputs; used for sources
|
||||||
|
inputs,
|
||||||
|
|
||||||
# The raw Nixpkgs, not affected by this scope
|
# The raw Nixpkgs, not affected by this scope
|
||||||
pkgs,
|
pkgs,
|
||||||
|
|
||||||
stdenv,
|
stdenv,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
prevStdenv = stdenv;
|
||||||
|
in
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (pkgs) lib;
|
inherit (pkgs) lib;
|
||||||
|
|
||||||
|
stdenv = if prevStdenv.isDarwin && prevStdenv.isx86_64 then darwinStdenv else prevStdenv;
|
||||||
|
|
||||||
|
# Fix the following error with the default x86_64-darwin SDK:
|
||||||
|
#
|
||||||
|
# error: aligned allocation function of type 'void *(std::size_t, std::align_val_t)' is only available on macOS 10.13 or newer
|
||||||
|
#
|
||||||
|
# Despite the use of the 10.13 deployment target here, the aligned
|
||||||
|
# allocation function Clang uses with this setting actually works
|
||||||
|
# all the way back to 10.6.
|
||||||
|
darwinStdenv = pkgs.overrideSDK prevStdenv { darwinMinVersion = "10.13"; };
|
||||||
|
|
||||||
in
|
in
|
||||||
scope: {
|
scope: {
|
||||||
inherit stdenv;
|
inherit stdenv;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue