Skip to content

Comments

make{,Binary}Wrapper: some cleanups#172366

Merged
thiagokokada merged 8 commits intoNixOS:stagingfrom
ncfavier:wrappers-cleanup
May 12, 2022
Merged

make{,Binary}Wrapper: some cleanups#172366
thiagokokada merged 8 commits intoNixOS:stagingfrom
ncfavier:wrappers-cleanup

Conversation

@ncfavier
Copy link
Member

Nothing crazy, see individual commits.

Fixes #172249, addresses #172320 (comment)

@ncfavier ncfavier force-pushed the wrappers-cleanup branch from 44b378b to 519c054 Compare May 10, 2022 18:50
Copy link
Contributor

@thiagokokada thiagokokada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some general comments, but looks like a very good clean-up 👏 .

@ofborg ofborg bot added 10.rebuild-darwin-stdenv This PR causes stdenv to rebuild on Darwin and must target a staging branch. 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. labels May 10, 2022
ncfavier added 5 commits May 10, 2022 22:07
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'
@ncfavier ncfavier force-pushed the wrappers-cleanup branch from 519c054 to 2ae6911 Compare May 10, 2022 20:08
@ncfavier
Copy link
Member Author

Failures are due to timeout building LLVM, but based on my tests in #172257 this should work on every platform.

Copy link
Contributor

@thiagokokada thiagokokada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code-wise, LGTM.

Not tested, would like a second opinion here.

Copy link
Member

@bergkvist bergkvist left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@ncfavier
Copy link
Member Author

I built and ran firefox-bin succesfully. Building discord now, but it takes a while.

@Artturin Artturin added the 12.approvals: 2 This PR was reviewed and approved by two persons. label May 11, 2022
@ncfavier
Copy link
Member Author

Built and ran firefox-bin, discord, vscode, signal, neovim and mpv.

@ncfavier
Copy link
Member Author

Firefox still working.

@ncfavier
Copy link
Member Author

I keep thinking of more things 😅 this is just a naming change though.

@thiagokokada
Copy link
Contributor

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.

@ncfavier
Copy link
Member Author

I think this is fine to merge now.

A small shell script that can be used to extract a binary wrapper's
makeCWrapper call from its embedded docstring, without depending on
makeBinaryWrapper.
@ncfavier ncfavier force-pushed the wrappers-cleanup branch from 7163791 to 2b0c728 Compare May 11, 2022 23:44
@ncfavier
Copy link
Member Author

ncfavier commented May 11, 2022

Good catch!

Firefox still working.

@dotlambda dotlambda mentioned this pull request May 12, 2022
13 tasks
So that things that use the makeShellWrapper/wrapProgramShell
functions can depend on makeShellWrapper explicitly, which should ease
migration in the future.
@ncfavier ncfavier force-pushed the wrappers-cleanup branch from 2b0c728 to 3c77d36 Compare May 12, 2022 09:01
@ncfavier
Copy link
Member Author

ncfavier commented May 12, 2022

The --append-flags implementation is ready, but I'll make another PR for that to not delay this one forever.

@thiagokokada thiagokokada merged commit 5c51876 into NixOS:staging May 12, 2022
@ncfavier ncfavier deleted the wrappers-cleanup branch May 12, 2022 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: vim Advanced text editor 8.has: documentation This PR adds or changes documentation 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-darwin-stdenv This PR causes stdenv to rebuild on Darwin and must target a staging branch. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. 12.approvals: 2 This PR was reviewed and approved by two persons.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants