-
Notifications
You must be signed in to change notification settings - Fork 29
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
How to patchShebangs
while building a package (digestif
)
#60
Comments
patchShebangs
while building a package (digestif
)patchShebangs
while building a package (digestif
)
Ok. After a bit of digging around, I figured it out.
Now, I had to add the
|
Ahh yep, it sucks that this is necessary - I wish nix would special-case /usr/bin/env since it's so ubiquitous and harmless. I'd accept an override in https://github.com/timbertson/opam2nix/blob/8d787c5cc26b29ff3874f73a2f6b64f21764859f/nix/overrides/default.nix if you want to make a PR. Given that this seems like a pretty common issue, I'd even consider just blanketly patch-shebang-ing all executable files before running build commands. I think that happens on the output in fixupPhase anyway, so there's precedent. |
Sure. I will try to get in a PR are during weekend. On a side note, are you planning to upstream We even had a discussion going on Reason Discord (https://discord.com/channels/235176658175262720/235176658175262720/856499048235794432), which eventually petered out without conclusion. |
Haha no offence, I come and go in terms of how much attention I can (and choose) to give to open source projects, and I juggle a few so there's often quiet periods. I'll respond over in discourse. |
I am trying to to build
dream
withopam2nix
.digestif.opam
, one ofdream
's dependencies, needs to run an./install/install.ml
file as a build step:The
install.ml
uses#!/usr/bin/env ocaml
. As/usr/bin/env
is not available during thenix-build
process, the build process fails (I found this out the hard way!).From what I understood, nix's way of tackling this is to use
patchShebangs
to patch such invocations.However, I cannot figure out where I would do this in case of
opam2nix
's case. Can you help me figure it out?You could try to build
digestif
in order to reproduce this issue.The text was updated successfully, but these errors were encountered: