;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2017, 2018, 2019, 2020 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
;;; Copyright © 2020, 2022 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2021 Greg Hogan <code@greghogan.com>
;;; Copyright © 2022 Ricardo Wurmus <rekado@elephly.net>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (gnu packages storage)
  #:use-module (guix download)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix packages)
  #:use-module (guix utils)
  #:use-module (guix build-system cmake)
  #:use-module (gnu packages)
  #:use-module (gnu packages admin)
  #:use-module (gnu packages assembly)
  #:use-module (gnu packages authentication)
  #:use-module (gnu packages bash)
  #:use-module (gnu packages bdw-gc)
  #:use-module (gnu packages boost)
  #:use-module (gnu packages compression)
  #:use-module (gnu packages crypto)
  #:use-module (gnu packages cryptsetup)
  #:use-module (gnu packages curl)
  #:use-module (gnu packages databases)
  #:use-module (gnu packages disk)
  #:use-module (gnu packages gperf)
  #:use-module (gnu packages jemalloc)
  #:use-module (gnu packages icu4c)
  #:use-module (gnu packages linux)
  #:use-module (gnu packages lua)
  #:use-module (gnu packages ncurses)
  #:use-module (gnu packages networking)
  #:use-module (gnu packages nss)
  #:use-module (gnu packages openldap)
  #:use-module (gnu packages pkg-config)
  #:use-module (gnu packages pretty-print)
  #:use-module (gnu packages python)
  #:use-module (gnu packages python-xyz)
  #:use-module (gnu packages rpc)
  #:use-module (gnu packages sphinx)
  #:use-module (gnu packages sqlite)
  #:use-module (gnu packages textutils)
  #:use-module (gnu packages tls)
  #:use-module (gnu packages web)
  #:use-module (gnu packages xml))

(define-public ceph
  (package
    (name "ceph")
    (version "17.2.7")
    (source (origin
              (method url-fetch)
              (uri (string-append "https://download.ceph.com/tarballs/ceph-"
                                  version ".tar.gz"))
              (sha256
               (base32
                "1612424yrf39dz010ygz8k5x1vc8731549ckfj1r39dg00m62klp"))
              (patches
               (search-patches
                "ceph-disable-cpu-optimizations.patch"
                "ceph-fix-for-newer-boost.patch" ))
              (modules '((guix build utils)))
              (snippet
               '(for-each delete-file-recursively
                          '(;; TODO: Unbundle these:
                            "src/arrow"
                            ;;"src/isa-l"
                            ;;"src/lua"
                            ;;"src/xxHash"
                            ;;"src/zstd"
                            ;;"src/civetweb"
                            "src/c-ares"
                            "src/fmt"
                            "src/googletest"
                            "src/rapidjson"
                            "src/spdk"
                            "src/rocksdb"
                            "src/boost"
                            "src/utf8proc")))))
    (build-system cmake-build-system)
    (arguments
     (list
      #:parallel-build? #f ;because mgr_legacy_options.h is not built in time
      #:configure-flags
      '(let* ((out (assoc-ref %outputs "out"))
              (lib (assoc-ref %outputs "lib"))
              (libdir (string-append lib "/lib")))
         (list (string-append "-DCMAKE_INSTALL_PREFIX=" out)
               (string-append "-DCMAKE_INSTALL_LIBDIR=" libdir)
               (string-append "-DCMAKE_INSTALL_INCLUDEDIR="
                              lib "/include")
               ;; We need both libdir and libdir/ceph in RUNPATH.
               (string-append "-DCMAKE_INSTALL_RPATH="
                              libdir ";" libdir "/ceph")
               (string-append "-DCMAKE_INSTALL_SYSCONFDIR=" out "/etc")
               (string-append "-DCMAKE_INSTALL_DATADIR=" lib "/share")
               (string-append "-DCMAKE_INSTALL_MANDIR=" out "/share/man")
               (string-append "-DCMAKE_INSTALL_DOCDIR=" out "/share/ceph/doc")
               (string-append "-DCMAKE_INSTALL_LIBEXECDIR=" out "/libexec")
               (string-append "-DKEYUTILS_INCLUDE_DIR="
                              (assoc-ref %build-inputs "keyutils") "/include")
               (string-append "-DXFS_INCLUDE_DIR="
                              (assoc-ref %build-inputs "xfsprogs") "/include")
               "-DCMAKE_INSTALL_LOCALSTATEDIR=/var"
               "-DBUILD_SHARED_LIBS=ON"
               "-DWITH_SYSTEM_ARROW=ON"
               "-DWITH_SYSTEM_BOOST=ON"
               "-DWITH_SYSTEM_ROCKSDB=ON"
               "-DWITH_SYSTEM_UTF8PROC=ON"

               ;; TODO: Enable these when available in Guix.
               "-DWITH_MGR_DASHBOARD_FRONTEND=OFF" ;requires node + nodeenv
               "-DWITH_BABELTRACE=OFF"
               "-DWITH_LTTNG=OFF"
               "-DWITH_SPDK=OFF"
               "-DWITH_RADOSGW_AMQP_ENDPOINT=OFF"

               ;; Use jemalloc instead of tcmalloc.
               "-DALLOCATOR=jemalloc"

               ;; Don't install systemd unit files.
               "-DWITH_SYSTEMD=OFF"

               ;; Do not bother building the tests; we are not currently running
               ;; them, and they do not build with system googletest as of 14.2.5.
               "-DWITH_TESTS=OFF"))
       ;; FIXME: Some of the tests leak Btrfs subvolumes on Btrfs. See
       ;; <https://bugs.gnu.org/29674> for details. Disable tests until
       ;; resolved.
       #:tests? #f
       #:phases
       `(modify-phases %standard-phases
          (add-after 'unpack 'patch-source
            (lambda* (#:key outputs #:allow-other-keys)
              (let ((out (assoc-ref outputs "out"))
                    (lib (assoc-ref outputs "lib")))

                (substitute* "src/rgw/store/dbstore/sqlite/CMakeLists.txt"
                  (("add_library\\(sqlite_db \\$")
                   "add_library(sqlite_db STATIC $"))
                (substitute* "src/rgw/store/dbstore/CMakeLists.txt"
                  (("add_library\\(dbstore \\$")
                   "add_library(dbstore STATIC $")
                  (("add_library\\(dbstore_lib \\$")
                   "add_library(dbstore_lib STATIC $"))

                (substitute* "cmake/modules/Distutils.cmake"
                  ;; Prevent creation of Python eggs.
                  (("setup.py install")
                   "setup.py install --single-version-externally-managed --root=/")
                  ;; Inject the -rpath linker argument when linking
                  ;; Python C libraries so RUNPATH gets set up correctly.
                  (("LDFLAGS=(.*)\n" _ flags)
                   (string-append "LDFLAGS=\\\"" flags
                                  " -Wl,-rpath=" lib "/lib\\\"\n")))

                ;; Statically link libcrc32 because it does not get installed,
                ;; yet several libraries end up referring to it.
                (substitute* "src/common/CMakeLists.txt"
                  (("add_library\\(crc32")
                   "add_library(crc32 STATIC"))

                (substitute* "udev/50-rbd.rules"
                  (("/usr/bin/ceph-rbdnamer")
                   (string-append out "/bin/ceph-rbdnamer"))))))
          (add-before 'install 'set-install-environment
            (lambda* (#:key outputs #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))
                     (py3sitedir
                      (string-append out "/lib/python"
                                     ,(version-major+minor
                                       (package-version python))
                                     "/site-packages")))
                ;; The Python install scripts refuses to function if
                ;; the install directory is not on PYTHONPATH.
                (setenv "PYTHONPATH" py3sitedir))))
          (add-after 'install 'wrap-python-scripts
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))
                     (scripts '("bin/ceph" "bin/cephfs-top" "sbin/ceph-volume"))
                     (dependencies (map (lambda (input)
                                          (assoc-ref inputs input))
                                        '("python-prettytable" "python-pyyaml")))
                     (sitedir (lambda (package)
                                (string-append package
                                               "/lib/python"
                                               ,(version-major+minor
                                                 (package-version python))
                                               "/site-packages")))
                     (PYTHONPATH (string-join (map sitedir (cons out dependencies))
                                              ":")))
                (for-each (lambda (executable)
                            (wrap-program (string-append out "/" executable)
                              `("GUIX_PYTHONPATH" ":" prefix (,PYTHONPATH))))
                          scripts)))))))
    (outputs
     '("out" "lib"))
    (native-inputs
     (list gperf pkg-config python-cython python-sphinx yasm))
    (inputs
     (list `(,apache-thrift "lib")
           `(,apache-thrift "include")
           `(,apache-arrow-for-ceph "lib")
           bash-minimal
           boost
           curl
           cryptsetup
           eudev
           expat
           fcgi
           fmt-8
           fuse-2
           icu4c
           jemalloc
           keyutils
           leveldb
           libaio
           libatomic-ops
           libcap-ng
           libnl
           librdkafka
           lua
           lz4
           oath-toolkit
           openldap
           openssl
           ncurses
           nss
           python-prettytable           ;used by ceph_daemon.py
           python-pyyaml                ;from python-common/setup.py
           python
           rapidjson
           rdma-core
           rocksdb
           snappy
           sqlite
           utf8proc
           util-linux
           `(,util-linux "lib")
           xfsprogs
           zlib))
    (home-page "https://ceph.com/")
    (synopsis "Distributed object store and file system")
    (description
     "Ceph is a distributed storage system designed for reliability and
performance.  It provides network-based block devices (RBD), a POSIX
compliant file system (CephFS), and offers compatibility with various
storage protocols (S3, NFS, and others) through the RADOS gateway.")
    ;; The Ceph libraries are LGPL2.1 and most of the utilities fall under
    ;; GPL2. The installed erasure code plugins are BSD-3 licensed and do
    ;; not use the GPL code. The source archive includes a number of files
    ;; carrying other licenses; consult COPYING for more information. Note
    ;; that COPYING does not cover third-party bundled software.
    (license (list license:lgpl2.1 license:gpl2  ;some files are 'or later'
                   license:cc-by-sa3.0           ;documentation
                   license:bsd-3                 ;isa-l,jerasure,++
                   license:expat))))             ;civetweb,java bindings
are typically under LGPLv2+, but 'COPYING' says GPLv2+. (license license:gpl2+))) ;; Note: See <https://metacpan.org/pod/Image::ExifTool> for the latest ;; release. The versions at <https://www.sno.phy.queensu.ca/~phil/exiftool/> ;; are not meant for production use according to the Changes file. (define-public perl-image-exiftool (package (name "perl-image-exiftool") (version "12.70") (source (origin (method url-fetch) (uri (list (string-append "mirror://cpan/authors/id/E/EX/EXIFTOOL/" "Image-ExifTool-" version ".tar.gz") ;; New releases may take a while to hit CPAN. (string-append "https://www.sno.phy.queensu.ca/~phil/exiftool/" "Image-ExifTool-" version ".tar.gz"))) (sha256 (base32 "1zmg5jsdqmr9mnmxg614brdgr9ddmspcc11rs4xkygnc8lj55cjc")))) (build-system perl-build-system) (arguments (list #:phases #~(modify-phases %standard-phases (add-after 'install 'post-install (lambda* (#:key outputs #:allow-other-keys) ;; Make sure the 'exiftool' commands finds the library. ;; XXX: Shouldn't it be handled by PERL-BUILD-SYSTEM? (let* ((pm (find-files #$output "^ExifTool\\.pm$")) (lib (dirname (dirname (car pm))))) (wrap-program (string-append #$output "/bin/exiftool") `("PERL5LIB" prefix (,lib))))))))) (inputs (list bash-minimal)) (home-page "https://metacpan.org/release/Image-ExifTool") (synopsis "Program and Perl library to manipulate EXIF and other metadata") (description "This package provides the @code{exiftool} command and the @code{Image::ExifTool} Perl library to manipulate EXIF tags of digital images and a wide variety of other metadata.") (license license:perl-license))) (define-public libpano13 (package (name "libpano13") (version "2.9.21") (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/panotools/libpano13/" "libpano13-" (first (string-split version #\_)) "/libpano13-" version ".tar.gz")) (sha256 (base32 "141mccp4klj0qdpvki97q5wjf5a1b7pj09s6c4lmwc4r452s3rbr")))) (build-system cmake-build-system) (native-inputs (list perl)) ; for pod2man (inputs (list libjpeg-turbo libpng libtiff zlib)) (home-page "https://panotools.sourceforge.net/") (synopsis "Library for panoramic images") (description "The libpano13 package contains the backend library written by the Panorama Tools project for building panoramic images from a set of overlapping images, as well as some command line tools.") (license license:gpl2+))) (define-public enblend-enfuse (package (name "enblend-enfuse") (version "4.2") (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/enblend/" name "/" name "-" (version-major+minor version) "/" name "-" version ".tar.gz")) (sha256 (base32 "0j5x011ilalb47ssah50ag0a4phgh1b0wdgxdbbp1gcyjcjf60w7")) (patches ;; TODO: Remove when updating. ;; Fixed upstream with a98e00eed893f62dd8349fc2894abca3aff4b33a. (search-patches "enblend-enfuse-reproducible.patch")) (modules '((guix build utils))) (snippet ;; TODO: Remove when updating. ;; Fixed upstream with 81e25afe71146aaaf5058c604034f35d57e3be9d. #~(substitute* "src/minimizer.cc" (("^#include <gsl/gsl_errno\\.h>" all) (string-append all "\n#include <limits>")))))) (build-system gnu-build-system) (native-inputs (list pkg-config perl perl-timedate help2man ;; For building the documentation. gnuplot graphviz-minimal ; for 'dot' font-ghostscript imagemagick/stable (librsvg-for-system) m4 perl-readonly texlive-texloganalyser (texlive-updmap.cfg (list texlive-bold-extra texlive-cm-mf-extra-bold texlive-comment texlive-float texlive-enumitem texlive-mdwtools texlive-hyphenat texlive-index texlive-listings texlive-microtype texlive-etoolbox ;used but not propagated by microtype texlive-nag texlive-ragged2e texlive-shorttoc texlive-bigfoot texlive-xstring)) hevea)) (inputs (list boost gsl lcms libjpeg-turbo libpng libtiff openexr-2 vigra zlib)) (arguments (list #:configure-flags #~(list "--enable-openmp") #:phases #~(modify-phases %standard-phases (add-before 'build 'fontconfig-cache (lambda _ (setenv "XDG_CACHE_HOME" (mkdtemp "/tmp/cache-XXXXXX")))) ;; XXX: There's some extreme sillyness when building the ;; documentation. It gets rebuilt thrice, during build, check and ;; install, possibly due to the effects of the invocation of ;; UPDATED_ON in doc/Makefile. ;; Reported: <URL:https://bugs.launchpad.net/enblend/+bug/2036319> (add-after 'configure 'exclude-doc-from-check (lambda _ (substitute* "doc/Makefile" (("^(check:).+$" _ rule) (string-append rule "\n"))))) ;; XXX: Skip building the docs since they're rebuilt again ;; during install. (replace 'build (lambda args (with-directory-excursion "src" (apply (assoc-ref %standard-phases 'build) args)))) ;; XXX: Save another doc rebuild when installing. (replace 'install ;; Intercept and insert a make-flag for this phase only. (lambda* (#:key make-flags #:allow-other-keys) (apply invoke "make" "install" (cons "MAYBE_DOC=" make-flags)))) ;; XXX: 'make install' doesn't install the docs. (add-after 'install 'install-doc (lambda* (#:key make-flags #:allow-other-keys) ;; Install examples first, for which the 'install' rule works. (with-directory-excursion "doc/examples" (apply invoke "make" "install" make-flags)) ;; The docs have to be installed with specific rules. (with-directory-excursion "doc" (apply invoke "make" "install-ps-local" "install-html-local" "install-dvi-local" ;; Do not overwhelm the console by printing the source ;; to stdout. (cons "V=0" make-flags)))))))) (outputs '("out" "doc")) (home-page "https://enblend.sourceforge.net/") (synopsis "Tools for combining and blending images") (description "Enblend blends away the seams in a panoramic image mosaic using a multi-resolution spline. Enfuse merges different exposures of the same scene to produce an image that looks much like a tone-mapped image.") (license license:gpl2+))) (define-public lensfun (package (name "lensfun") (version "0.3.4") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/lensfun/lensfun") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "1lwf3cwldvh9qfmh3w7nqqildfmxx2i5f5bn0vr8y6qc5kh7a1s9")))) (build-system cmake-build-system) (arguments `(,@(if (any (cute string-prefix? <> (or (%current-system) (%current-target-system))) '("x86_64" "i686")) ;; SSE and SSE2 are supported only on Intel processors. '() '(#:configure-flags '("-DBUILD_FOR_SSE=OFF" "-DBUILD_FOR_SSE2=OFF"))) #:tests? #f)) ; There are no tests to run. (native-inputs (list pkg-config)) (inputs (list glib)) (home-page "https://lensfun.github.io/") (synopsis "Library to correct optical lens defects with a lens database") (description "Digital photographs are not ideal. Of course, the better is your camera, the better the results will be, but in any case if you look carefully at shots taken even by the most expensive cameras equipped with the most expensive lenses you will see various artifacts. It is very hard to make ideal cameras, because there are a lot of factors that affect the final image quality, and at some point camera and lens designers have to trade one factor for another to achieve the optimal image quality, within the given design restrictions and budget. But we all want ideal shots, don't we? So that's what's Lensfun is all about: rectifying the defects introduced by your photographic equipment.") ;; The libraries are licensed under the LGPL3, the programs are ;; licensed GPL3, and the database is license CC-BY-SA 3.0. See the ;; README.md file for this clarification. (license (list license:lgpl3 license:gpl3 license:cc-by-sa3.0)))) (define-public darktable (package (name "darktable") (version "5.0.0") (source (origin (method url-fetch) (uri (string-append "https://github.com/darktable-org/darktable/releases/" "download/release-" version "/darktable-" version ".tar.xz")) (sha256 (base32 "18d37x4qlnhzbr372lxmi70vq6j4l2pnmql2f8957fr4wvk3d8ga")))) (build-system cmake-build-system) (arguments (list #:configure-flags #~(list "-DBINARY_PACKAGE_BUILD=On" "-DBUILD_TESTING=On") #:phases #~(modify-phases %standard-phases (add-after 'unpack 'libOpenCL-path (lambda* (#:key inputs #:allow-other-keys) ;; Statically link to libOpenCL. (substitute* "./src/common/dlopencl.c" (("\"libOpenCL\"") (string-append "\"" (search-input-file inputs "/lib/libOpenCL.so") "\""))))) (add-before 'configure 'set-LDFLAGS (lambda _ (setenv "LDFLAGS" (string-append "-Wl,-rpath=" #$output "/lib/darktable")))) (add-after 'install 'wrap-program (lambda _ (wrap-program (string-append #$output "/bin/darktable") ;; For GtkFileChooserDialog. `("GSETTINGS_SCHEMA_DIR" = (,(string-append #$(this-package-input "gtk+") "/share/glib-2.0/schemas"))))))))) (native-inputs (list cmocka desktop-file-utils gcc-13 ; gcc-11 too old for darktable, 12+ required `(,glib "bin") gobject-introspection intltool llvm opencl-headers perl pkg-config po4a python-wrapper ruby)) (inputs (list bash-minimal cairo colord-gtk ;optional, for color profile support cups ;optional, for printing support curl dbus-glib exiv2 freeimage gmic ;optional, for HaldcLUT support graphicsmagick gsettings-desktop-schemas gtk+ imath iso-codes/pinned ;optional, for language names in the preferences json-glib lcms lensfun ;optional, for the lens distortion plugin libgphoto2 ;optional, for camera tethering libavif ;optional, for AVIF support libjpeg-turbo libjxl ;optional, for JPEG-XL support libomp libpng (librsvg-for-system) libsecret ;optional, for storing passwords libsoup-minimal-2 libtiff libwebp ;optional, for WebP support libxml2 libxslt libheif lua-5.4 ;optional, for plugins opencl-icd-loader ;optional, for OpenCL support openexr ;optional, for EXR import/export openjpeg ;optional, for JPEG2000 export osm-gps-map ;optional, for geotagging view portmidi ;optional, for hardware MIDI input devices pugixml python-jsonschema sdl2 sqlite)) (home-page "https://www.darktable.org") (synopsis "Virtual lighttable and darkroom for photographers") (description "Darktable is a photography workflow application and RAW developer. It manages your digital negatives in a database, lets you view them through a zoomable lighttable and enables you to develop raw images and enhance them.") ;; See src/is_supported_platform.h for supported platforms. (supported-systems '("x86_64-linux" "aarch64-linux" "powerpc64le-linux" "riscv64-linux")) (properties '((release-monitoring-url . "https://github.com/darktable-org/darktable/releases"))) (license (list license:gpl3+ ;Darktable itself license:lgpl2.1+)))) ;Rawspeed library (define-public photoflare (package (name "photoflare") (version "1.6.10") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/photoflare/photoflare") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "1sm4m9nga1lyqycgqbh08cib5dg4fnrz9qkrliycr3dbisy360lm")))) (build-system gnu-build-system) (arguments '(#:tests? #f ;no tests #:phases (modify-phases %standard-phases (replace 'configure (lambda* (#:key inputs outputs #:allow-other-keys) (let ((magickpp (assoc-ref inputs "graphicsmagick")) (out (assoc-ref outputs "out"))) (invoke "qmake" (string-append "INCLUDEPATH += " magickpp "/include/GraphicsMagick") (string-append "PREFIX=" out) "Photoflare.pro"))))))) (native-inputs (list pkg-config qttools-5)) (inputs (list graphicsmagick libomp qtbase-5)) (home-page "https://photoflare.io") (synopsis "Quick, simple but powerful image editor") (description "Photoflare is a cross-platform image editor with an aim to balance between powerful features and a very friendly graphical user interface. It suits a wide variety of different tasks and users who value a more nimble workflow. Features include basic image editing capabilities, paint brushes, image filters, colour adjustments and more advanced features such as Batch image processing.") (license license:gpl3+))) (define-public entangle (package (name "entangle") (version "3.0") ; delete the 'build-with-meson-0.60 phase when updating (source (origin (method git-fetch) (uri (git-reference (url "https://gitlab.com/entangle/entangle") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "1pdmgxjdb3xlcqsaz7l8qzj5f7g7nwzhsrgid8929bm36d49cgc7")))) (build-system meson-build-system) (arguments (list #:glib-or-gtk? #t #:phases #~(modify-phases %standard-phases (add-after 'unpack 'build-with-meson-0.60 ;; Work around ‘ERROR: Function does not take positional arguments.’. (lambda _ (substitute* "src/meson.build" (("^i18n\\.merge_file.*" match) (string-append match " data_dirs:"))))) (add-after 'unpack 'skip-gtk-update-icon-cache ;; Don't create 'icon-theme.cache'. (lambda _ (substitute* "meson_post_install.py" (("gtk-update-icon-cache") "true")))) (add-after 'install 'wrap-gi-python ;; Make GTK find files needed by plugins. (lambda* (#:key inputs #:allow-other-keys) (let ((gi-typelib-path (getenv "GI_TYPELIB_PATH")) (python-path (getenv "GUIX_PYTHONPATH"))) (wrap-program (string-append #$output "/bin/entangle") `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path)) `("GUIX_PYTHONPATH" ":" prefix (,python-path))))))))) (native-inputs (list cmake gettext-minimal `(,glib "bin") gobject-introspection gtk-doc/stable itstool libxml2 perl pkg-config)) (inputs (list bash-minimal gdk-pixbuf gexiv2 gst-plugins-base gstreamer gtk+ lcms libgphoto2 libgudev libpeas libraw python python-pygobject)) (home-page "https://entangle-photo.org/") (synopsis "Camera control and capture") (description "Entangle is an application which uses GTK and libgphoto2 to provide a graphical interface for tethered photography with digital cameras. It includes control over camera shooting and configuration settings and 'hands off' shooting directly from the controlling computer.") (license license:gpl3+))) (define-public hugin (package (name "hugin") (version "2021.0.0") (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/hugin/hugin/hugin-" (version-major+minor version) "/hugin-" version ".tar.bz2")) (sha256 (base32 "1ngadsv22ii05kmvpzdivhwlks4pnv9ijz7j9srl8y54gy5flyh4")))) (build-system cmake-build-system) (native-inputs (list gettext-minimal pkg-config)) (inputs (list boost enblend-enfuse exiv2 fftw flann freeglut glew lcms libjpeg-turbo libpano13 libpng libtiff libxi libxmu mesa openexr-2 sqlite vigra wxwidgets zlib)) (arguments `(#:tests? #f ; no check target #:configure-flags (list ;; The header files of ilmbase (propagated by openexr) are not found ;; when included by the header files of openexr, and an explicit ;; flag needs to be set. (string-append "-DCMAKE_CXX_FLAGS=-I" (assoc-ref %build-inputs "ilmbase") "/include/OpenEXR") ;; Disable installation of the Python scripting interface. ;; It would require the additional inputs python and swig. ;; Installation would need to be tweaked, as it tries to install ;; into the python directory. "-DBUILD_HSI=OFF") #:phases (modify-phases %standard-phases (add-before 'configure 'substitute (lambda _ (substitute* "src/hugin1/base_wx/StitchingExecutor.cpp" (("wxT\\(\"enblend\"\\)") (string-append "wxT(\"" (which "enblend") "\")")) (("wxT\\(\"enfuse\"\\)") (string-append "wxT(\"" (which "enfuse") "\")")))))))) (home-page "https://hugin.sourceforge.net/") (synopsis "Panorama photo stitcher") (description "Hugin is an easy to use panoramic imaging toolchain with a graphical user interface. It can be used to assemble a mosaic of photographs into a complete panorama and stitch any series of overlapping pictures.") (license license:gpl2+))) (define-public rawtherapee (package (name "rawtherapee") (version "5.11") (source (origin (method url-fetch) (uri (string-append "https://rawtherapee.com/shared/source/" "rawtherapee-" version ".tar.xz")) (sha256 (base32 "0977dnik78szwznl4knabigah0m394a4gdmjajcy4b8ixj6w3175")))) (build-system cmake-build-system) (arguments (list #:tests? #f ; no test suite #:build-type "release" #:configure-flags #~(list (string-append "-DLENSFUNDBDIR=" #$(this-package-input "lensfun") "/share/lensfun") ;; Don't optimize the build for the host machine. See the file ;; 'ProcessorTargets.cmake' in the source distribution for more ;; information. "-DPROC_TARGET_NUMBER=1" ;; These flags are recommended by upstream for distributed packages. ;; See the file 'RELEASE_NOTES.txt' in the source distribution. "-DCMAKE_CXX_FLAGS=-O3 -fPIC" "-DCMAKE_C_FLAGS=-O3 -fPIC" "-DCACHE_NAME_SUFFIX=\"\"" "-DWITH_JXL=ON" "-DWITH_SYSTEM_LIBRAW=ON"))) (native-inputs (list pkg-config)) (inputs (list expat exiv2 fftwf glib glibmm gtk+ gtkmm-3 lcms lensfun libcanberra libiptcdata libjpeg-turbo libjxl libpng (librsvg-for-system) libraw libsigc++ libtiff zlib)) (home-page "https://rawtherapee.com") (synopsis "Raw image developing and processing") (description "RawTherapee is a raw image processing suite. It comprises a subset of image editing operations specifically aimed at non-destructive raw photo post-production and is primarily focused on improving a photographer's workflow by facilitating the handling of large numbers of images. Most raw formats are supported, including Pentax Pixel Shift, Canon Dual-Pixel, and those from Foveon and X-Trans sensors.") (license license:gpl3+))) (define-public librtprocess (package (name "librtprocess") (version "0.12.0") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/CarVac/librtprocess") (commit version))) (sha256 (base32 "0v0zwbdbc1fn7iy6wi0m6zgb86qdx1ijnv548d0ydbr8cm4klnpz")) (file-name (git-file-name name version)))) (build-system cmake-build-system) (arguments ;; No tests (list #:tests? #f)) (home-page "https://github.com/CarVac/librtprocess") (synopsis "Highly optimized library for processing RAW images") (description "This package provides RawTherapee's highly optimized RAW processing routines.") (license license:gpl3+)))