Skip to content

digikam: modernize, update, and use Qt 6; libsForQt5.libqtav: drop#329470

Merged
emilazy merged 6 commits intoNixOS:masterfrom
emilazy:push-omxsrkkkvymx
Jul 26, 2024
Merged

digikam: modernize, update, and use Qt 6; libsForQt5.libqtav: drop#329470
emilazy merged 6 commits intoNixOS:masterfrom
emilazy:push-omxsrkkkvymx

Conversation

@emilazy
Copy link
Member

@emilazy emilazy commented Jul 23, 2024

Description of changes

As part of my quest to get rid of FFmpeg 4, I noticed that digiKam was depending on an unmaintained library called QtAV. As it turns out, it wasn‘t actually using the library at all, but I gave it a bump to prepare it for FFmpeg 7 and updated the whole thing to Qt 6 for good measure too. There are a couple of features still missing from the Qt 6 version, but some new ones that are exclusive to it as well.

I‘ve tested various parts of the application‘s functionality and it seems to work fine.

@eclairevoyant I noticed you added cmake to depsBuildBuild even though it was already in nativeBuildInputs. Can you help me understand if that was necessary and if I should keep it here?

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

emilazy added 4 commits July 23, 2024 18:54
This isn’t being used any more; on Qt 5 they use QtAVPlayer and on
Qt 6 they use the Qt Multimedia module.
Includes fixes for FFmpeg 7.
@eclairevoyant
Copy link
Contributor

it's for strictDeps.

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
sourceProvenance = [ lib.sourceTypes.fromSource ];

https://nixos.org/manual/nixpkgs/unstable/#sec-meta-sourceProvenance

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmm, I see that this is technically a semantic no‐op according to the manual, but it’s intended to be a forward‐looking change: defining a sourceProvenance list conveys something different to using the default, because it implies a best-effort attempt at exhaustively outlining the provenance; hopefully, in the future, we can change the semantics so that an explicitly‐defined sourceProvenance is intended to convey something exhaustive, like license is, and at that point there would be a desire to annotate from‐source packages like this which I’m trying to get ahead of. Especially since there are definitely non‐source packages out there with no annotation.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'd prefer to get consensus before explicitly contradicting the manual.
And then the manual should be updated in that case.

Copy link
Member Author

Choose a reason for hiding this comment

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

The manual doesn’t say that you shouldn’t define sourceProvenance like this. It just says that it currently doesn’t mean anything more than the empty string. But to humans, it clearly does, I think.

Do you mind if I ask on Matrix for opinions about this? If people are strongly against having this in there then I can remove it, but I do suspect we’re going to hopefully end up in a world where we expect everything to define sourceProvenance and I’d rather document it now than for there to be one more package that will need inspection and annotation later.

Copy link
Contributor

Choose a reason for hiding this comment

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

If a package contains elements that are not built from the original source by a nixpkgs derivation, the meta.sourceProvenance attribute should be a list containing one or more value from lib.sourceTypes defined in nixpkgs/lib/source-types.nix.

If we're expecting people to document this even for packages built from source, this bit needs to be changed.

Copy link
Member Author

Choose a reason for hiding this comment

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

I wouldn’t say expected; I just don’t think it’s harmful in any way, and provides some benefit. To quote @toonn on Matrix:

I think it can only be helpful, not harmful. Don't even think the manual has to change, it says "if binary then SHOULD..." that says nothing about "if not binary," so it leaves it open to whatever the package maintainer feels like.
Unless it's a lie of course, then it could be harmful.

As an analogy, consider licensing – we assume the best by default, so license = lib.licenses.free; is technically redundant, but it’s clearly more valuable to have that declaration than not, even if it has no strict semantic effect: it makes it clear that someone has thought about what licence the package is under and thinks it qualifies as FOSS. In the future, we may want to be more strict, requiring packages to list a license (perhaps with a treewide sweep for ones that don’t), and not assuming that packages with no licence declared are FOSS (as it has been wrong in the past); in that case, we’d be grateful for people who specified license = lib.licenses.free;. In my view, the exact same situation applies here, and I don’t think that’s in contradiction to what the manual says at all.

Copy link
Member Author

Choose a reason for hiding this comment

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

To put it another way: If “from source” is assumed by default, and omission from the list is not a statement of absence, then why have fromSource at all, as it never conveys any additional information per the semantics given in the manual? Because it’s still providing more information that can be useful to readers now and policy in the future.

Copy link
Contributor

@khaneliman khaneliman Jul 23, 2024

Choose a reason for hiding this comment

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

If a package contains elements that are not built from the original source by a nixpkgs derivation, the meta.sourceProvenance attribute should be a list containing one or more value from lib.sourceTypes defined in nixpkgs/lib/source-types.nix.

If we're expecting people to document this even for packages built from source, this bit needs to be changed.

That reads, to me, like it's just explaining how you'd define things that are not built from source and that it may be multiple source types. Not that you shouldn't use it when it is built from source.

@Atemu
Copy link
Member

Atemu commented Jul 23, 2024

it's for strictDeps.

But why? Is it because cmake generates makefiles for the build itself to use?

@emilazy
Copy link
Member Author

emilazy commented Jul 23, 2024

Yeah, I don’t quite understand since strictDeps is still on here and it builds fine. Is it because the build files can themselves call back into cmake? I know that CMake is kind of broken with strictDeps anyway, although I think in ways unrelated to this.

@eclairevoyant
Copy link
Contributor

If it works without it, might as well remove it, it's almost a completely different derivation at this point.

@emilazy
Copy link
Member Author

emilazy commented Jul 23, 2024

It does build for me, at least. I thought maybe it would only cause an issue for cross‐compilation or something.

@eclairevoyant
Copy link
Contributor

Well just for fun, I'll see if cross-compilation works. Could've been some artifact of qt5 packaging at the time, I really don't recall.

emilazy added 2 commits July 23, 2024 20:20
Abandoned upstream, only works with old versions of FFmpeg, and the
only reverse dependency (digiKam) hadn’t actually been using it in
quite a while.
@ofborg ofborg bot added 8.has: clean-up This PR removes packages or removes other cruft 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 Jul 23, 2024
@emilazy emilazy force-pushed the push-omxsrkkkvymx branch from 56b4c43 to fee2b5c Compare July 23, 2024 20:01
@emilazy
Copy link
Member Author

emilazy commented Jul 26, 2024

@eclairevoyant Any luck with the cross‐compile?

@eclairevoyant
Copy link
Contributor

No, qt cross in general is broken, so feel free to merge as is. I haven't tested runtime myself either fyi

@emilazy
Copy link
Member Author

emilazy commented Jul 26, 2024

I already ran it myself and exercised a bunch of functionality, so hopefully this should be good to go. The main thing I can see biting us is the temporary removal of scanner support, but hopefully that’ll hit the Qt 6 branch soon.

@emilazy emilazy merged commit b8faf5d into NixOS:master Jul 26, 2024
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/frustrations-about-splicing/49607/23

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

Labels

8.has: clean-up This PR removes packages or removes other cruft 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.

5 participants