summary refs log tree commit diff
path: root/pkgs/applications/graphics
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2022-03-08 20:12:24 +0100
committerGitHub <noreply@github.com>2022-03-08 20:12:24 +0100
commit7740b3bb773de10039ac2ad24be898e58c766905 (patch)
tree4d454d3cf6c67172a0738a78919ee7430ff93b86 /pkgs/applications/graphics
parent582a78596e6221321a0284925448b234b3daf5d1 (diff)
parent614a2926b27386cfa555989a705dbf3e43d8f269 (diff)
downloadnixpkgs-7740b3bb773de10039ac2ad24be898e58c766905.tar
nixpkgs-7740b3bb773de10039ac2ad24be898e58c766905.tar.gz
nixpkgs-7740b3bb773de10039ac2ad24be898e58c766905.tar.bz2
nixpkgs-7740b3bb773de10039ac2ad24be898e58c766905.tar.lz
nixpkgs-7740b3bb773de10039ac2ad24be898e58c766905.tar.xz
nixpkgs-7740b3bb773de10039ac2ad24be898e58c766905.tar.zst
nixpkgs-7740b3bb773de10039ac2ad24be898e58c766905.zip
Merge pull request #157087 from paperdigits/pkg-hdrmerge
Diffstat (limited to 'pkgs/applications/graphics')
-rw-r--r--pkgs/applications/graphics/hdrmerge/default.nix78
1 files changed, 78 insertions, 0 deletions
diff --git a/pkgs/applications/graphics/hdrmerge/default.nix b/pkgs/applications/graphics/hdrmerge/default.nix
new file mode 100644
index 00000000000..8f518c6c69b
--- /dev/null
+++ b/pkgs/applications/graphics/hdrmerge/default.nix
@@ -0,0 +1,78 @@
+{ lib
+, mkDerivation
+, fetchpatch
+, fetchFromGitHub
+, cmake
+, extra-cmake-modules
+, qtbase
+, wrapQtAppsHook
+, libraw
+, exiv2
+, zlib
+, alglib
+, pkg-config
+, makeDesktopItem
+, copyDesktopItems
+}:
+
+mkDerivation rec {
+  pname = "hdrmerge";
+  version = "unstable-2020-11-12";
+  src = fetchFromGitHub {
+    owner = "jcelaya";
+    repo = "hdrmerge";
+    rev = "f5a2538cffe3e27bd9bea5d6a199fa211d05e6da";
+    sha256 = "1bzf9wawbdvdbv57hnrmh0gpjfi5hamgf2nwh2yzd4sh1ssfa8jz";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+    wrapQtAppsHook
+    copyDesktopItems
+  ];
+
+  buildInputs = [ qtbase libraw exiv2 zlib alglib ];
+
+  cmakeFlags = [
+    "-DALGLIB_DIR:PATH=${alglib}"
+  ];
+
+  patches = [
+    (fetchpatch {
+      # patch FindAlglib.cmake to respect ALGLIB_DIR
+      # see https://github.com/jcelaya/hdrmerge/pull/213
+      name = "patch-hdrmerge-CMake.patch";
+      url = "https://github.com/mkroehnert/hdrmerge/commit/472b2dfe7d54856158aea3d5412a02d0bab1da4c.patch";
+      sha256 = "0jc713ajr4w08pfbi6bva442prj878nxp1fpl9112i3xj34x9sdi";
+    })
+  ];
+
+  desktopItems = [
+    (makeDesktopItem {
+      name = "HDRMerge";
+      genericName = "HDR raw image merge";
+      desktopName = "HDRMerge";
+      comment = meta.description;
+      icon = "hdrmerge";
+      exec = "@out@/bin/hdrmerge -F";
+      categories = [ "Graphics" ];
+      mimeTypes = [ "image/x-dcraw" "image/x-adobe-dng" ];
+      terminal = false;
+    })
+  ];
+
+  postInstallPhase = ''
+    # Make a desktop item
+    mkdir -p $out/share/icons/ $out/share/applications/
+    cp ../data/images/logo.png $out/share/icons/hdrmerge.png
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/jcelaya/hdrmerge";
+    description = "Combines two or more raw images into an HDR";
+    license = licenses.gpl3Plus;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.paperdigits ];
+  };
+}