make{,Binary}Wrapper: some cleanups#172366
Conversation
44b378b to
519c054
Compare
pkgs/applications/networking/instant-messengers/discord/linux.nix
Outdated
Show resolved
Hide resolved
pkgs/build-support/setup-hooks/make-binary-wrapper/make-binary-wrapper.sh
Outdated
Show resolved
Hide resolved
thiagokokada
left a comment
There was a problem hiding this comment.
Some general comments, but looks like a very good clean-up 👏 .
The derivation is complex enough to warrant moving out of all-packages.nix
Because both versions might end up in a derivation's build inputs, it might be useful to be able to explicitly select which function to use.
...and pass it makeBinaryWrapper in all-packages.nix
For symmetry/interoperability with makeBinaryWrapper. Implemented as --argv0 '$0'
519c054 to
2ae6911
Compare
|
Failures are due to timeout building LLVM, but based on my tests in #172257 this should work on every platform. |
thiagokokada
left a comment
There was a problem hiding this comment.
Code-wise, LGTM.
Not tested, would like a second opinion here.
bergkvist
left a comment
There was a problem hiding this comment.
The changes to makeShellWrapper and makeBinaryWrapper look good to me, assuming you were able to run the tests successfully for x86-linux, x86-darwin and aarch64-linux locally.
|
I built and ran firefox-bin succesfully. Building discord now, but it takes a while. |
|
Built and ran firefox-bin, discord, vscode, signal, neovim and mpv. |
|
Firefox still working. |
|
I keep thinking of more things 😅 this is just a naming change though. |
|
Well, tell me when you're ready. I was going to avoid merging this until 22.05 is released, but we still have some time and the changes seem safe-ish. |
|
I think this is fine to merge now. |
|
With the extractCmd you added, the path should probably be escaped properly here (in case it contains spaces): Like what is happening here: |
A small shell script that can be used to extract a binary wrapper's makeCWrapper call from its embedded docstring, without depending on makeBinaryWrapper.
7163791 to
2b0c728
Compare
|
Good catch! Firefox still working. |
So that things that use the makeShellWrapper/wrapProgramShell functions can depend on makeShellWrapper explicitly, which should ease migration in the future.
2b0c728 to
3c77d36
Compare
|
The |
Nothing crazy, see individual commits.
Fixes #172249, addresses #172320 (comment)