fnc: set minimum version for Darwin

This commit is contained in:
Emily 2024-11-06 19:14:09 +00:00
parent 6bcccb6a8d
commit 5af01c33cd

View File

@ -1,4 +1,4 @@
{ lib, fetchurl, stdenv, zlib, ncurses, libiconv }:
{ lib, fetchurl, stdenv, zlib, ncurses, libiconv, apple-sdk_11, darwinMinVersionHook }:
stdenv.mkDerivation (finalAttrs: {
pname = "fnc";
@ -9,16 +9,13 @@ stdenv.mkDerivation (finalAttrs: {
hash = "sha256-npS+sOxF0S/9TuFjtEFlev0HpIOsaP6zmcfopPNUehk=";
};
buildInputs = [ libiconv ncurses zlib ];
buildInputs = [ libiconv ncurses zlib apple-sdk_11 (darwinMinVersionHook "11.0") ];
makeFlags = [ "PREFIX=$(out)" ];
env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.cc.isGNU [
# Needed with GCC 12
"-Wno-error=maybe-uninitialized"
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
# error: 'strtonum' is only available on macOS 11.0 or newer
"-Wno-error=unguarded-availability-new"
]);
preInstall = ''