···20 sha256 = "0hvckhi5gfny3mlva6d7y9pmx7cbwvq0r7mk11k3sdiik9hlkmdd";
21 };
22000000023 setupHook = lib.optional (bootstrap-chicken != null) ./setup-hook.sh;
2425 # -fno-strict-overflow is not a supported argument in clang on darwin
···31 ] ++ (lib.optionals stdenv.isDarwin [
32 "XCODE_TOOL_PATH=${darwin.binutils.bintools}/bin"
33 "C_COMPILER=$(CC)"
34- "POSTINSTALL_PROGRAM=install_name_tool"
35 ]);
3637 # We need a bootstrap-chicken to regenerate the c-files after
···20 sha256 = "0hvckhi5gfny3mlva6d7y9pmx7cbwvq0r7mk11k3sdiik9hlkmdd";
21 };
2223+ postPatch = lib.optionalString stdenv.isDarwin ''
24+ # There is not enough space in the load command to accomodate a full path to the store,
25+ # so use `@executable_path` to specify a relative path to chicken’s lib folder.
26+ sed -e '/POSTINSTALL_PROGRAM_FLAGS = /{s|$(LIBDIR)|@executable_path/../lib|}' \
27+ -i Makefile.macosx
28+ '';
29+30 setupHook = lib.optional (bootstrap-chicken != null) ./setup-hook.sh;
3132 # -fno-strict-overflow is not a supported argument in clang on darwin
···38 ] ++ (lib.optionals stdenv.isDarwin [
39 "XCODE_TOOL_PATH=${darwin.binutils.bintools}/bin"
40 "C_COMPILER=$(CC)"
41+ "POSTINSTALL_PROGRAM=${stdenv.cc.targetPrefix}install_name_tool"
42 ]);
4344 # We need a bootstrap-chicken to regenerate the c-files after