makeBinaryWrapper: fix passthru.extractCmd on darwin (#483719)

This commit is contained in:
Ihar Hrachyshka
2026-07-21 00:28:08 +00:00
committed by GitHub

View File

@@ -24,9 +24,13 @@ makeSetupHook {
passthru = {
# Extract the function call used to create a binary wrapper from its embedded docstring
extractCmd = writeShellScript "extract-binary-wrapper-cmd" ''
${targetPackages.gnuStdenv.cc.bintools.targetPrefix}strings -dw "$1" | sed -n '/^makeCWrapper/,/^$/ p'
'';
extractCmd =
let
bintools = targetPackages.gnuStdenv.cc.bintools;
in
writeShellScript "extract-binary-wrapper-cmd" ''
${lib.getExe' bintools "${bintools.targetPrefix}strings"} -dw "$1" | sed -n '/^makeCWrapper/,/^$/ p'
'';
tests = tests.makeBinaryWrapper;
};