nixpkgs/pkgs/by-name/di/digikam/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

168 lines
3.1 KiB
Nix
Raw Normal View History

{
stdenv,
config,
lib,
fetchFromGitLab,
cmake,
ninja,
doxygen,
extra-cmake-modules,
wrapGAppsHook3,
# For `digitaglinktree`
perl,
sqlite,
libsForQt5,
bison,
boost,
eigen,
exiv2,
ffmpeg_4,
flex,
graphviz,
imagemagick,
lcms2,
lensfun,
libgphoto2,
liblqr1,
libusb1,
libheif,
libGL,
libGLU,
opencv,
pcre,
x265,
jasper,
bash,
# For panorama and focus stacking
enblend-enfuse,
hugin,
gnumake,
cudaSupport ? config.cudaSupport,
cudaPackages ? { },
}:
2024-07-15 10:57:36 +00:00
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=";
};
2024-01-20 16:57:25 +00:00
strictDeps = true;
nativeBuildInputs = [
cmake
ninja
doxygen
extra-cmake-modules
2024-01-20 16:28:18 +00:00
libsForQt5.kdoctools
libsForQt5.wrapQtAppsHook
wrapGAppsHook3
] ++ lib.optionals cudaSupport (with cudaPackages; [ cuda_nvcc ]);
buildInputs =
[
bison
boost
eigen
exiv2
ffmpeg_4
flex
graphviz
imagemagick
lcms2
lensfun
libgphoto2
libheif
liblqr1
libusb1
libGL
libGLU
opencv
pcre
x265
jasper
]
++ (with libsForQt5; [
libkipi
libksane
qtbase
qtxmlpatterns
qtsvg
qtwebengine
qtnetworkauth
akonadi-contacts
kcalendarcore
kconfigwidgets
kcoreaddons
kfilemetadata
knotifications
knotifyconfig
ktextwidgets
kwidgetsaddons
kxmlgui
breeze-icons
marble
oxygen
threadweaver
])
++ lib.optionals cudaSupport (with cudaPackages; [ cuda_cudart ]);
postPatch = ''
substituteInPlace \
core/dplugins/bqm/custom/userscript/userscript.cpp \
core/utilities/import/backend/cameracontroller.cpp \
--replace-fail \"/bin/bash\" \"${lib.getExe bash}\"
'';
cmakeFlags = [
"-DENABLE_MYSQLSUPPORT=1"
"-DENABLE_INTERNALMYSQL=1"
"-DENABLE_MEDIAPLAYER=1"
"-DENABLE_QWEBENGINE=on"
"-DENABLE_APPSTYLES=on"
2024-01-20 16:28:18 +00:00
"-DCMAKE_CXX_FLAGS=-I${libsForQt5.libksane}/include/KF5" # fix `#include <ksane_version.h>`
];
2020-11-01 14:22:55 +00:00
dontWrapGApps = true;
2017-05-16 15:56:41 +00:00
preFixup = ''
2020-11-01 14:22:55 +00:00
qtWrapperArgs+=("''${gappsWrapperArgs[@]}")
qtWrapperArgs+=(--prefix PATH : ${
lib.makeBinPath [
gnumake
hugin
enblend-enfuse
]
})
2024-07-15 10:57:36 +00:00
qtWrapperArgs+=(--suffix DK_PLUGIN_PATH : ${placeholder "out"}/${libsForQt5.qtbase.qtPluginPrefix}/digikam)
substituteInPlace $out/bin/digitaglinktree \
--replace "/usr/bin/perl" "${perl}/bin/perl" \
--replace "/usr/bin/sqlite3" "${sqlite}/bin/sqlite3"
'';
2024-07-15 10:57:36 +00:00
meta = {
description = "Photo management application";
homepage = "https://www.digikam.org/";
changelog = "${finalAttrs.src.meta.homepage}-/blob/master/project/NEWS.${finalAttrs.version}";
2024-07-15 10:57:36 +00:00
sourceProvenance = [ lib.sourceTypes.fromSource ];
license = lib.licenses.gpl2Plus;
maintainers = [ ];
platforms = lib.platforms.linux;
mainProgram = "digikam";
};
2024-07-15 10:57:36 +00:00
})