Merge pull request #266162 from reckenrode/chicken-fix

chickenPackages_4.chicken: fix build on x86_64-darwin

authored by Weijia Wang and committed by GitHub e49468c2 83bfbf02

+8 -1
+8 -1
pkgs/development/compilers/chicken/4/chicken.nix
··· 20 20 sha256 = "0hvckhi5gfny3mlva6d7y9pmx7cbwvq0r7mk11k3sdiik9hlkmdd"; 21 21 }; 22 22 23 + 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 + 23 30 setupHook = lib.optional (bootstrap-chicken != null) ./setup-hook.sh; 24 31 25 32 # -fno-strict-overflow is not a supported argument in clang on darwin ··· 31 38 ] ++ (lib.optionals stdenv.isDarwin [ 32 39 "XCODE_TOOL_PATH=${darwin.binutils.bintools}/bin" 33 40 "C_COMPILER=$(CC)" 34 - "POSTINSTALL_PROGRAM=install_name_tool" 41 + "POSTINSTALL_PROGRAM=${stdenv.cc.targetPrefix}install_name_tool" 35 42 ]); 36 43 37 44 # We need a bootstrap-chicken to regenerate the c-files after