-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
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
buildFHSEnv: implement overriding #358977
base: master
Are you sure you want to change the base?
Conversation
5560c72
to
e34ca12
Compare
I didn't run |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/buildfhsenv-overriding/56457/3 |
No need to format, we'll just let that happen when nixfmt is in a reasonably complete state and the big reformat happens. |
And if you really want to reformat it, please do so in a separate commit so it's actually possible to review. |
Im not planning to do so as I haven't changed anything in there, but I wasn't sure about how important 100% passed CI is for some committers, which is why I asked. |
Don't worry, we are able to use our brains to deduce that the error is due to git not detecting the rename ;) |
8560248
to
93a9a9d
Compare
93a9a9d
to
0b962bc
Compare
Eval summary
|
de91470
to
1e3067e
Compare
Typical case of ending up re-implementing something in the same way as the original, apart from some cleanups and completely separating the building of the |
1e3067e
to
770ab0e
Compare
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 primary function has been moved to bwScript.nix to
reduce the amount of indentation.
I don't agree with that one. Now we have single line file and a big one next to it. 👎🏼
Edit: With the commit afterwards it is more justified but I am still undecided
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.
in hindsight the reasoning in the commit message isn't good as there is also a way of wrapping it without causing nixfmt
to indent the whole file. With the separation we gain some clarity in my opinion as buildFHSenv
basically consists of two mostly independent steps (build rootfs and wrap it).
Though i have to admit that the clarity gain is marginal.
770ab0e
to
6386fbc
Compare
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/prs-ready-for-review/3032/4959 |
Before i address the merge conflict i would like some final feedback if the split into |
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.
No that's absolutely valid I think.
I had a quick glance at the diff and it generally LGTM. I haven't looked at any details but those could be ironed out after the rebase.
fhsenv = buildFHSEnv ( | ||
lib.attrsets.removeAttrs args [ | ||
"runScript" | ||
"extraInstallCommands" | ||
"meta" | ||
"passthru" | ||
"extraPreBwrapCmds" | ||
"extraBwrapArgs" | ||
"dieWithParent" | ||
"unshareUser" | ||
"unshareCgroup" | ||
"unshareUts" | ||
"unshareNet" | ||
"unsharePid" | ||
"unshareIpc" | ||
"privateTmp" | ||
] | ||
); |
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.
Generally, I think I'd also like to get rid of this indirection somehow but that doesn't need to happen in this PR.
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.
Turns out this indirection is just plain unnecessary as only the {,p}name
and version
attrs of the @args
pattern where used.
6386fbc
to
e590871
Compare
Rebased onto master if it wasn't obvious.
There are not that many details TBH, ignoring the |
3aac007
to
a10b6cc
Compare
The primary function has been moved to wrapper.nix to reduce the amount of indentation and seperate functunality
a10b6cc
to
68f3b3f
Compare
68f3b3f
to
4f5c383
Compare
The primary function has been moved to
bwScript.nix
to reduce the amount of indentation.I am planing to refactor this in the next few weeks, but this should be good to go for now.
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.