mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 11:10:03 +00:00
Merge pull request #329470 from emilazy/push-omxsrkkkvymx
digikam: modernize, update, and use Qt 6; libsForQt5.libqtav: drop
This commit is contained in:
commit
b8faf5d599
15
pkgs/by-name/di/digikam/disable-tests-download.patch
Normal file
15
pkgs/by-name/di/digikam/disable-tests-download.patch
Normal file
|
@ -0,0 +1,15 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 43636fa9b9...e8da76c480 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -208,10 +208,6 @@
|
||||
# For CI runners to run tests, the following custom target serves to perform the download automatically.
|
||||
# If the directory "test-data" has already been created, the target becomes a "no-op".
|
||||
#
|
||||
- add_custom_command(OUTPUT ${CMAKE_SOURCE_DIR}/test-data
|
||||
- COMMENT "Checkout unit-test data repository. Please wait..."
|
||||
- COMMAND git
|
||||
- ARGS clone https://invent.kde.org/graphics/digikam-test-data.git ${CMAKE_SOURCE_DIR}/test-data)
|
||||
add_custom_target(test-data ALL DEPENDS ${CMAKE_SOURCE_DIR}/test-data)
|
||||
|
||||
endif()
|
|
@ -1,149 +1,202 @@
|
|||
{ stdenv, config, lib, fetchurl, cmake, doxygen, extra-cmake-modules, wrapGAppsHook3
|
||||
{
|
||||
stdenv,
|
||||
config,
|
||||
lib,
|
||||
fetchFromGitLab,
|
||||
fetchgit,
|
||||
|
||||
# For `digitaglinktree`
|
||||
, perl, sqlite
|
||||
cmake,
|
||||
ninja,
|
||||
extra-cmake-modules,
|
||||
flex,
|
||||
bison,
|
||||
wrapGAppsHook3,
|
||||
|
||||
, libsForQt5
|
||||
opencv,
|
||||
libtiff,
|
||||
libpng,
|
||||
libjpeg,
|
||||
libheif,
|
||||
libjxl,
|
||||
boost,
|
||||
lcms2,
|
||||
expat,
|
||||
exiv2,
|
||||
libxml2,
|
||||
libxslt,
|
||||
ffmpeg,
|
||||
jasper,
|
||||
eigen,
|
||||
lensfun,
|
||||
liblqr1,
|
||||
libgphoto2,
|
||||
libusb1,
|
||||
imagemagick,
|
||||
x265,
|
||||
libGLX,
|
||||
libGLU,
|
||||
|
||||
, bison
|
||||
, boost
|
||||
, eigen
|
||||
, exiv2
|
||||
, ffmpeg_4
|
||||
, flex
|
||||
, graphviz
|
||||
, imagemagick
|
||||
, lcms2
|
||||
, lensfun
|
||||
, libgphoto2
|
||||
, liblqr1
|
||||
, libusb1
|
||||
, libheif
|
||||
, libGL
|
||||
, libGLU
|
||||
, opencv
|
||||
, pcre
|
||||
, x265
|
||||
, jasper
|
||||
kdePackages,
|
||||
|
||||
, bash
|
||||
# For panorama and focus stacking
|
||||
, enblend-enfuse
|
||||
, hugin
|
||||
, gnumake
|
||||
# For `digitaglinktree`
|
||||
perl,
|
||||
sqlite,
|
||||
|
||||
, cudaSupport ? config.cudaSupport
|
||||
, cudaPackages ? {}
|
||||
runtimeShell,
|
||||
# For panorama and focus stacking
|
||||
enblend-enfuse,
|
||||
hugin,
|
||||
gnumake,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "digikam";
|
||||
version = "8.3.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://kde/stable/${pname}/${version}/digiKam-${version}-1.tar.xz";
|
||||
hash = "sha256-BbFF/38vIAX6IbxXnBUqsjyBkbZ4/ylEyPBAbWud5tg=";
|
||||
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=";
|
||||
};
|
||||
|
||||
patches = [ ./disable-tests-download.patch ];
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
depsBuildBuild = [ cmake ];
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
doxygen
|
||||
ninja
|
||||
extra-cmake-modules
|
||||
libsForQt5.kdoctools
|
||||
libsForQt5.wrapQtAppsHook
|
||||
flex
|
||||
bison
|
||||
kdePackages.wrapQtAppsHook
|
||||
wrapGAppsHook3
|
||||
] ++ lib.optionals cudaSupport (with cudaPackages; [
|
||||
cuda_nvcc
|
||||
]);
|
||||
];
|
||||
|
||||
# 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.
|
||||
|
||||
buildInputs = [
|
||||
bison
|
||||
boost
|
||||
eigen
|
||||
exiv2
|
||||
ffmpeg_4
|
||||
flex
|
||||
graphviz
|
||||
imagemagick
|
||||
lcms2
|
||||
lensfun
|
||||
libgphoto2
|
||||
libheif
|
||||
liblqr1
|
||||
libusb1
|
||||
libGL
|
||||
libGLU
|
||||
opencv
|
||||
pcre
|
||||
x265
|
||||
libtiff
|
||||
libpng
|
||||
# TODO: Figure out how on earth to get it to pick up libjpeg8 for
|
||||
# lossy DNG support.
|
||||
libjpeg
|
||||
libheif
|
||||
libjxl
|
||||
boost
|
||||
lcms2
|
||||
expat
|
||||
exiv2
|
||||
libxml2
|
||||
libxslt
|
||||
# Qt WebEngine uses and propagates FFmpeg, and if it’s a
|
||||
# different version it causes linker warnings.
|
||||
#ffmpeg
|
||||
jasper
|
||||
] ++ (with libsForQt5; [
|
||||
libkipi
|
||||
libksane
|
||||
libqtav
|
||||
eigen
|
||||
lensfun
|
||||
liblqr1
|
||||
libgphoto2
|
||||
libusb1
|
||||
imagemagick
|
||||
x265
|
||||
libGLX
|
||||
libGLU
|
||||
|
||||
qtbase
|
||||
qtxmlpatterns
|
||||
qtsvg
|
||||
qtwebengine
|
||||
qtnetworkauth
|
||||
kdePackages.qtbase
|
||||
kdePackages.qtnetworkauth
|
||||
kdePackages.qtscxml
|
||||
kdePackages.qtsvg
|
||||
kdePackages.qtwebengine
|
||||
kdePackages.qt5compat
|
||||
kdePackages.qtmultimedia
|
||||
|
||||
akonadi-contacts
|
||||
kcalendarcore
|
||||
kconfigwidgets
|
||||
kcoreaddons
|
||||
kfilemetadata
|
||||
knotifications
|
||||
knotifyconfig
|
||||
ktextwidgets
|
||||
kwidgetsaddons
|
||||
kxmlgui
|
||||
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.
|
||||
];
|
||||
|
||||
breeze-icons
|
||||
marble
|
||||
oxygen
|
||||
threadweaver
|
||||
]) ++ lib.optionals cudaSupport (with cudaPackages; [
|
||||
cuda_cudart
|
||||
]);
|
||||
checkInputs = [ kdePackages.qtdeclarative ];
|
||||
|
||||
postConfigure = lib.optionalString finalAttrs.doCheck ''
|
||||
ln -s ${testData} $cmakeDir/test-data
|
||||
'';
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace \
|
||||
core/dplugins/bqm/custom/userscript/userscript.cpp \
|
||||
core/utilities/import/backend/cameracontroller.cpp \
|
||||
--replace-fail \"/bin/bash\" \"${lib.getExe bash}\"
|
||||
--replace-fail '"/bin/bash"' ${lib.escapeShellArg "\"${runtimeShell}\""}
|
||||
'';
|
||||
|
||||
cmakeFlags = [
|
||||
"-DENABLE_MYSQLSUPPORT=1"
|
||||
"-DENABLE_INTERNALMYSQL=1"
|
||||
"-DENABLE_MEDIAPLAYER=1"
|
||||
"-DENABLE_QWEBENGINE=on"
|
||||
"-DENABLE_APPSTYLES=on"
|
||||
"-DCMAKE_CXX_FLAGS=-I${libsForQt5.libksane}/include/KF5" # fix `#include <ksane_version.h>`
|
||||
(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)
|
||||
];
|
||||
|
||||
# Tests segfault for some reason…
|
||||
# TODO: Get them working.
|
||||
doCheck = false;
|
||||
|
||||
dontWrapGApps = true;
|
||||
|
||||
preFixup = ''
|
||||
qtWrapperArgs+=("''${gappsWrapperArgs[@]}")
|
||||
qtWrapperArgs+=(--prefix PATH : ${lib.makeBinPath [ gnumake hugin enblend-enfuse ]})
|
||||
qtWrapperArgs+=(--suffix DK_PLUGIN_PATH : ${placeholder "out"}/${libsForQt5.qtbase.qtPluginPrefix}/${pname})
|
||||
qtWrapperArgs+=(--prefix PATH : ${
|
||||
lib.makeBinPath [
|
||||
gnumake
|
||||
hugin
|
||||
enblend-enfuse
|
||||
]
|
||||
})
|
||||
qtWrapperArgs+=(--suffix DK_PLUGIN_PATH : ${placeholder "out"}/${kdePackages.qtbase.qtPluginPrefix}/digikam)
|
||||
substituteInPlace $out/bin/digitaglinktree \
|
||||
--replace "/usr/bin/perl" "${perl}/bin/perl" \
|
||||
--replace "/usr/bin/sqlite3" "${sqlite}/bin/sqlite3"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Photo Management Program";
|
||||
license = licenses.gpl2;
|
||||
homepage = "https://www.digikam.org";
|
||||
maintainers = with maintainers; [ ];
|
||||
platforms = platforms.linux;
|
||||
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;
|
||||
mainProgram = "digikam";
|
||||
};
|
||||
}
|
||||
})
|
||||
|
|
|
@ -1,71 +0,0 @@
|
|||
{ mkDerivation
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, extra-cmake-modules
|
||||
, qtbase
|
||||
, qtmultimedia
|
||||
, qttools
|
||||
, libGL
|
||||
, libX11
|
||||
, libass
|
||||
, openal
|
||||
, ffmpeg_4
|
||||
, libuchardet
|
||||
, alsa-lib
|
||||
, libpulseaudio
|
||||
, libva
|
||||
}:
|
||||
|
||||
mkDerivation rec {
|
||||
pname = "libqtav";
|
||||
version = "unstable-2020-09-10";
|
||||
|
||||
nativeBuildInputs = [ extra-cmake-modules qttools ];
|
||||
buildInputs = [
|
||||
qtbase
|
||||
qtmultimedia
|
||||
libGL
|
||||
libX11
|
||||
libass
|
||||
openal
|
||||
ffmpeg_4
|
||||
libuchardet
|
||||
alsa-lib
|
||||
libpulseaudio
|
||||
libva
|
||||
];
|
||||
|
||||
src = fetchFromGitHub {
|
||||
sha256 = "0qwrk40dihkbwmm7krz6qaqyn9v3qdjnd2k9b4s3a67x4403pib3";
|
||||
rev = "2a470d2a8d2fe22fae969bee5d594909a07b350a";
|
||||
repo = "QtAV";
|
||||
owner = "wang-bin";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
# Make sure libqtav finds its libGL dependency at both link and run time
|
||||
# by adding libGL to rpath. Not sure why it wasn't done automatically like
|
||||
# the other libraries as `libGL` is part of our `buildInputs`.
|
||||
NIX_CFLAGS_LINK = "-Wl,-rpath,${libGL}/lib";
|
||||
|
||||
cmakeFlags = [
|
||||
# RPATH of binary /nix/store/.../bin/... contains a forbidden reference to /build/
|
||||
"-DCMAKE_SKIP_BUILD_RPATH=ON"
|
||||
];
|
||||
|
||||
preFixup = ''
|
||||
mkdir -p "$out/bin"
|
||||
cp -a "./bin/"* "$out/bin"
|
||||
'';
|
||||
|
||||
stripDebugList = [ "lib" "libexec" "bin" "qml" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Multimedia playback framework based on Qt + FFmpeg";
|
||||
#license = licenses.lgpl21; # For the libraries / headers only.
|
||||
license = licenses.gpl3; # With the examples (under bin) and most likely some of the optional dependencies used.
|
||||
homepage = "http://www.qtav.org/";
|
||||
maintainers = [ maintainers.jraygauthier ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
|
@ -171,8 +171,6 @@ in (noExtraAttrs (kdeFrameworks // plasmaMobileGear // plasma5 // plasma5.thirdP
|
|||
|
||||
libqofono = callPackage ../development/libraries/libqofono { };
|
||||
|
||||
libqtav = callPackage ../development/libraries/libqtav { };
|
||||
|
||||
libquotient = callPackage ../development/libraries/libquotient { };
|
||||
|
||||
libqaccessibilityclient = callPackage ../development/libraries/libqaccessibilityclient { };
|
||||
|
|
Loading…
Reference in a new issue