Skip to content
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

kernel-builder: Avoid string interpolation for path concatenation #296

Merged
merged 1 commit into from Feb 8, 2021

Conversation

kira-bruneau
Copy link
Contributor

@kira-bruneau kira-bruneau commented Feb 8, 2021

Using string interpolation for concatenating paths caused the whole nixpkgs source to be included as an inputSrc for the kernel derivation.

linux.drv:

"inputSrcs": [
  "...",
  "/nix/store/4crmmrpb9axxymrrh77lf35n015scnpj-mobile-nixos",
  "...",
],

I have my mobile-nixos worktree of nixpkgs under nixpkgs/mobile-nixos, which is why the above is named mobile-nixos.

With concatenation, only the resulting file is included as an inputSrc, which avoids unnecessary kernel rebuilds when nixpkgs changes.

linux.drv:

"inputSrcs": [
  "...",
  "/nix/store/hdr6v584ig3dpjlcs9afxxky3lvzm2nw-randstruct-provide-seed.patch",
  "...",
],

Using string interpolation for concatenating paths caused the whole
nixpkgs source to be included as an "inputSrc" for the kernel derivation.

linux.drv:
  "inputSrcs": [
    ...
    "/nix/store/4crmmrpb9axxymrrh77lf35n015scnpj-mobile-nixos",
    ...
  ],

With concatenation, only the resulting file is included as an
"inputSrc", which avoids unnecessary kernel rebuilds when nixpkgs
changes.

linux.drv:
  "inputSrcs": [
    ...
    "/nix/store/hdr6v584ig3dpjlcs9afxxky3lvzm2nw-randstruct-provide-seed.patch",
    ...
  ],
@samueldr samueldr added the 4. type: bug Something isn't working label Feb 8, 2021
@samueldr
Copy link
Member

samueldr commented Feb 8, 2021

Hi!

Thanks for the fix. It's so easy to overlook such things, if you see anything else of the sort, don't hesitate to share.

@samueldr samueldr merged commit 1c54996 into NixOS:master Feb 8, 2021
@kira-bruneau kira-bruneau deleted the concatenate-paths branch February 10, 2021 00:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. type: bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants