2024-07-27 06:49:29 +00:00
|
|
|
|
{
|
|
|
|
|
stdenv,
|
|
|
|
|
config,
|
|
|
|
|
lib,
|
|
|
|
|
fetchFromGitLab,
|
|
|
|
|
fetchgit,
|
|
|
|
|
|
|
|
|
|
cmake,
|
|
|
|
|
ninja,
|
|
|
|
|
extra-cmake-modules,
|
|
|
|
|
flex,
|
|
|
|
|
bison,
|
|
|
|
|
wrapGAppsHook3,
|
|
|
|
|
|
|
|
|
|
opencv,
|
|
|
|
|
libtiff,
|
|
|
|
|
libpng,
|
|
|
|
|
libjpeg,
|
|
|
|
|
libheif,
|
|
|
|
|
libjxl,
|
|
|
|
|
boost,
|
|
|
|
|
lcms2,
|
|
|
|
|
expat,
|
|
|
|
|
exiv2,
|
|
|
|
|
libxml2,
|
|
|
|
|
libxslt,
|
|
|
|
|
ffmpeg,
|
|
|
|
|
jasper,
|
|
|
|
|
eigen,
|
|
|
|
|
lensfun,
|
|
|
|
|
liblqr1,
|
|
|
|
|
libgphoto2,
|
|
|
|
|
libusb1,
|
|
|
|
|
imagemagick,
|
|
|
|
|
x265,
|
|
|
|
|
libGLX,
|
|
|
|
|
libGLU,
|
|
|
|
|
|
|
|
|
|
kdePackages,
|
|
|
|
|
|
|
|
|
|
# For `digitaglinktree`
|
|
|
|
|
perl,
|
|
|
|
|
sqlite,
|
|
|
|
|
|
|
|
|
|
runtimeShell,
|
|
|
|
|
# For panorama and focus stacking
|
|
|
|
|
enblend-enfuse,
|
|
|
|
|
hugin,
|
|
|
|
|
gnumake,
|
2020-04-24 23:36:52 +00:00
|
|
|
|
}:
|
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
|
let
|
|
|
|
|
testData = fetchgit {
|
|
|
|
|
url = "https://invent.kde.org/graphics/digikam-test-data.git";
|
|
|
|
|
rev = "d02dd20b23cc279792325a0f03d21688547a7a59";
|
|
|
|
|
fetchLFS = true;
|
|
|
|
|
hash = "sha256-SvsmcniDRorwu9x9OLtHD9ftgquyoE5Kl8qDgqi1XdQ=";
|
|
|
|
|
};
|
|
|
|
|
in
|
|
|
|
|
|
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
|
|
|
pname = "digikam";
|
|
|
|
|
version = "8.4.0";
|
|
|
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
|
domain = "invent.kde.org";
|
|
|
|
|
owner = "graphics";
|
|
|
|
|
repo = "digikam";
|
|
|
|
|
rev = "v${finalAttrs.version}";
|
|
|
|
|
hash = "sha256-GJYlxJkvFEXppVk0yC9ojszylfAGt3eBMAjNUu60XDY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
};
|
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
|
patches = [ ./disable-tests-download.patch ];
|
2024-04-21 15:54:59 +00:00
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
|
strictDeps = true;
|
2023-11-16 04:20:00 +00:00
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
|
nativeBuildInputs = [
|
|
|
|
|
cmake
|
2024-07-27 06:49:29 +00:00
|
|
|
|
ninja
|
2023-07-15 17:15:38 +00:00
|
|
|
|
extra-cmake-modules
|
2024-07-27 06:49:29 +00:00
|
|
|
|
flex
|
|
|
|
|
bison
|
|
|
|
|
kdePackages.wrapQtAppsHook
|
2024-05-15 15:35:15 +00:00
|
|
|
|
wrapGAppsHook3
|
2024-07-27 06:49:29 +00:00
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
# Based on <https://www.digikam.org/api/index.html#externaldeps>,
|
|
|
|
|
# but it doesn’t have everything, so you also have to check the
|
|
|
|
|
# CMake files…
|
|
|
|
|
#
|
|
|
|
|
# We list non‐Qt dependencies first to override Qt’s propagated
|
|
|
|
|
# build inputs.
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
buildInputs = [
|
2024-07-27 06:49:29 +00:00
|
|
|
|
opencv
|
|
|
|
|
libtiff
|
|
|
|
|
libpng
|
|
|
|
|
# TODO: Figure out how on earth to get it to pick up libjpeg8 for
|
|
|
|
|
# lossy DNG support.
|
|
|
|
|
libjpeg
|
|
|
|
|
libheif
|
|
|
|
|
libjxl
|
2020-04-24 23:36:52 +00:00
|
|
|
|
boost
|
|
|
|
|
lcms2
|
2024-07-27 06:49:29 +00:00
|
|
|
|
expat
|
|
|
|
|
exiv2
|
|
|
|
|
libxml2
|
|
|
|
|
libxslt
|
|
|
|
|
# Qt WebEngine uses and propagates FFmpeg, and if it’s a
|
|
|
|
|
# different version it causes linker warnings.
|
|
|
|
|
#ffmpeg
|
|
|
|
|
jasper
|
|
|
|
|
eigen
|
2020-04-24 23:36:52 +00:00
|
|
|
|
lensfun
|
|
|
|
|
liblqr1
|
2024-07-27 06:49:29 +00:00
|
|
|
|
libgphoto2
|
2020-04-24 23:36:52 +00:00
|
|
|
|
libusb1
|
2024-07-27 06:49:29 +00:00
|
|
|
|
imagemagick
|
2020-10-07 09:15:18 +00:00
|
|
|
|
x265
|
2024-07-27 06:49:29 +00:00
|
|
|
|
libGLX
|
|
|
|
|
libGLU
|
|
|
|
|
|
|
|
|
|
kdePackages.qtbase
|
|
|
|
|
kdePackages.qtnetworkauth
|
|
|
|
|
kdePackages.qtscxml
|
|
|
|
|
kdePackages.qtsvg
|
|
|
|
|
kdePackages.qtwebengine
|
|
|
|
|
kdePackages.qt5compat
|
|
|
|
|
kdePackages.qtmultimedia
|
|
|
|
|
|
|
|
|
|
kdePackages.kconfig
|
|
|
|
|
kdePackages.kxmlgui
|
|
|
|
|
kdePackages.ki18n
|
|
|
|
|
kdePackages.kwindowsystem
|
|
|
|
|
kdePackages.kservice
|
|
|
|
|
kdePackages.solid
|
|
|
|
|
kdePackages.kcoreaddons
|
|
|
|
|
kdePackages.knotifyconfig
|
|
|
|
|
kdePackages.knotifications
|
|
|
|
|
kdePackages.threadweaver
|
|
|
|
|
kdePackages.kiconthemes
|
|
|
|
|
kdePackages.kfilemetadata
|
|
|
|
|
kdePackages.kcalendarcore
|
|
|
|
|
kdePackages.kio
|
|
|
|
|
kdePackages.sonnet
|
|
|
|
|
# libksane and akonadi-contacts do not yet work when building for
|
|
|
|
|
# Qt 6.
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
checkInputs = [ kdePackages.qtdeclarative ];
|
|
|
|
|
|
|
|
|
|
postConfigure = lib.optionalString finalAttrs.doCheck ''
|
|
|
|
|
ln -s ${testData} $cmakeDir/test-data
|
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
|
postPatch = ''
|
|
|
|
|
substituteInPlace \
|
|
|
|
|
core/dplugins/bqm/custom/userscript/userscript.cpp \
|
|
|
|
|
core/utilities/import/backend/cameracontroller.cpp \
|
2024-07-27 06:49:29 +00:00
|
|
|
|
--replace-fail '"/bin/bash"' ${lib.escapeShellArg "\"${runtimeShell}\""}
|
2024-05-15 15:35:15 +00:00
|
|
|
|
'';
|
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
|
cmakeFlags = [
|
2024-07-27 06:49:29 +00:00
|
|
|
|
(lib.cmakeBool "BUILD_WITH_QT6" true)
|
|
|
|
|
(lib.cmakeBool "ENABLE_KFILEMETADATASUPPORT" true)
|
|
|
|
|
#(lib.cmakeBool "ENABLE_AKONADICONTACTSUPPORT" true)
|
|
|
|
|
(lib.cmakeBool "ENABLE_MEDIAPLAYER" true)
|
|
|
|
|
(lib.cmakeBool "ENABLE_APPSTYLES" true)
|
2020-04-24 23:36:52 +00:00
|
|
|
|
];
|
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
|
# Tests segfault for some reason…
|
|
|
|
|
# TODO: Get them working.
|
|
|
|
|
doCheck = false;
|
|
|
|
|
|
2020-11-03 02:18:15 +00:00
|
|
|
|
dontWrapGApps = true;
|
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
|
preFixup = ''
|
2020-11-03 02:18:15 +00:00
|
|
|
|
qtWrapperArgs+=("''${gappsWrapperArgs[@]}")
|
2024-07-27 06:49:29 +00:00
|
|
|
|
qtWrapperArgs+=(--prefix PATH : ${
|
|
|
|
|
lib.makeBinPath [
|
|
|
|
|
gnumake
|
|
|
|
|
hugin
|
|
|
|
|
enblend-enfuse
|
|
|
|
|
]
|
|
|
|
|
})
|
|
|
|
|
qtWrapperArgs+=(--suffix DK_PLUGIN_PATH : ${placeholder "out"}/${kdePackages.qtbase.qtPluginPrefix}/digikam)
|
2020-04-24 23:36:52 +00:00
|
|
|
|
substituteInPlace $out/bin/digitaglinktree \
|
|
|
|
|
--replace "/usr/bin/perl" "${perl}/bin/perl" \
|
|
|
|
|
--replace "/usr/bin/sqlite3" "${sqlite}/bin/sqlite3"
|
|
|
|
|
'';
|
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
|
meta = {
|
|
|
|
|
description = "Photo management application";
|
|
|
|
|
homepage = "https://www.digikam.org/";
|
|
|
|
|
changelog = "${finalAttrs.src.meta.homepage}-/blob/master/project/NEWS.${finalAttrs.version}";
|
|
|
|
|
sourceProvenance = [ lib.sourceTypes.fromSource ];
|
|
|
|
|
license = lib.licenses.gpl2Plus;
|
|
|
|
|
maintainers = [ ];
|
|
|
|
|
platforms = lib.platforms.linux;
|
2023-08-04 22:07:22 +00:00
|
|
|
|
mainProgram = "digikam";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
};
|
2024-07-27 06:49:29 +00:00
|
|
|
|
})
|