From 5ca364e30a884557245bf1dd93c63d6393f5401d Mon Sep 17 00:00:00 2001 From: Ihar Hrachyshka Date: Sat, 19 Apr 2025 23:49:31 -0400 Subject: [PATCH] fpc: add apple-sdk SDKROOT to default library paths This fixes darwin build for xidel, among other things. Note: there are some impurities in the package where xcode and other paths may be injected into build environment. These are left out of scope for this patch, to be dealt by other interested parties. Signed-off-by: Ihar Hrachyshka --- pkgs/development/compilers/fpc/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/compilers/fpc/default.nix b/pkgs/development/compilers/fpc/default.nix index d5167b52a700..63a6102a0ece 100644 --- a/pkgs/development/compilers/fpc/default.nix +++ b/pkgs/development/compilers/fpc/default.nix @@ -56,6 +56,10 @@ stdenv.mkDerivation rec { # substitute the markers set by the mark-paths patch substituteInPlace fpcsrc/compiler/systems/t_linux.pas --subst-var-by dynlinker-prefix "${glibc}" substituteInPlace fpcsrc/compiler/systems/t_linux.pas --subst-var-by syslibpath "${glibc}/lib" + + substituteInPlace fpcsrc/compiler/systems/t_darwin.pas \ + --replace-fail "LibrarySearchPath.AddLibraryPath(sysrootpath,'=/usr/lib',true)" "LibrarySearchPath.AddLibraryPath(sysrootpath,'$SDKROOT/usr/lib',true)" + # Replace the `codesign --remove-signature` command with a custom script, since `codesign` is not available # in nixpkgs # Remove the -no_uuid strip flag which does not work on llvm-strip, only