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

libsForQt5.extra-cmake-modules: fix for strictDeps #376831

Merged
merged 1 commit into from
Feb 9, 2025

Conversation

FliegendeWurst
Copy link
Member

To fix ECM use in strictDeps builds (#178468), some changes are required.

  1. New preConfigure hook to inform CMake about the existence of the package

Since extra-cmake-modules is put in nativeBuildInputs, it is not picked up correctly if strictDeps is true. Pass -DECM_DIR=@out@/share/ECM/cmake to fix it.

  1. Bash is added as runtime dependency for some scripts (share/ECM/kde-modules/kde-git-commit-hooks/{clang-format.sh,pre-commit.in})

Things done

  • Built on platform(s)
    • x86_64-linux. Cross build is not relevant since ECM always goes in native inputs.
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested compilation of all some packages that depend on this change, just my usual reviews and update work. I have this patched for about two months already.
  • Fits CONTRIBUTING.md.

@K900
Copy link
Contributor

K900 commented Jan 26, 2025

Is this specific to the KF5 version of ECM then? Also, the commit hooks should not be used.

bash
];

# note: these will be propagated into the same list extra-cmake-modules is in
propagatedBuildInputs = [
Copy link
Member

Choose a reason for hiding this comment

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

I am undecided if this is correct or propagatedNativeBuildInputs

Copy link
Member Author

@FliegendeWurst FliegendeWurst Jan 26, 2025

Choose a reason for hiding this comment

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

It is correct by my understanding: extra-cmake-modules in nativeBuildInputs => propagatedBuildInputs are also put in nativeBuildInputs. See #64992

In fact anything you put in propagatedNativeBuildInputs would be ignored.

^ @K900

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh yeah, I forgot this is wrong, lol. Those should probably be saturating, not overflowing... But whatever, out of scope.

@FliegendeWurst
Copy link
Member Author

Is this specific to the KF5 version of ECM then? Also, the commit hooks should not be used.

I think it is. At least the KF6 ECM hasn't caused me trouble yet. About the commit hooks, I just added bash to make sure the output is equivalent to the previous strictDeps = false output. If you want I could remove them from the output instead.

@K900
Copy link
Contributor

K900 commented Jan 26, 2025

I think this is fine, I'm not sure if propagating cmake/pkg-config as buildInputs is correct though.

@K900 K900 merged commit aa0758f into NixOS:staging Feb 9, 2025
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants