···2020 sha256 = "0hvckhi5gfny3mlva6d7y9pmx7cbwvq0r7mk11k3sdiik9hlkmdd";
2121 };
22222323+ postPatch = lib.optionalString stdenv.isDarwin ''
2424+ # There is not enough space in the load command to accomodate a full path to the store,
2525+ # so use `@executable_path` to specify a relative path to chicken’s lib folder.
2626+ sed -e '/POSTINSTALL_PROGRAM_FLAGS = /{s|$(LIBDIR)|@executable_path/../lib|}' \
2727+ -i Makefile.macosx
2828+ '';
2929+2330 setupHook = lib.optional (bootstrap-chicken != null) ./setup-hook.sh;
24312532 # -fno-strict-overflow is not a supported argument in clang on darwin
···3138 ] ++ (lib.optionals stdenv.isDarwin [
3239 "XCODE_TOOL_PATH=${darwin.binutils.bintools}/bin"
3340 "C_COMPILER=$(CC)"
3434- "POSTINSTALL_PROGRAM=install_name_tool"
4141+ "POSTINSTALL_PROGRAM=${stdenv.cc.targetPrefix}install_name_tool"
3542 ]);
36433744 # We need a bootstrap-chicken to regenerate the c-files after