From a88d4f7dc7ed2d122dcae053863cfa11380f3bfc Mon Sep 17 00:00:00 2001 From: Jade Lovelace Date: Mon, 15 Jan 2024 13:46:24 -0800 Subject: [PATCH] fpc: fix on llvm-strip on macOS --- pkgs/development/compilers/fpc/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/development/compilers/fpc/default.nix b/pkgs/development/compilers/fpc/default.nix index ca16c08b57269..3c9eb60d57c70 100644 --- a/pkgs/development/compilers/fpc/default.nix +++ b/pkgs/development/compilers/fpc/default.nix @@ -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