Skip to content

mlt:Add GDK and pango#377764

Closed
joostn wants to merge 2 commits intoNixOS:masterfrom
joostn:fix-shotcut3
Closed

mlt:Add GDK and pango#377764
joostn wants to merge 2 commits intoNixOS:masterfrom
joostn:fix-shotcut3

Conversation

@joostn
Copy link
Contributor

@joostn joostn commented Jan 29, 2025

This is to solve a problem in the shotcut package:

Attempting to add text to a movie resulted in this error in the shotcut Application log:
[Warning] [filter 0x2cd39390] QT or GTK modules required for text.
[Warning] [filter 0x36c70710] Unable to create text filter.

This can be traced to
https://github.com/mltframework/mlt/blob/2b650c65cb5e265864cda8c3eff91945d406c56e/src/modules/plus/filter_text.c#L213

which suggests that we either need 'qtext' or pango. I don't know what qtext is, so I've added pango to the mlt dependencies.

mlt's CMakeLists.txt has this:

if(MOD_GDK)
  pkg_check_modules(GdkPixbuf IMPORTED_TARGET gdk-pixbuf-2.0)
  if(TARGET PkgConfig::GdkPixbuf)
    pkg_check_modules(pango IMPORTED_TARGET pango)
    pkg_check_modules(pangoft2 IMPORTED_TARGET pangoft2)
    list(APPEND MLT_SUPPORTED_COMPONENTS gdk)
  else()
    set(MOD_GDK OFF)
  endif()
endif()

The cmake configure log complains about the missing gdk-pixbuf.
So I have added gdk-pixbuf and pango to the dependencies. I've also set MOD_GDK=1 though this is already the default.

I've rebuilt my nixos system and this indeed solves the problem in Shotcut!

Ping shotcut maintainers: @woffs and @peti

I'm new to nixos. In particular I'm not sure if what I did is safe to do on Darwin.

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/)
  • 25.05 Release Notes (or backporting 24.11 and 25.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.

@NixOSInfra NixOSInfra added the 12.first-time contribution This PR is the author's first one; please be gentle! label Jan 29, 2025
@github-actions github-actions bot added 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. labels Jan 29, 2025
@woffs
Copy link
Contributor

woffs commented Feb 3, 2025

Looks good to me. Your patch works and fixes video text filter in shotcut, thanks a lot for your first-time contribution! 🎉
Please edit the PR title so it starts with "mlt: ".

@joostn joostn changed the title Add GDK and pango mlt:Add GDK and pango Feb 3, 2025
@woffs
Copy link
Contributor

woffs commented Feb 3, 2025

Thank you. (You don't need to merge master until conflicts emerge, and then it's rather recommended to rebase instead.)

Maybe the other applications (flowblade hikounomizu kdenlive krita synfigstudio) depending on mlt need to be checked additionally. The impact on darwin is also out of my scope.

@joostn
Copy link
Contributor Author

joostn commented Feb 3, 2025

Sorry for that, I merged master in an attempt to get rid of the failed nixfmt_check.

Now that I look again, I must admit that I don't understand if pango and gdkpixbuf should also be added buildInputs.

Maybe we should make it an optional dependency? Then it will only affect shotcut.

@nixos-discourse
Copy link

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

https://discourse.nixos.org/t/prs-ready-for-review/3032/5180

Comment on lines +66 to +67
pango
gdk-pixbuf
Copy link
Member

Choose a reason for hiding this comment

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

These should go in buildInputs instead, indeed

@wegank wegank added the 2.status: merge conflict This PR has merge conflicts with the target branch label May 17, 2025
@nixpkgs-ci nixpkgs-ci bot removed the 12.first-time contribution This PR is the author's first one; please be gentle! label Jun 25, 2025
@woffs
Copy link
Contributor

woffs commented Jul 2, 2025

Looking at the mlt newsfeed I'd rather try to make qtext work again and not pull in pango/gdk into that Qt thing.

@woffs
Copy link
Contributor

woffs commented Jul 2, 2025

re-adding qt to mlt fixed the text filter bug, no need for pango/gdk, see #421788

@woffs woffs closed this Jul 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2.status: merge conflict This PR has merge conflicts with the target branch 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants