Skip to content

treewide: mostly noop: refer to src.name or similar in sourceRoot where appropriate, part 3#247977

Merged
AndersonTorres merged 3 commits intoNixOS:masterfrom
oxij:tree/source-root-continues
Aug 11, 2023
Merged

treewide: mostly noop: refer to src.name or similar in sourceRoot where appropriate, part 3#247977
AndersonTorres merged 3 commits intoNixOS:masterfrom
oxij:tree/source-root-continues

Conversation

@oxij
Copy link
Copy Markdown
Member

@oxij oxij commented Aug 8, 2023

Continues where #245388 left off.

This replaces many static source paths in derivation's sourceRoot and related attributes with references to src.name and similar.

It's a noop build-wise except for the last commit which only rebuilds keeperrl (I couldn't help myself there).

@ofborg ofborg bot requested a review from onny August 8, 2023 18:14
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. labels Aug 8, 2023
@oxij oxij changed the title treewide: mostly noop: refer to src.name or similar in sourceRoot where appropriate, part 2 treewide: mostly noop: refer to src.name or similar in sourceRoot where appropriate, part 3 Aug 8, 2023
@oxij
Copy link
Copy Markdown
Member Author

oxij commented Aug 9, 2023

Copy link
Copy Markdown
Contributor

@drupol drupol left a comment

Choose a reason for hiding this comment

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

💯 ! Nice!

@oxij oxij force-pushed the tree/source-root-continues branch from 20784f4 to ec576fb Compare August 9, 2023 20:30
oxij added 3 commits August 9, 2023 20:43
…t 3: more use cases

This continues where d8f7f6a left off. Similarly
to that commit, this commit this also points `sourceRoot`s to `src.name` and similar
instead of keeping hardcoded names, and edits other derivation attrs do do the same,
where appropriate.

Also, similarly to d8f7f6a some of expressions this
edits use `srcs` attribute with customly-named sources, so they have to be moved
into `let` blocks to keep evaluation efficient (the other, worse, way to do this
would to recurcively refer to `elemAt n finalAttrs.srcs` or, similarly, with `rec`).
@oxij oxij force-pushed the tree/source-root-continues branch from ec576fb to da004a1 Compare August 9, 2023 20:43
@oxij
Copy link
Copy Markdown
Member Author

oxij commented Aug 11, 2023

So, could someone merge this, please? I have two more of these in the queue...

@oxij
Copy link
Copy Markdown
Member Author

oxij commented Aug 11, 2023

Thanks, @AndersonTorres!

Follow-up PR #248528, the last one that is mostly-noop. They are getting smaller with each step, hurray!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants