diff options
author | Mica Semrick <mica@silentumbrella.com> | 2022-01-27 18:34:51 -0800 |
---|---|---|
committer | Mica Semrick <mica@silentumbrella.com> | 2022-03-08 08:35:05 -0800 |
commit | c3acc1e331b7ee50296563efc184a0a9f0493ef3 (patch) | |
tree | 3ff0f66dc102015104ced841122b755ba23de533 /pkgs/applications/graphics/hdrmerge | |
parent | 5c029ba214cd3e2c5ee834ce1ff6bc0a77efaac6 (diff) |
hdrmerge: hdrmerge: init at unstable-2020-11-12
Diffstat (limited to 'pkgs/applications/graphics/hdrmerge')
-rw-r--r-- | pkgs/applications/graphics/hdrmerge/default.nix | 78 |
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 0000000000000..4dfc8cd34c7b5 --- /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 ]; + }; +} |