New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sublime3: fix hardcoded /bin/bash when executing commands for build systems #23561
Conversation
exec.py in Default.package-sublime calls /bin/bash with subprocess. See Issue NixOS#12011. Because of this builds could not be started from withtin Sublime Text.
Without the wrapped version of bash (a symlink to $bash/bin/bash) with LD_PRELOAD to glibc an relocation error occurs when trying to run builds from within Sublime Text 3. See Issue NixOS#12011.
${unzip}/bin/unzip ../Packages/Default.sublime-package > /dev/null | ||
substituteInPlace "exec.py" --replace \ | ||
'["/bin/bash"' \ | ||
'["/usr/bin/env", "bash"' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about?
substituteInPlace "exec.py" --replace \
'["/bin/bash"' \
'["${pkgs.bash}/bin/bash"'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just noticed that you have already revert this change.
'["/bin/bash"' \ | ||
'["/usr/bin/env", "bash"' | ||
"[\"/bin/bash\"" \ | ||
"[\"$out/sublime_bash\"" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would not my solution has the same effect?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So is this fine? As you've said, It's already revised in the second commit.
Is there any issue with this? Can this be merged? |
Thanks! |
…ystems (#23561) * sublime3: replace hardcoded /bin/bash with /usr/bin/env exec.py in Default.package-sublime calls /bin/bash with subprocess. See Issue #12011. Because of this builds could not be started from withtin Sublime Text. * sublime3: use wrapped of bash to fix internal build system Without the wrapped version of bash (a symlink to $bash/bin/bash) with LD_PRELOAD to glibc an relocation error occurs when trying to run builds from within Sublime Text 3. See Issue #12011. (cherry picked from commit 1893ed5)
…ystems (NixOS#23561) * sublime3: replace hardcoded /bin/bash with /usr/bin/env exec.py in Default.package-sublime calls /bin/bash with subprocess. See Issue NixOS#12011. Because of this builds could not be started from withtin Sublime Text. * sublime3: use wrapped of bash to fix internal build system Without the wrapped version of bash (a symlink to $bash/bin/bash) with LD_PRELOAD to glibc an relocation error occurs when trying to run builds from within Sublime Text 3. See Issue NixOS#12011.
…ystems (#23561) * sublime3: replace hardcoded /bin/bash with /usr/bin/env exec.py in Default.package-sublime calls /bin/bash with subprocess. See Issue #12011. Because of this builds could not be started from withtin Sublime Text. * sublime3: use wrapped of bash to fix internal build system Without the wrapped version of bash (a symlink to $bash/bin/bash) with LD_PRELOAD to glibc an relocation error occurs when trying to run builds from within Sublime Text 3. See Issue #12011. (cherry picked from commit 1893ed5)
Motivation for this change
See Issue #12011. You can now run Builds from within Sublime Text.
Things done
(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
nix-shell -p nox --run "nox-review wip"
./result/bin/
)