+(define-public krita
+ (package
+ (name "krita")
+ (version "3.3.3")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "mirror://kde/stable/krita/"
+ (version-prefix version 3)
+ "/" name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0pc6hnakkqy81x5b5ncivaps6hqv43i50sjwgi3i3cz9j8rlxh5y"))))
+ (build-system cmake-build-system)
+ (arguments
+ `(#:tests? #f
+ #:configure-flags
+ (list "-DBUILD_TESTING=OFF" "-DKDE4_BUILD_TESTS=OFF"
+ (string-append "-DWITH_FFTW3="
+ (assoc-ref %build-inputs "fftw"))
+ (string-append "-DWITH_GSL="
+ (assoc-ref %build-inputs "gsl"))
+ (string-append "-DWITH_LibRaw="
+ (assoc-ref %build-inputs "libraw"))
+ (string-append "-DWITH_TIFF="
+ (assoc-ref %build-inputs "libtiff"))
+ (string-append "-DCMAKE_CXX_FLAGS=-I"
+ (assoc-ref %build-inputs "ilmbase")
+ "/include/OpenEXR"))
+ #:phases
+ (modify-phases %standard-phases
+ ;; Ensure that icons are found at runtime.
+ ;; This works around <https://bugs.gnu.org/22138>.
+ (add-after 'install 'wrap-executable
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out"))
+ (qt '("qtbase" "qtsvg")))
+ (wrap-program (string-append out "/bin/krita")
+ `("QT_PLUGIN_PATH" ":" prefix
+ ,(map (lambda (label)
+ (string-append (assoc-ref inputs label)
+ "/lib/qt5/plugins/"))
+ qt)))
+ #t))))))
+ (native-inputs
+ `(("curl" ,curl)
+ ("eigen" ,eigen)
+ ("extra-cmake-modules" ,extra-cmake-modules)
+ ("gettext-minimal" ,gettext-minimal)
+ ("kitemmodels" ,kitemmodels)
+ ("qwt" ,qwt)
+ ("vc" ,vc)))
+ (inputs
+ `(("qtbase" ,qtbase)
+ ("qtdeclarative" ,qtdeclarative)
+ ("qtmultimedia" ,qtmultimedia)
+ ("qtx11extras" ,qtx11extras)
+ ("qtsvg" ,qtsvg)
+ ("karchive" ,karchive)
+ ("kcompletion" ,kcompletion)
+ ("kconfig" ,kconfig)
+ ("kcoreaddons" ,kcoreaddons)
+ ("kcrash" ,kcrash)
+ ("kguiaddons" ,kguiaddons)
+ ("ki18n" ,ki18n)
+ ("kiconthemes" ,kiconthemes)
+ ("kio" ,kio)
+ ("kitemviews" ,kitemviews)
+ ("kwidgetsaddons" ,kwidgetsaddons)
+ ("kwindowsystem" ,kwindowsystem)
+ ("kxmlgui" ,kxmlgui)
+ ("boost" ,boost)
+ ("exiv2" ,exiv2)
+ ("lcms" ,lcms)
+ ("libpng" ,libpng)
+ ("libjpeg-turbo" ,libjpeg-turbo)
+ ("zlib" ,zlib)
+ ("libx11" ,libx11)
+ ("libxcb" ,libxcb)
+ ("libxi" ,libxi)
+ ("fftw" ,fftw)
+ ("gsl" ,gsl)
+ ("poppler-qt5" ,poppler-qt5)
+ ("libraw" ,libraw)
+ ("libtiff" ,libtiff)
+ ("perl" ,perl)
+ ("ilmbase" ,ilmbase)
+ ("openexr" ,openexr)))
+ (home-page "https://krita.org")
+ (synopsis "Digital painting application")
+ (description
+ "Krita is a professional painting tool designed for concept artists,
+illustrators, matte and texture artists, and the VFX industry. Notable
+features include brush stabilizers, brush engines and wrap-around mode.")
+ (license license:gpl2+)))
+