2022-01-28 02:34:51 +00:00
|
|
|
{ lib
|
|
|
|
, mkDerivation
|
|
|
|
, fetchpatch
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, qtbase
|
|
|
|
, wrapQtAppsHook
|
|
|
|
, libraw
|
|
|
|
, exiv2
|
|
|
|
, zlib
|
|
|
|
, alglib
|
|
|
|
, pkg-config
|
|
|
|
, makeDesktopItem
|
|
|
|
, copyDesktopItems
|
|
|
|
}:
|
|
|
|
|
|
|
|
mkDerivation rec {
|
|
|
|
pname = "hdrmerge";
|
2023-09-30 20:16:57 +00:00
|
|
|
version = "unstable-2023-01-04";
|
2022-01-28 02:34:51 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jcelaya";
|
|
|
|
repo = "hdrmerge";
|
2023-09-30 20:16:57 +00:00
|
|
|
rev = "ca38b54f980564942a7f2b014a5f57a64c1d9019";
|
|
|
|
hash = "sha256-DleYgpDXP0NvbmEURXnBfe3OYnT1CaQq+Mw93JQQprE=";
|
2022-01-28 02:34:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
pkg-config
|
|
|
|
wrapQtAppsHook
|
|
|
|
copyDesktopItems
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [ qtbase libraw exiv2 zlib alglib ];
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DALGLIB_DIR:PATH=${alglib}"
|
|
|
|
];
|
|
|
|
|
|
|
|
patches = [
|
2023-09-30 20:16:57 +00:00
|
|
|
# https://github.com/jcelaya/hdrmerge/pull/222
|
2022-01-28 02:34:51 +00:00
|
|
|
(fetchpatch {
|
2023-09-30 20:16:57 +00:00
|
|
|
name = "exiv2-0.28.patch";
|
|
|
|
url = "https://github.com/jcelaya/hdrmerge/commit/377d8e6f3c7cdd1a45b63bce2493ad177dde03fb.patch";
|
|
|
|
hash = "sha256-lXHML6zGkVeWKvmY5ECoJL2xjmtZz77XJd5prpgJiZo=";
|
2023-02-05 14:06:08 +00:00
|
|
|
})
|
2022-01-28 02:34:51 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
desktopItems = [
|
|
|
|
(makeDesktopItem {
|
|
|
|
name = "HDRMerge";
|
|
|
|
genericName = "HDR raw image merge";
|
|
|
|
desktopName = "HDRMerge";
|
|
|
|
comment = meta.description;
|
|
|
|
icon = "hdrmerge";
|
2022-03-09 16:48:30 +00:00
|
|
|
exec = "hdrmerge %F";
|
2022-01-28 02:34:51 +00:00
|
|
|
categories = [ "Graphics" ];
|
|
|
|
mimeTypes = [ "image/x-dcraw" "image/x-adobe-dng" ];
|
|
|
|
terminal = false;
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2022-03-09 16:48:30 +00:00
|
|
|
postInstall = ''
|
|
|
|
install -Dm444 ../data/images/icon.png $out/share/icons/hicolor/128x128/apps/hdrmerge.png
|
2022-01-28 02:34:51 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|