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
verilator: fix Perl shebangs #23631
verilator: fix Perl shebangs #23631
Conversation
@edef1c, thanks for your PR! By analyzing the history of the files in this pull request, we identified @globin and @thoughtpolice to be potential reviewers. |
without this fix, it relies on bash interpreting things without a shebangs as bash scripts, which not only breaks under non-bash shells, but also breaks anything just
|
@@ -12,6 +12,10 @@ stdenv.mkDerivation rec { | |||
enableParallelBuilding = true; | |||
buildInputs = [ perl flex_2_6_1 bison ]; | |||
|
|||
postInstall = '' | |||
sed -i -e '3a\#!/usr/bin/env perl' -e '1,3d' $out/bin/{verilator,verilator_coverage,verilator_profcfunc} |
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
sed -i -e '3a\#!/${pkgs}/bin/perl' -e '1,3d' $out/bin/{verilator,verilator_coverage,verilator_profcfunc}
also work here?
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.
the fixup phase handles this already, the /usr/bin/env
usage never makes it into the final build
Thanks! |
I guess we have the same bug in our |
Probably. This should cherry-pick cleanly though? |
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/
)