Change:
Shotcut cannot start Steps to reproduce the behavior: Get error message Shotcut works <!-- Please @ people who are in the list of the offending package or module. If in doubt, check for whoever last touched something. --- system: host os: multi-user?: sandbox: version: nixpkgs:
I cannot reproduce it for now, my system is system: host os: multi-user?: sandbox: version: channels(root): nixpkgs: Do you have anything qt related installed in your profile? Maybe there is even interaction with qt applications installed system-wide, if their version is different from 6.6.2. I guess we have to backport this shotcut/mlt version to nixos-23.11 to avoid this.
Thx for fast answer. Nope. I've tried to delete all other possible qt related apps, same result. I am running on sway. Is there a way i can help you to debug this issue?
I've tried to backport shotcut and mlt from unstable to 23.11 branch. Build succeeded but I am having the same error message if I am trying to run shotcut. Have no clue how to find that is wrong...
found it. It seems that it's just a missing qtwayland dependency. Works now. Anyway strange message from qt
could you provide a pull request to fix wayland support for shotcut? just adding qtwayland? (I have no wayland here.)

Discussion:
<del> { lib , fetchFromGitHub , stdenv , wrapQtAppsHook , substituteAll , SDL2 , frei0r , ladspaPlugins , gettext , mlt , jack1 , pkg-config , fftw , qtbase , qttools , qtmultimedia , qtcharts , cmake , Cocoa , gitUpdater }: stdenv.mkDerivation (finalAttrs: { pname = "shotcut"; version = "24.06.26"; src = fetchFromGitHub { owner = "mltframework"; repo = "shotcut"; rev = "v${finalAttrs.version}"; hash = "sha256-9eQF3s4BAUK81/94z7cMkd2NWdNLVMraP08qsDmuAI8="; }; nativeBuildInputs = [ pkg-config cmake wrapQtAppsHook ]; buildInputs = [ SDL2 frei0r ladspaPlugins gettext mlt fftw qtbase qttools qtmultimedia qtcharts ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Cocoa ]; env.NIX_CFLAGS_COMPILE = "-DSHOTCUT_NOUPGRADE"; cmakeFlags = [ "-DSHOTCUT_VERSION=${finalAttrs.version}" ]; patches = [ (substituteAll { inherit mlt; src = ./fix-mlt-ffmpeg-path.patch; }) ]; qtWrapperArgs = [ "--set FREI0R_PATH ${frei0r}/lib/frei0r-1" "--set LADSPA_PATH ${ladspaPlugins}/lib/ladspa" "--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath ([SDL2] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [jack1])}" ]; postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir $out/Applications $out/bin mv $out/Shotcut.app $out/Applications/Shotcut.app ln -s $out/Applications/Shotcut.app/Contents/MacOS/Shotcut $out/bin/shotcut ''; passthru.updateScript = gitUpdater { rev-prefix = "v"; }; meta = with lib; { description = "Free, open source, cross-platform video editor"; longDescription = '' An official binary for Shotcut, which includes all the dependencies pinned to specific versions, is provided on http://shotcut.org. If you encounter problems with this version, please contact the nixpkgs maintainer(s). If you wish to report any bugs upstream, please use the official build from shotcut.org instead. ''; homepage = "https://shotcut.org"; license = licenses.gpl3Plus; maintainers = with maintainers; [ woffs peti ]; platforms = platforms.unix; mainProgram = "shotcut"; }; }) </del>

<del> diff --git a/src/docks/encodedock.cpp b/src/docks/encodedock.cpp index 3359f676..24e44f98 100644 --- a/src/docks/encodedock.cpp +++ b/src/docks/encodedock.cpp @@ -2177,7 +2177,7 @@ bool EncodeDock::detectHardwareEncoders() { MAIN.showStatusMessage(tr("Detecting hardware encoders...")); QStringList hwlist; -    QFileInfo ffmpegPath(qApp->applicationDirPath(), "ffmpeg"); +    QFileInfo ffmpegPath("@ffmpeg@/bin/ffmpeg"); foreach (const QString &codec, codecs()) { LOG_INFO() << "checking for" << codec; QProcess proc; @@ -2220,7 +2220,7 @@ bool EncodeDock::detectHardwareEncoders() QString &EncodeDock::defaultFormatExtension() { auto format = ui->formatCombo->currentText(); -    QFileInfo ffmpegPath(qApp->applicationDirPath(), "ffmpeg"); +    QFileInfo ffmpegPath("@ffmpeg@/bin/ffmpeg"); QProcess proc; QStringList args; args << "-hide_banner" << "-h" << format.prepend("muxer="); diff --git a/src/jobs/ffmpegjob.cpp b/src/jobs/ffmpegjob.cpp index 1f15e647..b6ad6633 100644 --- a/src/jobs/ffmpegjob.cpp +++ b/src/jobs/ffmpegjob.cpp @@ -54,7 +54,7 @@ FfmpegJob::~FfmpegJob() void FfmpegJob::start() { QString shotcutPath = qApp->applicationDirPath(); -    QFileInfo ffmpegPath(shotcutPath, "ffmpeg"); +    QFileInfo ffmpegPath("@ffmpeg@/bin/ffmpeg"); setReadChannel(QProcess::StandardError); LOG_DEBUG() << ffmpegPath.absoluteFilePath() + " " + m_args.join(' '); AbstractJob::start(ffmpegPath.absoluteFilePath(), m_args); diff --git a/src/jobs/meltjob.cpp b/src/jobs/meltjob.cpp index fd8c00b8..9150fe7b 100644 --- a/src/jobs/meltjob.cpp +++ b/src/jobs/meltjob.cpp @@ -98,9 +98,9 @@ void MeltJob::start() } QString shotcutPath = qApp->applicationDirPath(); #if defined(Q_OS_UNIX) && !defined(Q_OS_MAC) -    QFileInfo meltPath(shotcutPath, "melt-7"); +    QFileInfo meltPath("@mlt@/bin/melt"); #else -    QFileInfo meltPath(shotcutPath, "melt"); +    QFileInfo meltPath("@mlt@/bin/melt"); #endif setReadChannel(QProcess::StandardError); QStringList args; diff --git a/src/mltcontroller.cpp b/src/mltcontroller.cpp index 1e2299ac..b8f39f12 100644 --- a/src/mltcontroller.cpp +++ b/src/mltcontroller.cpp @@ -1555,9 +1555,9 @@ int Controller::checkFile(const QString &path) || path.endsWith(".aep")) { QString shotcutPath = qApp->applicationDirPath(); #if defined(Q_OS_UNIX) && !defined(Q_OS_MAC) -        QFileInfo meltPath(shotcutPath, "melt-7"); +        QFileInfo meltPath("@mlt@/bin/melt"); #else -        QFileInfo meltPath(shotcutPath, "melt"); +        QFileInfo meltPath("@mlt@/bin/melt"); #endif QStringList args; args << "-quiet" << "-consumer" << "null" << "real_time=0" << "out=0" << "terminate_on_pause=1" << diff --git a/src/widgets/directshowvideowidget.cpp b/src/widgets/directshowvideowidget.cpp index c91ba821..73dd5a61 100644 --- a/src/widgets/directshowvideowidget.cpp +++ b/src/widgets/directshowvideowidget.cpp @@ -35,7 +35,7 @@ DirectShowVideoWidget::DirectShowVideoWidget(QWidget *parent) : ui->setupUi(this); Util::setColorsToHighlight(ui->label); #ifdef Q_OS_WIN -    QFileInfo ffmpegPath(qApp->applicationDirPath(), "ffmpeg"); +    QFileInfo ffmpegPath("@ffmpeg@/bin/ffmpeg"); QProcess proc; QStringList args; args << "-hide_banner" << "-list_devices" << "true" << "-f" << "dshow" << "-i" << "dummy"; </del>

<ins> diff --git a/src/docks/encodedock.cpp b/src/docks/encodedock.cpp index 3359f676..24e44f98 100644 --- a/src/docks/encodedock.cpp +++ b/src/docks/encodedock.cpp @@ -2177,7 +2177,7 @@ bool EncodeDock::detectHardwareEncoders() { MAIN.showStatusMessage(tr("Detecting hardware encoders...")); QStringList hwlist; -    QFileInfo ffmpegPath(qApp->applicationDirPath(), "ffmpeg"); +    QFileInfo ffmpegPath("@ffmpeg@/bin/ffmpeg"); foreach (const QString &codec, codecs()) { LOG_INFO() << "checking for" << codec; QProcess proc; @@ -2220,7 +2220,7 @@ bool EncodeDock::detectHardwareEncoders() QString &EncodeDock::defaultFormatExtension() { auto format = ui->formatCombo->currentText(); -    QFileInfo ffmpegPath(qApp->applicationDirPath(), "ffmpeg"); +    QFileInfo ffmpegPath("@ffmpeg@/bin/ffmpeg"); QProcess proc; QStringList args; args << "-hide_banner" << "-h" << format.prepend("muxer="); diff --git a/src/jobs/ffmpegjob.cpp b/src/jobs/ffmpegjob.cpp index 1f15e647..b6ad6633 100644 --- a/src/jobs/ffmpegjob.cpp +++ b/src/jobs/ffmpegjob.cpp @@ -54,7 +54,7 @@ FfmpegJob::~FfmpegJob() void FfmpegJob::start() { QString shotcutPath = qApp->applicationDirPath(); -    QFileInfo ffmpegPath(shotcutPath, "ffmpeg"); +    QFileInfo ffmpegPath("@ffmpeg@/bin/ffmpeg"); setReadChannel(QProcess::StandardError); LOG_DEBUG() << ffmpegPath.absoluteFilePath() + " " + m_args.join(' '); AbstractJob::start(ffmpegPath.absoluteFilePath(), m_args); diff --git a/src/jobs/meltjob.cpp b/src/jobs/meltjob.cpp index fd8c00b8..9150fe7b 100644 --- a/src/jobs/meltjob.cpp +++ b/src/jobs/meltjob.cpp @@ -98,9 +98,9 @@ void MeltJob::start() } QString shotcutPath = qApp->applicationDirPath(); #if defined(Q_OS_UNIX) && !defined(Q_OS_MAC) -    QFileInfo meltPath(shotcutPath, "melt-7"); +    QFileInfo meltPath("@mlt@/bin/melt"); #else -    QFileInfo meltPath(shotcutPath, "melt"); +    QFileInfo meltPath("@mlt@/bin/melt"); #endif setReadChannel(QProcess::StandardError); QStringList args; diff --git a/src/mltcontroller.cpp b/src/mltcontroller.cpp index 1e2299ac..b8f39f12 100644 --- a/src/mltcontroller.cpp +++ b/src/mltcontroller.cpp @@ -1555,9 +1555,9 @@ int Controller::checkFile(const QString &path) || path.endsWith(".aep")) { QString shotcutPath = qApp->applicationDirPath(); #if defined(Q_OS_UNIX) && !defined(Q_OS_MAC) -        QFileInfo meltPath(shotcutPath, "melt-7"); +        QFileInfo meltPath("@mlt@/bin/melt"); #else -        QFileInfo meltPath(shotcutPath, "melt"); +        QFileInfo meltPath("@mlt@/bin/melt"); #endif QStringList args; args << "-quiet" << "-consumer" << "null" << "real_time=0" << "out=0" << "terminate_on_pause=1" << diff --git a/src/widgets/directshowvideowidget.cpp b/src/widgets/directshowvideowidget.cpp index c91ba821..73dd5a61 100644 --- a/src/widgets/directshowvideowidget.cpp +++ b/src/widgets/directshowvideowidget.cpp @@ -35,7 +35,7 @@ DirectShowVideoWidget::DirectShowVideoWidget(QWidget *parent) : ui->setupUi(this); Util::setColorsToHighlight(ui->label); #ifdef Q_OS_WIN -    QFileInfo ffmpegPath(qApp->applicationDirPath(), "ffmpeg"); +    QFileInfo ffmpegPath("@ffmpeg@/bin/ffmpeg"); QProcess proc; QStringList args; args << "-hide_banner" << "-list_devices" << "true" << "-f" << "dshow" << "-i" << "dummy"; </ins>

<ins> { lib, fetchFromGitHub, stdenv, substituteAll, SDL2, frei0r, ladspaPlugins, gettext, mlt, jack1, pkg-config, fftw, qt6, cmake, darwin, gitUpdater, }: stdenv.mkDerivation (finalAttrs: { pname = "shotcut"; version = "24.06.26"; src = fetchFromGitHub { owner = "mltframework"; repo = "shotcut"; rev = "v${finalAttrs.version}"; hash = "sha256-9eQF3s4BAUK81/94z7cMkd2NWdNLVMraP08qsDmuAI8="; }; nativeBuildInputs = [ pkg-config cmake qt6.wrapQtAppsHook ]; buildInputs = [ SDL2 frei0r ladspaPlugins gettext mlt fftw qt6.qtbase qt6.qttools qt6.qtmultimedia qt6.qtcharts qt6.qtwayland ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Cocoa ]; env.NIX_CFLAGS_COMPILE = "-DSHOTCUT_NOUPGRADE"; cmakeFlags = [ "-DSHOTCUT_VERSION=${finalAttrs.version}" ]; patches = [ (substituteAll { inherit mlt; src = ./fix-mlt-ffmpeg-path.patch; }) ]; qtWrapperArgs = [ "--set FREI0R_PATH ${frei0r}/lib/frei0r-1" "--set LADSPA_PATH ${ladspaPlugins}/lib/ladspa" "--prefix LD_LIBRARY_PATH : ${ lib.makeLibraryPath ([ SDL2 ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ jack1 ]) }" ]; postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir $out/Applications $out/bin mv $out/Shotcut.app $out/Applications/Shotcut.app ln -s $out/Applications/Shotcut.app/Contents/MacOS/Shotcut $out/bin/shotcut ''; passthru.updateScript = gitUpdater { rev-prefix = "v"; }; meta = with lib; { description = "Free, open source, cross-platform video editor"; longDescription = '' An official binary for Shotcut, which includes all the dependencies pinned to specific versions, is provided on http://shotcut.org. If you encounter problems with this version, please contact the nixpkgs maintainer(s). If you wish to report any bugs upstream, please use the official build from shotcut.org instead. ''; homepage = "https://shotcut.org"; license = licenses.gpl3Plus; maintainers = with maintainers; [ woffs peti ]; platforms = platforms.unix; mainProgram = "shotcut"; }; }) </ins>

shod = callPackage ../applications/window-managers/shod { }; <del> shotcut = qt6Packages.callPackage ../applications/video/shotcut { inherit (darwin.apple_sdk.frameworks) Cocoa; }; </del> shogun = callPackage ../applications/science/machine-learning/shogun { protobuf = protobuf_21; };