Skip to content

Commit

Permalink
fpc: fix on llvm-strip on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
lf- committed Jan 17, 2024
1 parent 5d238d0 commit a88d4f7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkgs/development/compilers/fpc/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,14 @@ stdenv.mkDerivation rec {
substituteInPlace fpcsrc/compiler/systems/t_linux.pas --subst-var-by syslibpath "${glibc}/lib"
# 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
# Apple strip.
substituteInPlace fpcsrc/compiler/Makefile \
--replace \
"\$(CODESIGN) --remove-signature" \
"${./remove-signature.sh}" \
--replace "ifneq (\$(CODESIGN),)" "ifeq (\$(OS_TARGET), darwin)"
--replace "ifneq (\$(CODESIGN),)" "ifeq (\$(OS_TARGET), darwin)" \
--replace "-no_uuid" ""
'';

NIX_LDFLAGS = lib.optionalString
Expand Down

0 comments on commit a88d4f7

Please sign in to comment.