makeBinaryWrapper: use GNU bintools for extractCmd

Only GNU supports the -d flag used. In a different environment, the
command fails as follows:

strings: error: unknown argument '-d'

Note: I believe it was not noticed because the command is used in
Firefox wrapper only where its failure is silently swallowed. The only
side effect then is that the wrapper won't work as expected when
wrapping a wrapper.

Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>
This commit is contained in:
Ihar Hrachyshka
2025-04-03 20:48:17 -04:00
parent 82b74f4d70
commit a919a6e611
@@ -25,7 +25,7 @@ makeSetupHook {
passthru = {
# Extract the function call used to create a binary wrapper from its embedded docstring
extractCmd = writeShellScript "extract-binary-wrapper-cmd" ''
${cc.bintools.targetPrefix}strings -dw "$1" | sed -n '/^makeCWrapper/,/^$/ p'
${targetPackages.gnuStdenv.cc.bintools.targetPrefix}strings -dw "$1" | sed -n '/^makeCWrapper/,/^$/ p'
'';
tests = tests.makeBinaryWrapper;