1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-17 19:21:04 +00:00

cdrkit: darwin link with CF

This commit is contained in:
Reno Dakota 2024-10-27 21:52:03 +00:00
parent cae0fd41a2
commit 0046e13989
No known key found for this signature in database

View file

@ -1,4 +1,4 @@
{lib, stdenv, fetchurl, cmake, libcap, zlib, bzip2, perl, iconv, darwin}:
{lib, stdenv, fetchurl, cmake, libcap, zlib, bzip2, perl}:
stdenv.mkDerivation rec {
pname = "cdrkit";
@ -11,8 +11,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake ];
buildInputs = [ zlib bzip2 perl ] ++
lib.optionals stdenv.hostPlatform.isLinux [ libcap ] ++
lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ Carbon IOKit iconv ]);
lib.optionals stdenv.hostPlatform.isLinux [ libcap ];
hardeningDisable = [ "format" ];
env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.hostPlatform.isMusl [
@ -44,10 +43,8 @@ stdenv.mkDerivation rec {
'';
postConfigure = lib.optionalString stdenv.hostPlatform.isDarwin ''
for f in */CMakeFiles/*.dir/link.txt ; do
substituteInPlace "$f" \
--replace "-lrt" "-framework IOKit"
done
substituteInPlace */CMakeFiles/*.dir/link.txt \
--replace-warn "-lrt" "-framework IOKit -framework CoreFoundation"
'';
postInstall = ''