diff options
author | Thomas Tuegel <ttuegel@mailbox.org> | 2017-02-18 11:55:57 -0600 |
---|---|---|
committer | Thomas Tuegel <ttuegel@mailbox.org> | 2017-02-24 16:48:32 -0600 |
commit | 855690ba1d31dfe8bbda01e4b581bc3d4e112473 (patch) | |
tree | 6324a41c21cedc8d4b962cefd4a7a64c1cdcc44b /pkgs/applications/graphics/digikam/default.nix | |
parent | 68baf639a1967693df57c8239ead77e9036b2dcf (diff) |
Remove kde4.digikam
- Already updated to KDE 5 in Nixpkgs
Diffstat (limited to 'pkgs/applications/graphics/digikam/default.nix')
-rw-r--r-- | pkgs/applications/graphics/digikam/default.nix | 321 |
1 files changed, 104 insertions, 217 deletions
diff --git a/pkgs/applications/graphics/digikam/default.nix b/pkgs/applications/graphics/digikam/default.nix index 9a9c0ff1d7f78..a9d7d357ad71d 100644 --- a/pkgs/applications/graphics/digikam/default.nix +++ b/pkgs/applications/graphics/digikam/default.nix @@ -1,235 +1,122 @@ -{ stdenv, fetchurl, fetchpatch, automoc4, boost, shared_desktop_ontologies -, cmake, eigen, lcms, gettext, jasper, kdelibs, kdepimlibs, lensfun -, libgphoto2, libjpeg, libkdcraw, libkexiv2, libkipi, libpgf, libtiff -, libusb1, liblqr1, marble, mysql, opencv, perl, phonon, pkgconfig -, qca2, qimageblitz, qjson, qt4, soprano - -# Optional build time dependencies -, baloo, doxygen, kfilemetadata +{ stdenv, fetchurl, cmake, ecm, makeQtWrapper + +# For `digitaglinktree` +, perl, sqlite + +, qtbase +, qtxmlpatterns +, qtsvg +, qtwebkit + +, kconfigwidgets +, kcoreaddons +, kdoctools +, kfilemetadata +, knotifications +, knotifyconfig +, ktextwidgets +, kwidgetsaddons +, kxmlgui + +, bison +, boost +, eigen +, exiv2 +, flex +, jasper , lcms2 -, kfaceSupport ? true, libkface ? null -, kgeomapSupport ? true, libkgeomap ? null -, libxslt - -# Plugins optional build time dependencies -, gdk_pixbuf, imagemagick -, libgpod, libksane, libkvkontakte -, qt_gstreamer1 /*qt_soap, <https://github.com/commontk/QtSOAP> herqq <http://www.herqq.org> -> is missing its av part.*/ - /*qt_koauth <http://gitorious.org/kqoauth>*/ - -# Supplementary packages required only by the wrapper. -, bash, kde_runtime, kde_baseapps, makeWrapper, oxygen_icons -, phonon-backend-vlc /*phonon-backend-gstreamer,*/ -, ffmpegthumbs /*mplayerthumbs*/ -, runCommand, shared_mime_info, writeScriptBin +, lensfun +, libgphoto2 +, libkipi +, liblqr1 +, libusb1 +, marble +, mysql +, opencv +, threadweaver + +# For panorama and focus stacking +, enblend-enfuse +, hugin +, gnumake + +, oxygen }: -let - version = "4.12.0"; - pName = "digikam-${version}"; - - build = stdenv.mkDerivation rec { - name = "digikam-build-${version}"; - - src = fetchurl { - url = "http://download.kde.org/stable/digikam/${pName}.tar.bz2"; - sha256 = "081ldsaf3frf5khznjd3sxkjmi4dyp6w6nqnc2a0agkk0kxkl10m"; - }; - - patches = [ - (fetchpatch { - # Fix compilation against Lensfun 0.3.2 - url = "http://cgit.kde.org/digikam.git/patch/?id=0f159981176faa6da701f112bfe557b79804d468"; - sha256 = "1c8bg7s84vg4v620gbs16cjcbpml749018gy5dpvfacx5vl24wza"; - }) - ]; - - patchFlags = ["-p1" "-dcore"]; - - nativeBuildInputs = [ - automoc4 cmake gettext perl pkgconfig - ] ++ [ - # Optional - doxygen - ]; - - buildInputs = [ - boost eigen jasper kdelibs kdepimlibs lcms lensfun - libgphoto2 libjpeg libkdcraw libkexiv2 libkipi liblqr1 libpgf - libtiff marble mysql.lib opencv phonon qca2 qimageblitz qjson qt4 - shared_desktop_ontologies soprano ] - # Optional build time dependencies - ++ [ - baloo - kfilemetadata - lcms2 ] - ++ stdenv.lib.optional (kfaceSupport && null != libkface) [ libkface ] - ++ stdenv.lib.optional (kgeomapSupport && null != libkgeomap) [ libkgeomap ] ++ - [ libxslt ] - # Plugins optional build time dependencies - ++ [ - gdk_pixbuf imagemagick libgpod libksane - libkvkontakte - qt_gstreamer1 ]; - - # Make digikam find some FindXXXX.cmake - KDEDIRS="${marble}:${qjson}"; - - # Find kdepimlibs's upper case headers under `include/KDE`. - NIX_CFLAGS_COMPILE = "-I${kdepimlibs}/include/KDE"; - - # Help digiKam find libusb, otherwise gphoto2 support is disabled - cmakeFlags = [ - "-DLIBUSB_LIBRARIES=${libusb1.out}/lib" - "-DLIBUSB_INCLUDE_DIR=${libusb1.dev}/include/libusb-1.0" - "-DENABLE_BALOOSUPPORT=ON" - "-DENABLE_KDEPIMLIBSSUPPORT=ON" - "-DENABLE_LCMS2=ON" ] - ++ stdenv.lib.optional (kfaceSupport && null == libkface) [ "-DDIGIKAMSC_COMPILE_LIBKFACE=ON" ] - ++ stdenv.lib.optional (kgeomapSupport && null == libkgeomap) [ "-DDIGIKAMSC_COMPILE_LIBKGEOMAP=ON" ]; - - enableParallelBuilding = true; - - meta = { - description = "Photo Management Program"; - license = stdenv.lib.licenses.gpl2; - homepage = http://www.digikam.org; - maintainers = with stdenv.lib.maintainers; [ goibhniu viric urkud ]; - inherit (kdelibs.meta) platforms; - }; - }; +stdenv.mkDerivation rec { + name = "digikam-${version}"; + version = "5.4.0"; + src = fetchurl { + url = "http://download.kde.org/stable/digikam/${name}.tar.xz"; + sha256 = "0dgsgji14l5zvxny36hrfsp889fsfrsbbn9bg57m18404xp903kg"; + }; - kdePkgs = [ - build # digikam's own build - kdelibs kdepimlibs kde_runtime kde_baseapps libkdcraw oxygen_icons - /*phonon-backend-gstreamer*/ phonon-backend-vlc - ffmpegthumbs /*mplayerthumbs*/ shared_mime_info ] - # Optional build time dependencies - ++ [ - - baloo kfilemetadata ] - ++ stdenv.lib.optional (kfaceSupport && null != libkface) [ libkface ] - ++ stdenv.lib.optional (kgeomapSupport && null != libkgeomap) [ libkgeomap ] - ++ [ - libkipi ] - # Plugins optional build time dependencies - ++ [ - libksane libkvkontakte + nativeBuildInputs = [ cmake ecm makeQtWrapper ]; + + patches = [ ./0001-Disable-fno-operator-names.patch ]; + + buildInputs = [ + qtbase + qtxmlpatterns + qtsvg + qtwebkit + + kconfigwidgets + kcoreaddons + kdoctools + kfilemetadata + knotifications + knotifyconfig + ktextwidgets + kwidgetsaddons + kxmlgui + + bison + boost + eigen + exiv2 + flex + jasper + lcms2 + lensfun + libgphoto2 + libkipi + liblqr1 + libusb1 + marble.unwrapped + mysql + opencv + threadweaver + + oxygen ]; + enableParallelBuilding = true; - # TODO: It should be the responsability of these packages to add themselves to `KDEDIRS`. See - # <https://github.com/ttuegel/nixpkgs/commit/a0efeacc0ef2cf63bbb768bfb172a483307d080b> for - # a practical example. - # IMPORTANT: Note that using `XDG_DATA_DIRS` here instead of `KDEDIRS` won't work properly. - KDEDIRS = with stdenv.lib; concatStrings (intersperse ":" (map (x: "${x}") kdePkgs)); - - sycocaDirRelPath = "var/lib/kdesycoca"; - sycocaFileRelPath = "${sycocaDirRelPath}/${pName}.sycoca"; - - sycoca = runCommand "${pName}" { - - name = "digikam-sycoca-${version}"; - - nativeBuildInputs = [ kdelibs ]; - - dontPatchELF = true; - dontStrip = true; + cmakeFlags = [ + "-DLIBUSB_LIBRARIES=${libusb1.out}/lib" + "-DLIBUSB_INCLUDE_DIR=${libusb1.dev}/include/libusb-1.0" + "-DENABLE_MYSQLSUPPORT=1" + "-DENABLE_INTERNALMYSQL=1" + ]; - } '' - # Make sure kbuildsycoca4 does not attempt to write to user home directory. - export HOME=$PWD + fixupPhase = '' + substituteInPlace $out/bin/digitaglinktree \ + --replace "/usr/bin/perl" "${perl}/bin/perl" \ + --replace "/usr/bin/sqlite3" "${sqlite}/bin/sqlite3" - export KDESYCOCA="$out/${sycocaFileRelPath}" + wrapQtProgram $out/bin/digikam \ + --prefix PATH : "${gnumake}/bin:${hugin}/bin:${enblend-enfuse}/bin" - mkdir -p $out/${sycocaDirRelPath} - export XDG_DATA_DIRS="" - export KDEDIRS="${KDEDIRS}" - kbuildsycoca4 --noincremental --nosignal + wrapQtProgram $out/bin/showfoto ''; - - replaceExeListWithWrapped = - let f = exeName: '' - rm -f "$out/bin/${exeName}" - makeWrapper "${build}/bin/${exeName}" "$out/bin/${exeName}" \ - --set XDG_DATA_DIRS "" \ - --set KDEDIRS "${KDEDIRS}" \ - --set KDESYCOCA "${sycoca}/${sycocaFileRelPath}" - ''; - in - with stdenv.lib; exeNameList: concatStrings (intersperse "\n" (map f exeNameList)); - -in - - -with stdenv.lib; - -/* - Final derivation - ---------------- - - - Create symlinks to our original build derivation items. - - Wrap specific executables so that they know of the appropriate - sycoca database, `KDEDIRS` to use and block any interference - from `XDG_DATA_DIRS` (only `dnginfo` is not wrapped). -*/ -runCommand "${pName}" { - inherit build; - inherit sycoca; - - nativeBuildInputs = [ makeWrapper ]; - - buildInputs = kdePkgs; - - dontPatchELF = true; - dontStrip = true; - meta = { description = "Photo Management Program"; license = stdenv.lib.licenses.gpl2; homepage = http://www.digikam.org; - maintainers = with stdenv.lib.maintainers; [ /*jraygauthier*/ ]; - inherit (kdelibs.meta) platforms; - broken = true; + maintainers = with stdenv.lib.maintainers; [ the-kenny ]; + platforms = stdenv.lib.platforms.linux; }; - -} '' - pushd $build > /dev/null - for d in `find . -maxdepth 1 -name "*" -printf "%f\n" | tail -n+2`; do - mkdir -p $out/$d - for f in `find $d -maxdepth 1 -name "*" -printf "%f\n" | tail -n+2`; do - ln -s "$build/$d/$f" "$out/$d/$f" - done - done - popd > /dev/null - - ${replaceExeListWithWrapped [ "cleanup_digikamdb" "digitaglinktree" "digikam" "dngconverter" - "expoblending" "photolayoutseditor" "scangui" "showfoto" ]} -'' - -/* - -TODO ----- - -### Useful ### - - - Per lib `KDELIBS` environment variable export. See above in-code TODO comment. - - Missing optional `qt_soap` or `herqq` (av + normal package) dependencies. Those are not - yet (or not fully) packaged in nix. Mainly required for upnp export. - - Possibility to use the `phonon-backend-gstreamer` with its own user specified set of backend. - - Allow user to disable optional features or dependencies reacting properly. - - Compile `kipiplugins` as a separate package (so that it can be used by other kde packages - and so that this package's build time is reduced). - -### Not so useful ### - - - Missing optional `qt_koauth` (not packaged in nix). - - Missing optional `libmediawiki` (not packaged in nix).. - - For some reason the cmake build does not detect `libkvkontakte`. Fix this. - - Possibility to use `mplayerthumbs` thumbnail creator backend. In digikam dev docs, - it is however suggested to use `ffmpegthumbs`. Maybe we should stick to it. - -*/ +} |