Skip to content

Conversation

@stasjok
Copy link
Contributor

@stasjok stasjok commented Jul 19, 2024

This PR is a fix extracted from #1886. Since #1889 also fixes that, maybe this PR is redundant. But at least tests are fixed here (I think that files.nix was placed in the wrong directory, because I didn't find any reference to it). Also added a test case for the error this is fixing. Feel free to close if #1889 is merged earlier.

Copy link
Member

@MattSturgeon MattSturgeon left a comment

Choose a reason for hiding this comment

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

Thanks! Definetely better to address this before dealing with the other PRs.

Would you mind addressing my nit about using just one let block?

I'll run tests locally, to be sure, then I'm happy to merge!

plugin = helpers.writeLua derivationName config.content;
plugin =
let
writeContent = if config.type == "lua" then helpers.writeLua else pkgs.writeText;
Copy link
Member

Choose a reason for hiding this comment

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

I think it's more readable with this in the same let block as derivationName.

Also: in #1889 I named the function writer, although that's not really important. writeContent is fine, just a little verbose.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe I'm wrong, but isn't a verb better in that case? I named it by analogy to writeLua and writeText.

@MattSturgeon
Copy link
Member

Also, could you rebase on main?

@MattSturgeon
Copy link
Member

Update: nix flake check passed locally (x86_64-linux). Happy to merge once rebased and nits addressed.

Copy link
Member

@MattSturgeon MattSturgeon left a comment

Choose a reason for hiding this comment

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

Great, thanks!

@MattSturgeon MattSturgeon merged commit c9a6912 into nix-community:main Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants