lsof: fix darwin

edit Configure to use $SDKROOT to find libproc.h
This commit is contained in:
Reno Dakota
2024-10-23 06:27:18 +00:00
parent a05b8fcd69
commit 3a5f4c8b34
+5 -2
View File
@@ -21,8 +21,11 @@ stdenv.mkDerivation rec {
# We remove phony 'FRC' target that forces rebuilds:
# 'version.h: FRC ...' is translated to 'version.h: ...'.
sed -i lib/dialects/*/Makefile -e 's/version.h:\s*FRC/version.h:/'
'' + lib.optionalString stdenv.hostPlatform.isDarwin ''
sed -i 's|lcurses|lncurses|g' Configure
''
# help Configure find libproc.h in $SDKROOT
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
sed -i -e 's|lcurses|lncurses|g' \
-e "s|/Library.*/MacOSX.sdk/|\"$SDKROOT\"/|" Configure
'';
depsBuildBuild = [ buildPackages.stdenv.cc ];