Skip to content

taskwarrior2: fix build with cmake>=4#450177

Merged
bjornfor merged 1 commit intoNixOS:masterfrom
bjornfor:fix-taskwarrior2
Oct 9, 2025
Merged

taskwarrior2: fix build with cmake>=4#450177
bjornfor merged 1 commit intoNixOS:masterfrom
bjornfor:fix-taskwarrior2

Conversation

@bjornfor
Copy link
Contributor

@bjornfor bjornfor commented Oct 9, 2025

Things done

Fix build by adding cmake flag.

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

Add a 👍 reaction to pull requests you find important.

@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. labels Oct 9, 2025
@nix-owners nix-owners bot requested review from MarcWeber and oxalica October 9, 2025 05:31
@panchoh
Copy link
Contributor

panchoh commented Oct 9, 2025

Thanks for your efforts, @bjornfor!

Please be aware of the recommendations offered in #445447 (especially point 3 at the top, further explained in @LordGrimmauld’s comment).

@bjornfor
Copy link
Contributor Author

bjornfor commented Oct 9, 2025

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 450177
Commit: b9fb68b627ac173fadc00a1fce965040d662a8af


x86_64-linux

⏩ 2 packages marked as broken and skipped:
  • syncall
  • syncall.dist
✅ 21 packages built:
  • calcure
  • calcure.dist
  • gnomeExtensions.taskwhisperer
  • python312Packages.bugwarrior
  • python312Packages.bugwarrior.dist
  • python312Packages.tasklib
  • python312Packages.tasklib.dist
  • python312Packages.taskw
  • python312Packages.taskw-ng
  • python312Packages.taskw-ng.dist
  • python312Packages.taskw.dist
  • python313Packages.tasklib
  • python313Packages.tasklib.dist
  • python313Packages.taskw
  • python313Packages.taskw-ng
  • python313Packages.taskw-ng.dist
  • python313Packages.taskw.dist
  • tasknc
  • taskwarrior2
  • vit
  • vit.dist

@bjornfor
Copy link
Contributor Author

bjornfor commented Oct 9, 2025

Please be aware of the recommendations offered in #445447 (especially point 3 at the top, further explained in @LordGrimmauld’s comment).

Thanks for the pointers, @panchoh!

taskwarrior2 isn't updated anymore (the current stable is 3.x), so I think cmakeFlag is OK.

BTW, I looked at making a patch/substituteInPlace, but it seems I have to add a new line somewhere in CMakeLists.txt with set(CMAKE_POLICY_VERSION_MINIMUM 3.5)[1], which means it isn't guaranteed to fail on the next update (even though 2.x isn't receiving any more updates), since it isn't changing an existing line..

[1] I first tried changing cmake_minimum_required (VERSION 3.0) to cmake_minimum_required (VERSION 3.5) in top of CMakeLists.txt with substituteInPlace, but that had no effect.

@panchoh
Copy link
Contributor

panchoh commented Oct 9, 2025

taskwarrior2 isn't updated anymore (the current stable is 3.x), so I think cmakeFlag is OK.

Ah, that alone clears it 👍

BTW, I looked at making a patch/substituteInPlace, but it seems I have to add a new line somewhere in CMakeLists.txt with set(CMAKE_POLICY_VERSION_MINIMUM 3.5)[1], which means it isn't guaranteed to fail on the next update (even though 2.x isn't receiving any more updates), since it isn't changing an existing line..

[1] I first tried changing cmake_minimum_required (VERSION 3.0) to cmake_minimum_required (VERSION 3.5) in top of CMakeLists.txt with substituteInPlace, but that had no effect.

Thanks for the clarification, and for the thorough job 🙏!

Copy link
Contributor

@panchoh panchoh left a comment

Choose a reason for hiding this comment

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

LGTM!

@panchoh
Copy link
Contributor

panchoh commented Oct 9, 2025

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 450177
Commit: b9fb68b627ac173fadc00a1fce965040d662a8af


x86_64-linux

✅ 21 packages built:
  • calcure
  • calcure.dist
  • gnomeExtensions.taskwhisperer
  • python312Packages.bugwarrior
  • python312Packages.bugwarrior.dist
  • python312Packages.tasklib
  • python312Packages.tasklib.dist
  • python312Packages.taskw
  • python312Packages.taskw-ng
  • python312Packages.taskw-ng.dist
  • python312Packages.taskw.dist
  • python313Packages.tasklib
  • python313Packages.tasklib.dist
  • python313Packages.taskw
  • python313Packages.taskw-ng
  • python313Packages.taskw-ng.dist
  • python313Packages.taskw.dist
  • tasknc
  • taskwarrior2
  • vit
  • vit.dist

@nixpkgs-ci nixpkgs-ci bot added the 12.approvals: 1 This PR was reviewed and approved by one person. label Oct 9, 2025
@LordGrimmauld
Copy link
Contributor

image

cmake_minimum_required would need to be adjusted in all files for it to work.
Seeing as 2.x receives no more updates, the likelyhood of upstream pushing a version upgrading cmake (and our nixpkgs cli flag subsequently actually downgrading it) seems negligible, and fixing all these occurences would be a lot of find+replace. So i am willing to accept the CLI flag here.

@nixpkgs-ci nixpkgs-ci bot added 12.approvals: 2 This PR was reviewed and approved by two persons. and removed 12.approvals: 1 This PR was reviewed and approved by one person. labels Oct 9, 2025
@bjornfor
Copy link
Contributor Author

bjornfor commented Oct 9, 2025

cmake_minimum_required would need to be adjusted in all files for it to work.

Thanks! (I wondered why it didn't work for me after changing the entry in the root file -- didn't think of the possibility to have it more than once. Why would anyone have that directive more than once in a repo though?)

@bjornfor bjornfor enabled auto-merge October 9, 2025 17:40
@bjornfor bjornfor added this pull request to the merge queue Oct 9, 2025
Merged via the queue into NixOS:master with commit 13fdddc Oct 9, 2025
31 of 35 checks passed
@bjornfor bjornfor deleted the fix-taskwarrior2 branch October 9, 2025 17:43
@LordGrimmauld
Copy link
Contributor

Why would anyone have that directive more than once in a repo though?

i didn't look at the exact reason in taskwarrior - prusa slicer has a similar situation going on, over there the reason is vendored deps having their own cmake files. Which (by logic of being vendored) use whatever cmake things upstream-upstream defined. In the case of taskwarrior, this is probably not actually vendor deps, but there is legitimate scenarios.

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

Labels

10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. 12.approvals: 2 This PR was reviewed and approved by two persons.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants