mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-26 15:56:18 +02:00
packaging: Set darwinMinVersion to fix x86_64-darwin build
Ported from https://github.com/NixOS/nixpkgs/pull/326172 Co-authored-by: Emily <vcs@emily.moe>
This commit is contained in:
parent
426e2af6f7
commit
0395ff9bd3
1 changed files with 17 additions and 0 deletions
|
@ -11,11 +11,28 @@
|
||||||
versionSuffix,
|
versionSuffix,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
prevStdenv = stdenv;
|
||||||
|
in
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (pkgs) lib;
|
inherit (pkgs) lib;
|
||||||
|
|
||||||
root = ../.;
|
root = ../.;
|
||||||
|
|
||||||
|
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"; };
|
||||||
|
|
||||||
# Nixpkgs implements this by returning a subpath into the fetched Nix sources.
|
# Nixpkgs implements this by returning a subpath into the fetched Nix sources.
|
||||||
resolvePath = p: p;
|
resolvePath = p: p;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue