41 enableCuda ? config.cudaSupport,
45 # For `digitaglinktree`
50 # For panorama and focus stacking
58 url = "https://invent.kde.org/graphics/digikam-test-data.git";
59 rev = "d02dd20b23cc279792325a0f03d21688547a7a59";
61 hash = "sha256-SvsmcniDRorwu9x9OLtHD9ftgquyoE5Kl8qDgqi1XdQ=";
65 stdenv.mkDerivation (finalAttrs: {
69 src = fetchFromGitLab {
70 domain = "invent.kde.org";
73 rev = "v${finalAttrs.version}";
74 hash = "sha256-KO6kq0SlYzu7sh6+7JQWhIeHNowy3fx03OFTdDwyR10=";
78 ./disable-tests-download.patch
89 kdePackages.wrapQtAppsHook
93 # Based on <https://www.digikam.org/api/index.html#externaldeps>,
94 # but it doesn’t have everything, so you also have to check the
97 # We list non‐Qt dependencies first to override Qt’s propagated
104 # TODO: Figure out how on earth to get it to pick up libjpeg8 for
115 # Qt WebEngine uses and propagates FFmpeg, and if it’s a
116 # different version it causes linker warnings.
130 kdePackages.qtnetworkauth
133 kdePackages.qtwayland
134 kdePackages.qtwebengine
135 kdePackages.qt5compat
136 kdePackages.qtmultimedia
141 kdePackages.kwindowsystem
144 kdePackages.kcoreaddons
145 kdePackages.knotifyconfig
146 kdePackages.knotifications
147 kdePackages.threadweaver
148 kdePackages.kiconthemes
149 kdePackages.kfilemetadata
150 kdePackages.kcalendarcore
153 # libksane and akonadi-contacts do not yet work when building for
157 checkInputs = [ kdePackages.qtdeclarative ];
159 postConfigure = lib.optionalString finalAttrs.finalPackage.doCheck ''
160 ln -s ${testData} $cmakeDir/test-data
165 core/dplugins/bqm/custom/userscript/userscript.cpp \
166 core/utilities/import/backend/cameracontroller.cpp \
167 --replace-fail '"/bin/bash"' ${lib.escapeShellArg "\"${runtimeShell}\""}
171 (lib.cmakeBool "BUILD_WITH_QT6" true)
172 (lib.cmakeBool "ENABLE_KFILEMETADATASUPPORT" true)
173 #(lib.cmakeBool "ENABLE_AKONADICONTACTSUPPORT" true)
174 (lib.cmakeBool "ENABLE_MEDIAPLAYER" true)
175 (lib.cmakeBool "ENABLE_APPSTYLES" true)
176 (lib.optionals enableCuda "-DCUDA_TOOLKIT_ROOT_DIR=${cudaPackages.cudatoolkit}")
179 # Tests segfault for some reason…
180 # TODO: Get them working.
183 dontWrapGApps = true;
186 qtWrapperArgs+=("''${gappsWrapperArgs[@]}")
187 qtWrapperArgs+=(--prefix PATH : ${
195 qtWrapperArgs+=(--suffix DK_PLUGIN_PATH : ${placeholder "out"}/${kdePackages.qtbase.qtPluginPrefix}/digikam)
196 substituteInPlace $out/bin/digitaglinktree \
197 --replace "/usr/bin/perl" "${lib.getExe perl}" \
198 --replace "/usr/bin/sqlite3" "${lib.getExe sqlite}"
202 description = "Photo management application";
203 homepage = "https://www.digikam.org/";
204 changelog = "${finalAttrs.src.meta.homepage}-/blob/master/project/NEWS.${finalAttrs.version}";
205 sourceProvenance = [ lib.sourceTypes.fromSource ];
206 license = lib.licenses.gpl2Plus;
208 platforms = lib.platforms.linux;
209 mainProgram = "digikam";